public final class FastArithmeticDecoder extends Object implements FastArithmeticDecoderI
(MG4J)
Date: 1/15/12
Time: 11:02 AM| Modifier and Type | Field and Description |
|---|---|
static int |
BITS
Number of bits used by the decoder.
|
| Constructor and Description |
|---|
FastArithmeticDecoder(int n)
Creates a new decoder.
|
| Modifier and Type | Method and Description |
|---|---|
int |
decode(it.unimi.dsi.io.InputBitStream ibs)
Decodes a symbol.
|
void |
flush(it.unimi.dsi.io.InputBitStream ibs)
Flushes (reads) the disambiguating bits.
|
long |
getWindow()
Returns the current bit stream window.
|
void |
reposition(it.unimi.dsi.io.InputBitStream input)
Reposition the input stream.
|
void |
reset()
Resets the decoder before decoding a new message.
|
public static final int BITS
public FastArithmeticDecoder(int n)
n - number of symbols used by the decoder.public void reset()
reset in interface FastArithmeticDecoderIpublic int decode(it.unimi.dsi.io.InputBitStream ibs)
throws IOException
decode in interface FastArithmeticDecoderIibs - the input stream.IOException - if ibs does.public void flush(it.unimi.dsi.io.InputBitStream ibs)
throws IOException
This method must be called when all symbols have been decoded. After
the call, exactly BITS excess bits will be present in the
current window of the decoder. You can get them using getWindow();
usually you will then unget them to the bit stream.
flush in interface FastArithmeticDecoderIibs - the input stream.IOException - if ibs does.public long getWindow()
getWindow in interface FastArithmeticDecoderIBITS bits.public void reposition(it.unimi.dsi.io.InputBitStream input)
throws IOException
reposition in interface FastArithmeticDecoderIinput - IOExceptionCopyright © 2018 Campagne Laboratory. All rights reserved.