ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Common::Huffman Class Reference

Huffman bitstream decoding. More...

#include <huffman.h>

Collaboration diagram for Common::Huffman:

List of all members.


struct  Symbol

Public Member Functions

 Huffman (uint8 maxLength, uint32 codeCount, const uint32 *codes, const uint8 *lengths, const uint32 *symbols=nullptr)
 Construct a Huffman decoder.
 ~Huffman ()
void setSymbols (const uint32 *symbols=nullptr)
 Modify the codes' symbols.
template<class BITSTREAM >
uint32 getSymbol (BITSTREAM &bits) const
 Return the next symbol in the bitstream.

Private Types

typedef List< SymbolCodeList
typedef Array< CodeListCodeLists
typedef Array< Symbol * > SymbolList

Private Attributes

CodeLists _codes
 Lists of codes and their symbols, sorted by code length.
SymbolList _symbols
 Sorted list of pointers to the symbols.

Detailed Description

Huffman bitstream decoding.

Used in engines:

  • scumm

Definition at line 40 of file huffman.h.

Member Typedef Documentation

Definition at line 81 of file huffman.h.

Definition at line 82 of file huffman.h.

Definition at line 83 of file huffman.h.

Constructor & Destructor Documentation

Common::Huffman::Huffman ( uint8  maxLength,
uint32  codeCount,
const uint32 codes,
const uint8 lengths,
const uint32 symbols = nullptr 

Construct a Huffman decoder.

maxLength Maximal code length. If 0, it's searched for.
codeCount Number of codes.
codes The actual codes.
lengths Lengths of the individual codes.
symbols The symbols. If 0, assume they are identical to the code indices.

Definition at line 36 of file huffman.cpp.

Common::Huffman::~Huffman (  ) 

Definition at line 63 of file huffman.cpp.

Member Function Documentation

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

Return the next symbol in the bitstream.

Definition at line 58 of file huffman.h.

void Common::Huffman::setSymbols ( const uint32 symbols = nullptr  ) 

Modify the codes' symbols.

Definition at line 66 of file huffman.cpp.

Member Data Documentation

Lists of codes and their symbols, sorted by code length.

Definition at line 86 of file huffman.h.

Sorted list of pointers to the symbols.

Definition at line 89 of file huffman.h.

The documentation for this class was generated from the following files:

Generated on Sat Mar 16 2019 05:05:38 for ResidualVM by doxygen 1.7.1
curved edge   curved edge