| Modifier and Type | Class and Description |
|---|---|
(package private) class |
HuffmanCodec.Decoder |
| Modifier and Type | Field and Description |
|---|---|
private HashMap<short[],HuffmanCodec.Decoder> |
cachedDecoders |
private int |
leafCounter |
private static int |
LEAVES_OFFSET |
| Constructor and Description |
|---|
HuffmanCodec() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
compress(byte[] data,
CodecOptions options)
Compresses a block of data.
|
byte[] |
decompress(RandomAccessInputStream in,
CodecOptions options)
The CodecOptions parameter must be an instance of
HuffmanCodecOptions, and should have the following fields set:
table
bitsPerSample
maxBytes |
int |
getSample(BitBuffer bb,
CodecOptions options)
Deprecated.
|
int |
getSample(RandomAccessInputStream bb,
CodecOptions options) |
compress, decompress, decompress, decompress, decompress, testprivate static final int LEAVES_OFFSET
private int leafCounter
private HashMap<short[],HuffmanCodec.Decoder> cachedDecoders
public byte[] compress(byte[] data,
CodecOptions options)
throws FormatException
Codecdata - The data to be compressed.options - Options to be used during compression, if appropriate.FormatException - If input is not a compressed data block of the
appropriate type.public byte[] decompress(RandomAccessInputStream in, CodecOptions options) throws FormatException, IOException
HuffmanCodecOptions, and should have the following fields set:
table
bitsPerSample
maxBytesdecompress in interface Codecdecompress in class BaseCodecin - The stream from which to read compressed data.options - Options to be used during decompression.FormatException - If data is not valid compressed data for this
decompressor.IOExceptionCodec.decompress(RandomAccessInputStream, CodecOptions)@Deprecated public int getSample(BitBuffer bb, CodecOptions options) throws FormatException
FormatExceptionpublic int getSample(RandomAccessInputStream bb, CodecOptions options) throws FormatException
FormatExceptionCopyright © 2016 Open Microscopy Environment