misc/libphysfs/lzma/CPP/7zip/Archive/7z/7zCompressionMode.h
branchui-scaling
changeset 15283 c4fd2813b127
parent 13390 0135e64c6c66
parent 15279 7ab5cf405686
child 15663 d92eeb468dad
equal deleted inserted replaced
13390:0135e64c6c66 15283:c4fd2813b127
     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