Mercurial > vba-linux
comparison 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 |
comparison
equal
deleted
inserted
replaced
0:8ced16adf2e1 | 1:f9f4f1b99eed |
---|---|
1 // ImplodeHuffmanDecoder.h | |
2 | |
3 #ifndef __IMPLODE_HUFFMAN_DECODER_H | |
4 #define __IMPLODE_HUFFMAN_DECODER_H | |
5 | |
6 #include "../Common/InBuffer.h" | |
7 | |
8 #include "BitlDecoder.h" | |
9 | |
10 namespace NCompress { | |
11 namespace NImplode { | |
12 namespace NHuffman { | |
13 | |
14 const int kNumBitsInLongestCode = 16; | |
15 | |
16 typedef NBitl::CDecoder<CInBuffer> CInBit; | |
17 | |
18 class CDecoder | |
19 { | |
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. | |
24 public: | |
25 CDecoder(UInt32 numSymbols); | |
26 ~CDecoder(); | |
27 | |
28 bool SetCodeLengths(const Byte *codeLengths); | |
29 UInt32 DecodeSymbol(CInBit *inStream); | |
30 }; | |
31 | |
32 }}} | |
33 | |
34 #endif |