1 // 7zDecode.h
2 
3 #ifndef __7Z_DECODE_H
4 #define __7Z_DECODE_H
5 
6 #include "../../IStream.h"
7 #include "../../IPassword.h"
8 
9 #include "../Common/CoderMixer2.h"
10 #include "../Common/CoderMixer2MT.h"
11 #ifdef _ST_MODE
12 #include "../Common/CoderMixer2ST.h"
13 #endif
14 
15 #include "../../Common/CreateCoder.h"
16 
17 #include "7zItem.h"
18 
19 namespace NArchive {
20 namespace N7z {
21 
22 struct CBindInfoEx: public NCoderMixer::CBindInfo
23 {
24   CRecordVector<CMethodId> CoderMethodIDs;
ClearCBindInfoEx25   void Clear()
26   {
27     CBindInfo::Clear();
28     CoderMethodIDs.Clear();
29   }
30 };
31 
32 class CDecoder
33 {
34   bool _bindInfoExPrevIsDefined;
35   CBindInfoEx _bindInfoExPrev;
36 
37   bool _multiThread;
38   #ifdef _ST_MODE
39   NCoderMixer::CCoderMixer2ST *_mixerCoderSTSpec;
40   #endif
41   NCoderMixer::CCoderMixer2MT *_mixerCoderMTSpec;
42   NCoderMixer::CCoderMixer2 *_mixerCoderCommon;
43 
44   CMyComPtr<ICompressCoder2> _mixerCoder;
45   CObjectVector<CMyComPtr<IUnknown> > _decoders;
46   // CObjectVector<CMyComPtr<ICompressCoder2> > _decoders2;
47 public:
48   CDecoder(bool multiThread);
49   HRESULT Decode(
50       DECL_EXTERNAL_CODECS_LOC_VARS
51       IInStream *inStream,
52       UInt64 startPos,
53       const UInt64 *packSizes,
54       const CFolder &folder,
55       ISequentialOutStream *outStream,
56       ICompressProgressInfo *compressProgress
57       #ifndef _NO_CRYPTO
58       , ICryptoGetTextPassword *getTextPasswordSpec, bool &passwordIsDefined
59       #endif
60       #if !defined(_7ZIP_ST) && !defined(_SFX)
61       , bool mtMode, UInt32 numThreads
62       #endif
63       );
64 };
65 
66 }}
67 
68 #endif
69