3#ifndef ENGINE_SHARED_HUFFMAN_H
4#define ENGINE_SHARED_HUFFMAN_H
70 int Compress(
const void *pInput,
int InputSize,
void *pOutput,
int OutputSize)
const;
85 int Decompress(
const void *pInput,
int InputSize,
void *pOutput,
int OutputSize)
const;
int m_NumNodes
Definition: huffman.h:38
int Decompress(const void *pInput, int InputSize, void *pOutput, int OutputSize) const
Definition: huffman.cpp:204
static const unsigned ms_aFreqTable[HUFFMAN_MAX_SYMBOLS]
Definition: huffman.h:33
void Init(const unsigned *pFrequencies=ms_aFreqTable)
Definition: huffman.cpp:93
CNode * m_pStartNode
Definition: huffman.h:37
@ HUFFMAN_LUTMASK
Definition: huffman.h:17
@ HUFFMAN_MAX_NODES
Definition: huffman.h:13
@ HUFFMAN_LUTBITS
Definition: huffman.h:15
@ HUFFMAN_LUTSIZE
Definition: huffman.h:16
@ HUFFMAN_MAX_SYMBOLS
Definition: huffman.h:12
@ HUFFMAN_EOF_SYMBOL
Definition: huffman.h:10
void ConstructTree(const unsigned *pFrequencies)
Definition: huffman.cpp:47
void Setbits_r(CNode *pNode, int Bits, unsigned Depth)
Definition: huffman.cpp:33
CNode m_aNodes[HUFFMAN_MAX_NODES]
Definition: huffman.h:35
int Compress(const void *pInput, int InputSize, void *pOutput, int OutputSize) const
Definition: huffman.cpp:131
CNode * m_apDecodeLut[HUFFMAN_LUTSIZE]
Definition: huffman.h:36
unsigned m_NumBits
Definition: huffman.h:24
unsigned char m_Symbol
Definition: huffman.h:30
unsigned short m_aLeafs[2]
Definition: huffman.h:27
unsigned m_Bits
Definition: huffman.h:23