| OLD | NEW |
| (Empty) |
| 1 // LzmaDecoder.h | |
| 2 | |
| 3 #ifndef __LZMA_DECODER_H | |
| 4 #define __LZMA_DECODER_H | |
| 5 | |
| 6 extern "C" | |
| 7 { | |
| 8 #include "../../../C/LzmaDec.h" | |
| 9 } | |
| 10 | |
| 11 #include "../../Common/MyCom.h" | |
| 12 #include "../ICoder.h" | |
| 13 | |
| 14 namespace NCompress { | |
| 15 namespace NLzma { | |
| 16 | |
| 17 class CDecoder: | |
| 18 public ICompressCoder, | |
| 19 public ICompressSetDecoderProperties2, | |
| 20 public ICompressGetInStreamProcessedSize, | |
| 21 #ifndef NO_READ_FROM_CODER | |
| 22 public ICompressSetInStream, | |
| 23 public ICompressSetOutStreamSize, | |
| 24 public ISequentialInStream, | |
| 25 #endif | |
| 26 public CMyUnknownImp | |
| 27 { | |
| 28 CMyComPtr<ISequentialInStream> _inStream; | |
| 29 Byte *_inBuf; | |
| 30 UInt32 _inPos; | |
| 31 UInt32 _inSize; | |
| 32 CLzmaDec _state; | |
| 33 bool _outSizeDefined; | |
| 34 UInt64 _outSize; | |
| 35 UInt64 _inSizeProcessed; | |
| 36 UInt64 _outSizeProcessed; | |
| 37 public: | |
| 38 | |
| 39 #ifndef NO_READ_FROM_CODER | |
| 40 MY_UNKNOWN_IMP5( | |
| 41 ICompressSetDecoderProperties2, | |
| 42 ICompressGetInStreamProcessedSize, | |
| 43 ICompressSetInStream, | |
| 44 ICompressSetOutStreamSize, | |
| 45 ISequentialInStream) | |
| 46 #else | |
| 47 MY_UNKNOWN_IMP2( | |
| 48 ICompressSetDecoderProperties2, | |
| 49 ICompressGetInStreamProcessedSize) | |
| 50 #endif | |
| 51 | |
| 52 STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream
, | |
| 53 const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progre
ss); | |
| 54 STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size); | |
| 55 STDMETHOD(GetInStreamProcessedSize)(UInt64 *value); | |
| 56 STDMETHOD(SetInStream)(ISequentialInStream *inStream); | |
| 57 STDMETHOD(ReleaseInStream)(); | |
| 58 STDMETHOD(SetOutStreamSize)(const UInt64 *outSize); | |
| 59 | |
| 60 #ifndef NO_READ_FROM_CODER | |
| 61 STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); | |
| 62 #endif | |
| 63 | |
| 64 bool FinishStream; | |
| 65 | |
| 66 CDecoder(); | |
| 67 virtual ~CDecoder(); | |
| 68 | |
| 69 }; | |
| 70 | |
| 71 }} | |
| 72 | |
| 73 #endif | |
| OLD | NEW |