it.unimi.dsi.compression
Interface PrefixCoder

All Superinterfaces:
Coder
All Known Implementing Classes:
CodeWordCoder, Fast64CodeWordCoder

public interface PrefixCoder
extends Coder

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
 BitVector[] codeWords()
          Provides access to the codewords.
 
Methods inherited from interface it.unimi.dsi.compression.Coder
encode, encode, flush, flush
 

Method Detail

codeWords

BitVector[] codeWords()
Provides access to the codewords. Warning: bit 0 of each bit vector returned by codeWords() is the first (leftmost) bit of the corresponding codeword: in other words, codewords are stored in right-to-left fashion.

Returns:
the codewords.