7zCompressionMode.h 925 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // 7zCompressionMode.h
  2. #ifndef __7Z_COMPRESSION_MODE_H
  3. #define __7Z_COMPRESSION_MODE_H
  4. #include "../../../Common/MyString.h"
  5. #include "../../../Windows/PropVariant.h"
  6. #include "../../Common/MethodProps.h"
  7. namespace NArchive {
  8. namespace N7z {
  9. struct CMethodFull: public CMethod
  10. {
  11. UInt32 NumInStreams;
  12. UInt32 NumOutStreams;
  13. bool IsSimpleCoder() const { return (NumInStreams == 1) && (NumOutStreams == 1); }
  14. };
  15. struct CBind
  16. {
  17. UInt32 InCoder;
  18. UInt32 InStream;
  19. UInt32 OutCoder;
  20. UInt32 OutStream;
  21. };
  22. struct CCompressionMethodMode
  23. {
  24. CObjectVector<CMethodFull> Methods;
  25. CRecordVector<CBind> Binds;
  26. #ifdef COMPRESS_MT
  27. UInt32 NumThreads;
  28. #endif
  29. bool PasswordIsDefined;
  30. UString Password;
  31. bool IsEmpty() const { return (Methods.IsEmpty() && !PasswordIsDefined); }
  32. CCompressionMethodMode(): PasswordIsDefined(false)
  33. #ifdef COMPRESS_MT
  34. , NumThreads(1)
  35. #endif
  36. {}
  37. };
  38. }}
  39. #endif