comparison src/win32/7zip/7z/CPP/7zip/Compress/ImplodeDecoder.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 // ImplodeDecoder.h
2
3 #ifndef __COMPRESS_IMPLODE_DECODER_H
4 #define __COMPRESS_IMPLODE_DECODER_H
5
6 #include "../../Common/MyCom.h"
7
8 #include "../ICoder.h"
9
10 #include "ImplodeHuffmanDecoder.h"
11 #include "LzOutWindow.h"
12
13 namespace NCompress {
14 namespace NImplode {
15 namespace NDecoder {
16
17 class CCoder:
18 public ICompressCoder,
19 public ICompressSetDecoderProperties2,
20 public CMyUnknownImp
21 {
22 CLzOutWindow m_OutWindowStream;
23 NBitl::CDecoder<CInBuffer> m_InBitStream;
24
25 NImplode::NHuffman::CDecoder m_LiteralDecoder;
26 NImplode::NHuffman::CDecoder m_LengthDecoder;
27 NImplode::NHuffman::CDecoder m_DistanceDecoder;
28
29 bool m_BigDictionaryOn;
30 bool m_LiteralsOn;
31
32 int m_NumDistanceLowDirectBits;
33 UInt32 m_MinMatchLength;
34
35 bool ReadLevelItems(NImplode::NHuffman::CDecoder &table, Byte *levels, int numLevelItems);
36 bool ReadTables();
37 void DeCodeLevelTable(Byte *newLevels, int numLevels);
38 public:
39 CCoder();
40
41 MY_UNKNOWN_IMP1(ICompressSetDecoderProperties2)
42
43 void ReleaseStreams();
44 HRESULT Flush() { return m_OutWindowStream.Flush(); }
45
46 HRESULT CodeReal(ISequentialInStream *inStream, ISequentialOutStream *outStream,
47 const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress);
48
49 STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream,
50 const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress);
51
52 STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size);
53 };
54
55 }}}
56
57 #endif