implodehuffmandecoder.h
来自「压缩软件源码」· C头文件 代码 · 共 35 行
H
35 行
// ImplodeHuffmanDecoder.h
#ifndef __IMPLODE_HUFFMAN_DECODER_H
#define __IMPLODE_HUFFMAN_DECODER_H
#include "../../Common/LSBFDecoder.h"
#include "../../Common/InBuffer.h"
namespace NCompress {
namespace NImplode {
namespace NHuffman {
const int kNumBitsInLongestCode = 16;
class CDecoderException{};
typedef NStream::NLSBF::CDecoder<CInBuffer> CInBit;
class CDecoder
{
UInt32 m_Limitits[kNumBitsInLongestCode + 2]; // m_Limitits[i] = value limit for symbols with length = i
UInt32 m_Positions[kNumBitsInLongestCode + 2]; // m_Positions[i] = index in m_Symbols[] of first symbol with length = i
UInt32 m_NumSymbols; // number of symbols in m_Symbols
UInt32 *m_Symbols; // symbols: at first with len=1 then 2, ... 15.
public:
CDecoder(UInt32 numSymbols);
~CDecoder();
void SetCodeLengths(const Byte *codeLengths);
UInt32 DecodeSymbol(CInBit *inStream);
};
}}}
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?