diff src/win32/7zip/7z/CPP/7zip/Compress/LzmaDecoder.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/LzmaDecoder.h	Sat Mar 03 10:31:27 2012 -0600
     1.3 @@ -0,0 +1,73 @@
     1.4 +// LzmaDecoder.h
     1.5 +
     1.6 +#ifndef __LZMA_DECODER_H
     1.7 +#define __LZMA_DECODER_H
     1.8 +
     1.9 +extern "C"
    1.10 +{
    1.11 +#include "../../../C/LzmaDec.h"
    1.12 +}
    1.13 +
    1.14 +#include "../../Common/MyCom.h"
    1.15 +#include "../ICoder.h"
    1.16 +
    1.17 +namespace NCompress {
    1.18 +namespace NLzma {
    1.19 +
    1.20 +class CDecoder:
    1.21 +  public ICompressCoder,
    1.22 +  public ICompressSetDecoderProperties2,
    1.23 +  public ICompressGetInStreamProcessedSize,
    1.24 +  #ifndef NO_READ_FROM_CODER
    1.25 +  public ICompressSetInStream,
    1.26 +  public ICompressSetOutStreamSize,
    1.27 +  public ISequentialInStream,
    1.28 +  #endif
    1.29 +  public CMyUnknownImp
    1.30 +{
    1.31 +  CMyComPtr<ISequentialInStream> _inStream;
    1.32 +  Byte *_inBuf;
    1.33 +  UInt32 _inPos;
    1.34 +  UInt32 _inSize;
    1.35 +  CLzmaDec _state;
    1.36 +  bool _outSizeDefined;
    1.37 +  UInt64 _outSize;
    1.38 +  UInt64 _inSizeProcessed;
    1.39 +  UInt64 _outSizeProcessed;
    1.40 +public:
    1.41 +
    1.42 +  #ifndef NO_READ_FROM_CODER
    1.43 +  MY_UNKNOWN_IMP5(
    1.44 +      ICompressSetDecoderProperties2,
    1.45 +      ICompressGetInStreamProcessedSize,
    1.46 +      ICompressSetInStream,
    1.47 +      ICompressSetOutStreamSize,
    1.48 +      ISequentialInStream)
    1.49 +  #else
    1.50 +  MY_UNKNOWN_IMP2(
    1.51 +      ICompressSetDecoderProperties2,
    1.52 +      ICompressGetInStreamProcessedSize)
    1.53 +  #endif
    1.54 +
    1.55 +  STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream,
    1.56 +      const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress);
    1.57 +  STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size);
    1.58 +  STDMETHOD(GetInStreamProcessedSize)(UInt64 *value);
    1.59 +  STDMETHOD(SetInStream)(ISequentialInStream *inStream);
    1.60 +  STDMETHOD(ReleaseInStream)();
    1.61 +  STDMETHOD(SetOutStreamSize)(const UInt64 *outSize);
    1.62 +
    1.63 +  #ifndef NO_READ_FROM_CODER
    1.64 +  STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
    1.65 +  #endif
    1.66 +
    1.67 +  bool FinishStream;
    1.68 +
    1.69 +  CDecoder();
    1.70 +  virtual ~CDecoder();
    1.71 +
    1.72 +};
    1.73 +
    1.74 +}}
    1.75 +
    1.76 +#endif