Package ome.codecs
Class HuffmanCodec
- java.lang.Object
-
- ome.codecs.BaseCodec
-
- ome.codecs.HuffmanCodec
-
-
Constructor Summary
Constructors Constructor Description HuffmanCodec()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description byte[]compress(byte[] data, CodecOptions options)Compresses a block of data.byte[]decompress(loci.common.RandomAccessInputStream in, CodecOptions options)The CodecOptions parameter must be an instance ofHuffmanCodecOptions, and should have the following fields set:tablebitsPerSamplemaxBytesintgetSample(loci.common.RandomAccessInputStream bb, CodecOptions options)intgetSample(BitBuffer bb, CodecOptions options)Deprecated.-
Methods inherited from class ome.codecs.BaseCodec
compress, compress, decompress, decompress, decompress, decompress, test
-
-
-
-
Method Detail
-
compress
public byte[] compress(byte[] data, CodecOptions options) throws CodecExceptionDescription copied from interface:CodecCompresses a block of data.- Parameters:
data- The data to be compressed.options- Options to be used during compression, if appropriate.- Returns:
- The compressed data.
- Throws:
CodecException- If input is not a compressed data block of the appropriate type.
-
decompress
public byte[] decompress(loci.common.RandomAccessInputStream in, CodecOptions options) throws CodecException, java.io.IOExceptionThe CodecOptions parameter must be an instance ofHuffmanCodecOptions, and should have the following fields set:tablebitsPerSamplemaxBytes- Specified by:
decompressin interfaceCodec- Specified by:
decompressin classBaseCodec- Parameters:
in- The stream from which to read compressed data.options- Options to be used during decompression.- Returns:
- The decompressed data.
- Throws:
CodecException- If data is not valid compressed data for this decompressor.java.io.IOException- See Also:
Codec.decompress(RandomAccessInputStream, CodecOptions)
-
getSample
@Deprecated public int getSample(BitBuffer bb, CodecOptions options) throws CodecException
Deprecated.- Throws:
CodecException
-
getSample
public int getSample(loci.common.RandomAccessInputStream bb, CodecOptions options) throws CodecException- Throws:
CodecException
-
-