ScummVM API documentation
Huffman bit stream decoding

Description

API for operations related to Huffman bit stream decoding.

Used in engines:

Classes

class  Common::Huffman< BITSTREAM >
 

Functions

uint32 Common::REVERSEBITS (uint32 x)
 
 Common::Huffman< BITSTREAM >::Huffman (uint8 maxLength, uint32 codeCount, const uint32 *codes, const uint8 *lengths, const uint32 *symbols=nullptr)
 
uint32 Common::Huffman< BITSTREAM >::getSymbol (BITSTREAM &bits) const
 

Function Documentation

◆ Huffman()

template<class BITSTREAM >
Common::Huffman< BITSTREAM >::Huffman ( uint8  maxLength,
uint32  codeCount,
const uint32 *  codes,
const uint8 *  lengths,
const uint32 *  symbols = nullptr 
)

Construct a Huffman decoder.

Parameters
maxLengthMaximal code length. If 0, it is searched for.
codeCountNumber of codes.
codesThe actual codes.
lengthsLengths of the individual codes.
symbolsThe symbols. If 0, assume they are identical to the code indices.

◆ getSymbol()

template<class BITSTREAM >
uint32 Common::Huffman< BITSTREAM >::getSymbol ( BITSTREAM &  bits) const

Return the next symbol in the bit stream.