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:table
bitsPerSample
maxBytes
int
getSample(loci.common.RandomAccessInputStream bb, CodecOptions options)
int
getSample(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 CodecException
Description copied from interface:Codec
Compresses 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, IOException
The CodecOptions parameter must be an instance ofHuffmanCodecOptions
, and should have the following fields set:table
bitsPerSample
maxBytes
- Specified by:
decompress
in interfaceCodec
- Specified by:
decompress
in 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.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
-
-