mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-07 03:15:00 -06:00
Make zstd:long behave like in zstd cli
- adjust version information to current date - maybe I release this as the next version
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
#define MY_VERSION_CPU MY_VERSION
|
||||
#endif
|
||||
|
||||
#define MY_DATE "2018-10-28"
|
||||
#define MY_DATE "2018-11-17"
|
||||
#undef MY_COPYRIGHT
|
||||
#undef MY_VERSION_COPYRIGHT_DATE
|
||||
#define MY_AUTHOR_NAME "Igor Pavlov, Tino Reichardt"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#define MY_VER_BUILD 0
|
||||
#define MY_VERSION_NUMBERS "1.3.7 R3"
|
||||
#define MY_VERSION MY_VERSION_NUMBERS
|
||||
#define MY_DATE "2018-10-28"
|
||||
#define MY_DATE "2018-11-17"
|
||||
#undef MY_COPYRIGHT
|
||||
#undef MY_VERSION_COPYRIGHT_DATE
|
||||
#define MY_AUTHOR_NAME "Tino Reichardt"
|
||||
|
||||
@@ -23,7 +23,7 @@ CEncoder::CEncoder():
|
||||
_processedIn(0),
|
||||
_processedOut(0),
|
||||
_numThreads(NWindows::NSystem::GetNumberOfProcessors()),
|
||||
_Long(1),
|
||||
_Long(-1),
|
||||
_Strategy(-1),
|
||||
_WindowLog(-1),
|
||||
_HashLog(-1),
|
||||
@@ -139,14 +139,18 @@ STDMETHODIMP CEncoder::SetCoderProperties(const PROPID * propIDs, const PROPVARI
|
||||
}
|
||||
case NCoderPropID::kLong:
|
||||
{
|
||||
/* not exact like --long in zstd cli program */
|
||||
if (v == 0) _Long = 0; // disable
|
||||
else if (v == 1) _Long = 1; // just enable
|
||||
else if (v >= 10 && v <= ZSTD_WINDOWLOG_MAX) {
|
||||
// enable and resize WindowLog
|
||||
_Long = 1;
|
||||
_WindowLog = v;
|
||||
} else return E_INVALIDARG;
|
||||
/* exact like --long in zstd cli program */
|
||||
if (v == 0) {
|
||||
// m0=zstd:long:tlen=x
|
||||
_Long = 1;
|
||||
_WindowLog = 27;
|
||||
} else if (v < 10) {
|
||||
_Long = 1;
|
||||
_WindowLog = 10;
|
||||
} else if (v > ZSTD_WINDOWLOG_MAX) {
|
||||
_Long = 1;
|
||||
_WindowLog = ZSTD_WINDOWLOG_MAX;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NCoderPropID::kLdmHashLog:
|
||||
|
||||
Reference in New Issue
Block a user