• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Lzma2Decoder.h
2 
3 #ifndef ZIP7_INC_LZMA2_DECODER_H
4 #define ZIP7_INC_LZMA2_DECODER_H
5 
6 #include "../../../C/Lzma2DecMt.h"
7 
8 #include "../Common/CWrappers.h"
9 
10 namespace NCompress {
11 namespace NLzma2 {
12 
13 class CDecoder Z7_final:
14   public ICompressCoder,
15   public ICompressSetDecoderProperties2,
16   public ICompressSetFinishMode,
17   public ICompressGetInStreamProcessedSize,
18   public ICompressSetBufSize,
19  #ifndef Z7_NO_READ_FROM_CODER
20   public ICompressSetInStream,
21   public ICompressSetOutStreamSize,
22   public ISequentialInStream,
23  #endif
24  #ifndef Z7_ST
25   public ICompressSetCoderMt,
26   public ICompressSetMemLimit,
27  #endif
28   public CMyUnknownImp
29 {
30   Z7_COM_QI_BEGIN2(ICompressCoder)
31   Z7_COM_QI_ENTRY(ICompressSetDecoderProperties2)
32   Z7_COM_QI_ENTRY(ICompressSetFinishMode)
33   Z7_COM_QI_ENTRY(ICompressGetInStreamProcessedSize)
34   Z7_COM_QI_ENTRY(ICompressSetBufSize)
35  #ifndef Z7_NO_READ_FROM_CODER
36   Z7_COM_QI_ENTRY(ICompressSetInStream)
37   Z7_COM_QI_ENTRY(ICompressSetOutStreamSize)
38   Z7_COM_QI_ENTRY(ISequentialInStream)
39  #endif
40  #ifndef Z7_ST
41   Z7_COM_QI_ENTRY(ICompressSetCoderMt)
42   Z7_COM_QI_ENTRY(ICompressSetMemLimit)
43  #endif
44   Z7_COM_QI_END
45   Z7_COM_ADDREF_RELEASE
46 
47   Z7_IFACE_COM7_IMP(ICompressCoder)
48   Z7_IFACE_COM7_IMP(ICompressSetDecoderProperties2)
49   Z7_IFACE_COM7_IMP(ICompressSetFinishMode)
50   Z7_IFACE_COM7_IMP(ICompressGetInStreamProcessedSize)
51   Z7_IFACE_COM7_IMP(ICompressSetBufSize)
52  #ifndef Z7_NO_READ_FROM_CODER
53   Z7_IFACE_COM7_IMP(ICompressSetOutStreamSize)
54   Z7_IFACE_COM7_IMP(ICompressSetInStream)
55   Z7_IFACE_COM7_IMP(ISequentialInStream)
56  #endif
57  #ifndef Z7_ST
58   Z7_IFACE_COM7_IMP(ICompressSetCoderMt)
59   Z7_IFACE_COM7_IMP(ICompressSetMemLimit)
60  #endif
61 
62   CLzma2DecMtHandle _dec;
63   UInt64 _inProcessed;
64   Byte _prop;
65   int _finishMode;
66   UInt32 _inBufSize;
67   UInt32 _outStep;
68 
69  #ifndef Z7_ST
70   int _tryMt;
71   UInt32 _numThreads;
72   UInt64 _memUsage;
73  #endif
74 
75  #ifndef Z7_NO_READ_FROM_CODER
76   CMyComPtr<ISequentialInStream> _inStream;
77   CSeqInStreamWrap _inWrap;
78  #endif
79 
80 public:
81   CDecoder();
82   ~CDecoder();
83 };
84 
85 }}
86 
87 #endif
88