misc/libphysfs/lzma/CPP/7zip/Archive/7z/7zCompressionMode.h
changeset 13904 99b265e0d1d0
parent 13903 5f819b90d479
child 13905 b172a5d40eee
equal deleted inserted replaced
13903:5f819b90d479 13904:99b265e0d1d0
     1 // 7zCompressionMode.h
       
     2 
       
     3 #ifndef __7Z_COMPRESSION_MODE_H
       
     4 #define __7Z_COMPRESSION_MODE_H
       
     5 
       
     6 #include "../../../Common/MyString.h"
       
     7 
       
     8 #include "../../../Windows/PropVariant.h"
       
     9 
       
    10 #include "../../Common/MethodProps.h"
       
    11 
       
    12 namespace NArchive {
       
    13 namespace N7z {
       
    14 
       
    15 struct CMethodFull: public CMethod
       
    16 {
       
    17   UInt32 NumInStreams;
       
    18   UInt32 NumOutStreams;
       
    19   bool IsSimpleCoder() const { return (NumInStreams == 1) && (NumOutStreams == 1); }
       
    20 };
       
    21 
       
    22 struct CBind
       
    23 {
       
    24   UInt32 InCoder;
       
    25   UInt32 InStream;
       
    26   UInt32 OutCoder;
       
    27   UInt32 OutStream;
       
    28 };
       
    29 
       
    30 struct CCompressionMethodMode
       
    31 {
       
    32   CObjectVector<CMethodFull> Methods;
       
    33   CRecordVector<CBind> Binds;
       
    34   #ifdef COMPRESS_MT
       
    35   UInt32 NumThreads;
       
    36   #endif
       
    37   bool PasswordIsDefined;
       
    38   UString Password;
       
    39 
       
    40   bool IsEmpty() const { return (Methods.IsEmpty() && !PasswordIsDefined); }
       
    41   CCompressionMethodMode(): PasswordIsDefined(false)
       
    42       #ifdef COMPRESS_MT
       
    43       , NumThreads(1) 
       
    44       #endif
       
    45   {}
       
    46 };
       
    47 
       
    48 }}
       
    49 
       
    50 #endif