diff 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
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/win32/7zip/7z/CPP/7zip/Compress/ImplodeDecoder.h	Sat Mar 03 10:31:27 2012 -0600
     1.3 @@ -0,0 +1,57 @@
     1.4 +// ImplodeDecoder.h
     1.5 +
     1.6 +#ifndef __COMPRESS_IMPLODE_DECODER_H
     1.7 +#define __COMPRESS_IMPLODE_DECODER_H
     1.8 +
     1.9 +#include "../../Common/MyCom.h"
    1.10 +
    1.11 +#include "../ICoder.h"
    1.12 +
    1.13 +#include "ImplodeHuffmanDecoder.h"
    1.14 +#include "LzOutWindow.h"
    1.15 +
    1.16 +namespace NCompress {
    1.17 +namespace NImplode {
    1.18 +namespace NDecoder {
    1.19 +
    1.20 +class CCoder:
    1.21 +  public ICompressCoder,
    1.22 +  public ICompressSetDecoderProperties2,
    1.23 +  public CMyUnknownImp
    1.24 +{
    1.25 +  CLzOutWindow m_OutWindowStream;
    1.26 +  NBitl::CDecoder<CInBuffer> m_InBitStream;
    1.27 +  
    1.28 +  NImplode::NHuffman::CDecoder m_LiteralDecoder;
    1.29 +  NImplode::NHuffman::CDecoder m_LengthDecoder;
    1.30 +  NImplode::NHuffman::CDecoder m_DistanceDecoder;
    1.31 +
    1.32 +  bool m_BigDictionaryOn;
    1.33 +  bool m_LiteralsOn;
    1.34 +
    1.35 +  int m_NumDistanceLowDirectBits;
    1.36 +  UInt32 m_MinMatchLength;
    1.37 +
    1.38 +  bool ReadLevelItems(NImplode::NHuffman::CDecoder &table, Byte *levels, int numLevelItems);
    1.39 +  bool ReadTables();
    1.40 +  void DeCodeLevelTable(Byte *newLevels, int numLevels);
    1.41 +public:
    1.42 +  CCoder();
    1.43 +
    1.44 +  MY_UNKNOWN_IMP1(ICompressSetDecoderProperties2)
    1.45 +
    1.46 +  void ReleaseStreams();
    1.47 +  HRESULT Flush() { return m_OutWindowStream.Flush(); }
    1.48 +
    1.49 +  HRESULT CodeReal(ISequentialInStream *inStream, ISequentialOutStream *outStream,
    1.50 +      const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress);
    1.51 +
    1.52 +  STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream,
    1.53 +      const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress);
    1.54 +
    1.55 +  STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size);
    1.56 +};
    1.57 +
    1.58 +}}}
    1.59 +
    1.60 +#endif