5 #include <libutl/Encoder.h> 58 start(mode, stream, owner, numSymbols, incLimit, eob);
61 virtual size_t decode(
byte_t* block,
size_t num);
66 virtual size_t encode(
const byte_t* block,
size_t num);
69 inline void encode(
uint_t symbol);
90 virtual void finishEncoding();
101 void updateModel(
uint_t symbol);
118 a = _numSymbols + symbol;
121 stack[sp++] = (_right[_up[a]] == a);
126 _stream->putBit(stack[--sp]);
134 HuffmanEncoder::decode()
139 if (_stream->getBit())
147 }
while (a < _numSymbols);
void deInit()
De-initialize UTL++.
Encoder/decoder abstraction.
#define UTL_CLASS_DECL(DC, BC)
Declaration of standard UTL++ functionality for a non-template class.
unsigned char byte_t
Unsigned character.
HuffmanEncoder(uint_t mode, Stream *stream, bool owner, uint_t numSymbols, uint_t incLimit, bool eob=false)
Constructor.
unsigned int uint_t
Unsigned integer.
void init()
Initialize UTL++.