it.unimi.dsi.mg4j.compression
Interface Coder

All Known Subinterfaces:
PrefixCoder
All Known Implementing Classes:
CodeWordCoder, Fast64CodeWordCoder

Deprecated. Moved to dsiutils.

@Deprecated
public interface Coder

Coding methods for a specific compression technique.


Method Summary
 BooleanIterator encode(int symbol)
          Deprecated. Encodes a symbol.
 int encode(int symbol, OutputBitStream obs)
          Deprecated. Encodes a symbol.
 BooleanIterator flush()
          Deprecated. Flushes the coder.
 int flush(OutputBitStream obs)
          Deprecated. Flushes the coder.
 

Method Detail

encode

BooleanIterator encode(int symbol)
Deprecated. 
Encodes a symbol.

Parameters:
symbol - a symbol.
Returns:
a boolean iterator returning the bits coding symbol.

encode

int encode(int symbol,
           OutputBitStream obs)
           throws IOException
Deprecated. 
Encodes a symbol.

Parameters:
symbol - a symbol.
obs - the output bit stream where the encoded symbol will be written.
Returns:
the number of bits written.
Throws:
IOException

flush

int flush(OutputBitStream obs)
Deprecated. 
Flushes the coder. Warning: this method will not flush obs.

Parameters:
obs - the output bit stream where the flushing bits will be written.
Returns:
the number of bits written to flush the coder.

flush

BooleanIterator flush()
Deprecated. 
Flushes the coder.

Returns:
a boolean iterator returning the bits used to flush this coder.