Package it.unimi.dsi.compression
Interface Decoder
-
- All Known Implementing Classes:
CanonicalFast64CodeWordDecoder
,TreeDecoder
public interface Decoder
Decoding methods for a specific compression technique.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
decode(it.unimi.dsi.fastutil.booleans.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.
-
-
-
Method Detail
-
decode
int decode(it.unimi.dsi.fastutil.booleans.BooleanIterator iterator)
Decodes the next symbol from the given boolean iterator.Note that
InputBitStream
implementsBooleanIterator
.- Parameters:
iterator
- a boolean iterator.- Returns:
- the next symbol decoded from the bits emitted by
i
- Throws:
java.util.NoSuchElementException
- ifiterator
terminates before a symbol has been decoded.
-
decode
int decode(InputBitStream ibs) throws java.io.IOException
Decodes the next symbol from the given input bit stream.Note that
InputBitStream
implementsBooleanIterator
.- Parameters:
ibs
- an input bit stream.- Returns:
- the next symbol decoded from
ibs
. - Throws:
java.io.IOException
-
-