Mercurial > vba-linux
view src/win32/7zip/7z/CPP/7zip/Compress/PpmdDecoder.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 // PpmdDecoder.h3 #ifndef __COMPRESS_PPMD_DECODER_H4 #define __COMPRESS_PPMD_DECODER_H6 #include "../../Common/MyCom.h"8 #include "../ICoder.h"10 #include "../Common/OutBuffer.h"12 #include "PpmdDecode.h"13 #include "RangeCoder.h"15 namespace NCompress {16 namespace NPpmd {18 class CDecoder :19 public ICompressCoder,20 public ICompressSetDecoderProperties2,21 #ifndef NO_READ_FROM_CODER22 public ICompressSetInStream,23 public ICompressSetOutStreamSize,24 public ISequentialInStream,25 #endif26 public CMyUnknownImp27 {28 CRangeDecoder _rangeDecoder;30 COutBuffer _outStream;32 CDecodeInfo _info;34 Byte _order;35 UInt32 _usedMemorySize;37 int _remainLen;38 UInt64 _outSize;39 bool _outSizeDefined;40 UInt64 _processedSize;42 HRESULT CodeSpec(UInt32 num, Byte *memStream);44 public:46 #ifndef NO_READ_FROM_CODER47 MY_UNKNOWN_IMP4(48 ICompressSetDecoderProperties2,49 ICompressSetInStream,50 ICompressSetOutStreamSize,51 ISequentialInStream)52 #else53 MY_UNKNOWN_IMP1(54 ICompressSetDecoderProperties2)55 #endif57 void ReleaseStreams()58 {59 ReleaseInStream();60 _outStream.ReleaseStream();61 }63 HRESULT Flush() { return _outStream.Flush(); }65 STDMETHOD(CodeReal)(ISequentialInStream *inStream, ISequentialOutStream *outStream,66 const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress);68 STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream,69 const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress);71 STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size);73 STDMETHOD(SetInStream)(ISequentialInStream *inStream);74 STDMETHOD(ReleaseInStream)();75 STDMETHOD(SetOutStreamSize)(const UInt64 *outSize);77 #ifndef NO_READ_FROM_CODER78 STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);79 #endif81 CDecoder(): _outSizeDefined(false) {}82 };84 }}86 #endif