7zDecode.h 1.4 KB

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