⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 implodehuffmandecoder.h

📁 压缩软件源码
💻 H
字号:
// 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -