it.unimi.dsi.compression
Interface PrefixCodec

All Superinterfaces:
Codec
All Known Implementing Classes:
HuffmanCodec, HuTuckerCodec

public interface PrefixCodec
extends Codec

A codec based on a set of prefix-free codewords.

Prefix codec work by building a vector of prefix-free codewords, one for each symbol. The method codeWords() returns that vector. Moreover, this interface strengthens the return type of coder() to PrefixCoder.


Method Summary
 PrefixCoder coder()
          Returns a coder for the compression technique represented by this coded.
 BitVector[] codeWords()
          Returns the vector of prefix-free codewords used by this prefix coder.
 
Methods inherited from interface it.unimi.dsi.compression.Codec
decoder, size
 

Method Detail

codeWords

BitVector[] codeWords()
Returns the vector of prefix-free codewords used by this prefix coder.

Returns:
the vector of prefix-free codewords used by this prefix coder.

coder

PrefixCoder coder()
Description copied from interface: Codec
Returns a coder for the compression technique represented by this coded.

Specified by:
coder in interface Codec
Returns:
a coder for the compression technique represented by this codec.