mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 10:07:02 -06:00
Add zstd fast levels and update 7z property sizes
- add the "fast compression levels" of zstd via "fast" option (fast=1..64) - change the 7-Zip property sizes of LZ4, LZ5 and Zstandard to 3 - 3 and 5 byte header are valid now (default is 3) - update the Methods-Extern.md file, to reflect the property changes
This commit is contained in:
@@ -507,7 +507,7 @@ HRESULT CHandler::SetMethodToProp(CNum folderIndex, PROPVARIANT *prop) const
|
||||
else if (id == k_LZ4)
|
||||
{
|
||||
name = "LZ4";
|
||||
if (propsSize == 5)
|
||||
if (propsSize == 3 || propsSize == 5)
|
||||
{
|
||||
char *dest = s;
|
||||
*dest++ = 'v';
|
||||
@@ -525,7 +525,7 @@ HRESULT CHandler::SetMethodToProp(CNum folderIndex, PROPVARIANT *prop) const
|
||||
else if (id == k_LZ5)
|
||||
{
|
||||
name = "LZ5";
|
||||
if (propsSize == 5)
|
||||
if (propsSize == 3 || propsSize == 5)
|
||||
{
|
||||
char *dest = s;
|
||||
*dest++ = 'v';
|
||||
@@ -543,9 +543,10 @@ HRESULT CHandler::SetMethodToProp(CNum folderIndex, PROPVARIANT *prop) const
|
||||
else if (id == k_ZSTD)
|
||||
{
|
||||
name = "ZSTD";
|
||||
if (propsSize == 5)
|
||||
if (propsSize == 3 || propsSize == 5)
|
||||
{
|
||||
char *dest = s;
|
||||
UInt32 l = props[2];
|
||||
*dest++ = 'v';
|
||||
ConvertUInt32ToString(props[0], dest);
|
||||
dest += MyStringLen(dest);
|
||||
@@ -553,8 +554,14 @@ HRESULT CHandler::SetMethodToProp(CNum folderIndex, PROPVARIANT *prop) const
|
||||
ConvertUInt32ToString(props[1], dest);
|
||||
dest += MyStringLen(dest);
|
||||
*dest++ = ',';
|
||||
*dest++ = 'l';
|
||||
ConvertUInt32ToString(props[2], dest);
|
||||
if (l <= 22) {
|
||||
*dest++ = 'l';
|
||||
ConvertUInt32ToString(l, dest);
|
||||
} else {
|
||||
*dest++ = 'f';
|
||||
*dest++ = 'l';
|
||||
ConvertUInt32ToString(l - 32, dest);
|
||||
}
|
||||
dest += MyStringLen(dest);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user