mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-06 15:14:59 -06:00
Fix x86 warning and improve progress updates
This commit is contained in:
@@ -181,7 +181,7 @@ HRESULT CFastEncoder::FastLzma2::SetCoderProperties(const PROPID *propIDs, const
|
||||
if (!dictSize) {
|
||||
dictSize = (UInt32)FL2_CCtx_getParameter(fcs, FL2_p_dictionarySize);
|
||||
}
|
||||
size_t reduceSize = lzma2Props.lzmaProps.reduceSize;
|
||||
UInt64 reduceSize = lzma2Props.lzmaProps.reduceSize;
|
||||
reduceSize += (reduceSize < (UInt64)-1); /* prevent extra buffer shift after read */
|
||||
dictSize = (UInt32)min(dictSize, reduceSize);
|
||||
dictSize = max(dictSize, FL2_DICTSIZE_MIN);
|
||||
@@ -242,9 +242,12 @@ HRESULT CFastEncoder::FastLzma2::AddByteCount(size_t count, ISequentialOutStream
|
||||
CHECK_H(WaitAndReport(res, progress));
|
||||
if (res != 0)
|
||||
CHECK_H(WriteBuffers(outStream));
|
||||
do {
|
||||
res = FL2_getDictionaryBuffer(fcs, &dict);
|
||||
} while (FL2_isTimedOut(res));
|
||||
while (FL2_isTimedOut(res)) {
|
||||
if (!UpdateProgress(progress))
|
||||
return S_FALSE;
|
||||
res = FL2_getDictionaryBuffer(fcs, &dict);
|
||||
}
|
||||
CHECK_S(res);
|
||||
dict_pos = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user