1
// ImplodeHuffmanDecoder.h
3
#ifndef __IMPLODE_HUFFMAN_DECODER_H
4
#define __IMPLODE_HUFFMAN_DECODER_H
6
#include "../Common/InBuffer.h"
8
#include "BitlDecoder.h"
14
const int kNumBitsInLongestCode = 16;
16
typedef NBitl::CDecoder<CInBuffer> CInBit;
20
UInt32 m_Limitits[kNumBitsInLongestCode + 2]; // m_Limitits[i] = value limit for symbols with length = i
21
UInt32 m_Positions[kNumBitsInLongestCode + 2]; // m_Positions[i] = index in m_Symbols[] of first symbol with length = i
22
UInt32 m_NumSymbols; // number of symbols in m_Symbols
23
UInt32 *m_Symbols; // symbols: at first with len=1 then 2, ... 15.
25
CDecoder(UInt32 numSymbols);
28
bool SetCodeLengths(const Byte *codeLengths);
29
UInt32 DecodeSymbol(CInBit *inStream);