Package it.unimi.dsi.compression
Interface PrefixCoder
- All Superinterfaces:
Coder
- All Known Implementing Classes:
CodeWordCoder
,Fast64CodeWordCoder
A coder based on a set of prefix-free codewords.
Not all coders are codeword-based (for instance, arithmetic coding
is not codeword-based). However, coders that are based on prefix-free codewords are invited
to return by means of Codec.coder()
an
implementation of this interface.
Note that the coder returned by a PrefixCodec
is
an implementation of this interface.
-
Method Summary
-
Method Details
-
codeWords
BitVector[] codeWords()Provides access to the codewords. Warning: bit 0 of each bit vector returned bycodeWords()
is the first (leftmost) bit of the corresponding codeword: in other words, codewords are stored in right-to-left fashion.- Returns:
- the codewords.
-