|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.compression.CanonicalFast64CodeWordDecoder
public final class CanonicalFast64CodeWordDecoder
A fast table-based decoder for canonical Huffman codes supporting only codes with limited (less than 64 bits) codewords. We use the technique described by Daniel S. Hirschberg and Debra A. Lelewer, “Efficient Decoding of Prefix Codes”, Comm. ACM, 33(4): 449−459, 1990.
Constructor Summary | |
---|---|
CanonicalFast64CodeWordDecoder(int[] codeWordLength,
int[] symbol)
Creates a new codeword-based decoder using the given vector of codewords lengths and a symbol array. |
Method Summary | |
---|---|
int |
decode(BooleanIterator iterator)
Decodes the next symbol from the given boolean iterator. |
int |
decode(InputBitStream ibs)
Decodes the next symbol from the given input bit stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CanonicalFast64CodeWordDecoder(int[] codeWordLength, int[] symbol)
codeWordLength
- a vector of nondecreasing codeword lengths suitable for a canonical code.symbol
- a parallel array of symbols corresponding to each codeword length.Method Detail |
---|
public int decode(BooleanIterator iterator)
Decoder
Note that InputBitStream
implements BooleanIterator
.
decode
in interface Decoder
iterator
- a boolean iterator.
i
public int decode(InputBitStream ibs) throws java.io.IOException
Decoder
Note that InputBitStream
implements BooleanIterator
.
decode
in interface Decoder
ibs
- an input bit stream.
ibs
.
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |