Mercurial > vba-linux
view src/win32/7zip/7z/CPP/7zip/Compress/ImplodeHuffmanDecoder.h @ 1:f9f4f1b99eed
importing src directory
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Mar 2012 10:31:27 -0600 |
parents | |
children |
line wrap: on
line source
1 // ImplodeHuffmanDecoder.h3 #ifndef __IMPLODE_HUFFMAN_DECODER_H4 #define __IMPLODE_HUFFMAN_DECODER_H6 #include "../Common/InBuffer.h"8 #include "BitlDecoder.h"10 namespace NCompress {11 namespace NImplode {12 namespace NHuffman {14 const int kNumBitsInLongestCode = 16;16 typedef NBitl::CDecoder<CInBuffer> CInBit;18 class CDecoder19 {20 UInt32 m_Limitits[kNumBitsInLongestCode + 2]; // m_Limitits[i] = value limit for symbols with length = i21 UInt32 m_Positions[kNumBitsInLongestCode + 2]; // m_Positions[i] = index in m_Symbols[] of first symbol with length = i22 UInt32 m_NumSymbols; // number of symbols in m_Symbols23 UInt32 *m_Symbols; // symbols: at first with len=1 then 2, ... 15.24 public:25 CDecoder(UInt32 numSymbols);26 ~CDecoder();28 bool SetCodeLengths(const Byte *codeLengths);29 UInt32 DecodeSymbol(CInBit *inStream);30 };32 }}}34 #endif