1 // 7zDecode.h 2 3 #ifndef __7Z_DECODE_H 4 #define __7Z_DECODE_H 5 6 #include "../Common/CoderMixer2.h" 7 8 #include "7zIn.h" 9 10 namespace NArchive { 11 namespace N7z { 12 13 struct CBindInfoEx: public NCoderMixer2::CBindInfo 14 { 15 CRecordVector<CMethodId> CoderMethodIDs; 16 ClearCBindInfoEx17 void Clear() 18 { 19 CBindInfo::Clear(); 20 CoderMethodIDs.Clear(); 21 } 22 }; 23 24 class CDecoder 25 { 26 bool _bindInfoPrev_Defined; 27 CBindInfoEx _bindInfoPrev; 28 29 bool _useMixerMT; 30 31 #ifdef USE_MIXER_ST 32 NCoderMixer2::CMixerST *_mixerST; 33 #endif 34 35 #ifdef USE_MIXER_MT 36 NCoderMixer2::CMixerMT *_mixerMT; 37 #endif 38 39 NCoderMixer2::CMixer *_mixer; 40 CMyComPtr<IUnknown> _mixerRef; 41 42 public: 43 44 CDecoder(bool useMixerMT); 45 46 HRESULT Decode( 47 DECL_EXTERNAL_CODECS_LOC_VARS 48 IInStream *inStream, 49 UInt64 startPos, 50 const CFolders &folders, unsigned folderIndex, 51 const UInt64 *unpackSize // if (!unpackSize), then full folder is required 52 // if (unpackSize), then only *unpackSize bytes from folder are required 53 54 , ISequentialOutStream *outStream 55 , ICompressProgressInfo *compressProgress 56 57 , ISequentialInStream **inStreamMainRes 58 , bool &dataAfterEnd_Error 59 60 _7Z_DECODER_CRYPRO_VARS_DECL 61 62 #if !defined(_7ZIP_ST) 63 , bool mtMode, UInt32 numThreads, UInt64 memUsage 64 #endif 65 ); 66 }; 67 68 }} 69 70 #endif 71