format/src/main/java/com/github/sadikovi/riff/io/CompressionCodecFactory.java
/**
   * Get codec for short name.
   * @param name codec name
   * @return compression codec
   */
Get codec for short name.
@param name codec name
@return compression codec
Get codec for short name . @param name codec name @return compression codec
public static CompressionCodec forShortName(String name) {
    switch (name.toLowerCase()) {
      case ZLIB_SHORT_NAME:
        return new ZlibCodec();
      case GZIP_SHORT_NAME:
        return new GzipCodec();
      case SNAPPY_SHORT_NAME:
        return new SnappyCodec();
      case UNCOMPRESSED_SHORT_NAME:
        return UNCOMPRESSED;
      default:
        throw new UnsupportedOperationException("Unknown codec: " + name);
    }
  }
public static CompressionCodec forShortName ( String name ) { switch ( name . toLowerCase ( ) ) { case ZLIB_SHORT_NAME : return new ZlibCodec ( ) ; case GZIP_SHORT_NAME : return new GzipCodec ( ) ; case SNAPPY_SHORT_NAME : return new SnappyCodec ( ) ; case UNCOMPRESSED_SHORT_NAME : return UNCOMPRESSED ; default : throw new UnsupportedOperationException ( "Unknown codec: " + name ) ; } }
Get codec for short name.
Get codec for short name .