aboutsummaryrefslogtreecommitdiff
path: root/CPP/7zip/Common/MethodProps.h
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/7zip/Common/MethodProps.h')
-rw-r--r--CPP/7zip/Common/MethodProps.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/CPP/7zip/Common/MethodProps.h b/CPP/7zip/Common/MethodProps.h
index 3c332d6..be108fa 100644
--- a/CPP/7zip/Common/MethodProps.h
+++ b/CPP/7zip/Common/MethodProps.h
@@ -80,7 +80,11 @@ struct CProps
80 } 80 }
81 81
82 HRESULT SetCoderProps(ICompressSetCoderProperties *scp, const UInt64 *dataSizeReduce = NULL) const; 82 HRESULT SetCoderProps(ICompressSetCoderProperties *scp, const UInt64 *dataSizeReduce = NULL) const;
83 HRESULT SetCoderProps_DSReduce_Aff(ICompressSetCoderProperties *scp, const UInt64 *dataSizeReduce, const UInt64 *affinity) const; 83 HRESULT SetCoderProps_DSReduce_Aff(ICompressSetCoderProperties *scp,
84 const UInt64 *dataSizeReduce,
85 const UInt64 *affinity,
86 const UInt32 *affinityGroup,
87 const UInt64 *affinityInGroup) const;
84}; 88};
85 89
86class CMethodProps: public CProps 90class CMethodProps: public CProps
@@ -125,7 +129,7 @@ public:
125 129
126 UInt32 Get_Lzma_Algo() const 130 UInt32 Get_Lzma_Algo() const
127 { 131 {
128 int i = FindProp(NCoderPropID::kAlgorithm); 132 const int i = FindProp(NCoderPropID::kAlgorithm);
129 if (i >= 0) 133 if (i >= 0)
130 { 134 {
131 const NWindows::NCOM::CPropVariant &val = Props[(unsigned)i].Value; 135 const NWindows::NCOM::CPropVariant &val = Props[(unsigned)i].Value;
@@ -141,11 +145,11 @@ public:
141 if (Get_DicSize(v)) 145 if (Get_DicSize(v))
142 return v; 146 return v;
143 const unsigned level = GetLevel(); 147 const unsigned level = GetLevel();
144 const UInt32 dictSize = 148 const UInt32 dictSize = level <= 4 ?
145 ( level <= 3 ? ((UInt32)1 << (level * 2 + 16)) : 149 (UInt32)1 << (level * 2 + 16) :
146 ( level <= 6 ? ((UInt32)1 << (level + 19)) : 150 level <= sizeof(size_t) / 2 + 4 ?
147 ( level <= 7 ? ((UInt32)1 << 25) : ((UInt32)1 << 26) 151 (UInt32)1 << (level + 20) :
148 ))); 152 (UInt32)1 << (sizeof(size_t) / 2 + 24);
149 return dictSize; 153 return dictSize;
150 } 154 }
151 155