format/src/main/java/com/github/sadikovi/riff/io/CompressionCodecFactory.java
/**
   * Get codec for file extension.
   * If extension is unknown uncompressed codec is returned.
   * @param ext file extension, e.g. ".gz", ".deflate", ".snappy"
   * @return compression codec
   */
Get codec for file extension.
If extension is unknown uncompressed codec is returned.
@param ext file extension, e.g.
Get codec for file extension . If extension is unknown uncompressed codec is returned . @param ext file extension e . g .
public static CompressionCodec forFileExt(String ext) {
    switch (ext) {
      case ZLIB_FILE_EXTENSION:
        return new ZlibCodec();
      case GZIP_FILE_EXTENSION:
        return new GzipCodec();
      case SNAPPY_FILE_EXTENSION:
        return new SnappyCodec();
      default:
        return UNCOMPRESSED;
    }
  }
public static CompressionCodec forFileExt ( String ext ) { switch ( ext ) { case ZLIB_FILE_EXTENSION : return new ZlibCodec ( ) ; case GZIP_FILE_EXTENSION : return new GzipCodec ( ) ; case SNAPPY_FILE_EXTENSION : return new SnappyCodec ( ) ; default : return UNCOMPRESSED ; } }
Get codec for file extension.
Get codec for file extension .