Codec.Decoder
, java.io.Serializable
protected static final class Codec.Gamma.Coder.Decoder extends java.lang.Object implements Codec.Decoder
Constructor | Description |
---|---|
Decoder(int maxCodewordLength) |
Modifier and Type | Method | Description |
---|---|---|
long |
decode(long code) |
Decodes a stream of bits.
|
long |
numBits() |
The number of bits used by this decoder.
|
public long decode(long code)
Codec.Decoder
This method assumes that its input is
stream of Codec.Coder.maxCodewordLength()
bits, and that the first
bit of the code is the leftmost bit (i.e., the bit of index
Codec.Coder.maxCodewordLength()
− 1).
decode
in interface Codec.Decoder
code
- a stream of bits.public long numBits()
Codec.Decoder
numBits
in interface Codec.Decoder