mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-07 07:14:56 -06:00
Update to 7-Zip 17.01 Beta from Igor Pavlov
- Minor speed optimization for LZMA2 (xz and 7z) multi-threading compression.
7-Zip now uses additional memory buffers for multi-block LZMA2 compression.
CPU utilization was slightly improved.
- 7-zip now creates multi-block xz archives by default. Block size can be
specified with -ms[Size]{m|g} switch.
- xz decoder now can unpack random block from multi-block xz archives. 7-Zip
File Manager now can open nested multi-block xz archives (for example,
image.iso.xz) without full unpacking of xz archive.
- 7-Zip now can create zip archives from stdin to stdout.
- 7-Zip command line: @listfile now doesn't work after -- switch. Use
-i@listfile before -- switch instead.
fixed bugs:
- 7-Zip could add unrequired alternate file streams to WIM archives, for
commands that contain filename wildcards and -sns switch.
- 7-Zip 17.00 beta crashed for commands that write anti-item to 7z archive.
- 7-Zip 17.00 beta ignored "Use large memory pages" option.
This commit is contained in:
47
C/LzFind.c
47
C/LzFind.c
@@ -1,5 +1,5 @@
|
||||
/* LzFind.c -- Match finder for LZ algorithms
|
||||
2017-04-03 : Igor Pavlov : Public domain */
|
||||
2017-06-10 : Igor Pavlov : Public domain */
|
||||
|
||||
#include "Precomp.h"
|
||||
|
||||
@@ -142,6 +142,7 @@ void MatchFinder_Construct(CMatchFinder *p)
|
||||
p->bufferBase = NULL;
|
||||
p->directInput = 0;
|
||||
p->hash = NULL;
|
||||
p->expectedDataSize = (UInt64)(Int64)-1;
|
||||
MatchFinder_SetDefaultSettings(p);
|
||||
|
||||
for (i = 0; i < 256; i++)
|
||||
@@ -208,7 +209,11 @@ int MatchFinder_Create(CMatchFinder *p, UInt32 historySize,
|
||||
hs = (1 << 16) - 1;
|
||||
else
|
||||
{
|
||||
hs = historySize - 1;
|
||||
hs = historySize;
|
||||
if (hs > p->expectedDataSize)
|
||||
hs = (UInt32)p->expectedDataSize;
|
||||
if (hs != 0)
|
||||
hs--;
|
||||
hs |= (hs >> 1);
|
||||
hs |= (hs >> 2);
|
||||
hs |= (hs >> 4);
|
||||
@@ -292,17 +297,33 @@ static void MatchFinder_SetLimits(CMatchFinder *p)
|
||||
p->posLimit = p->pos + limit;
|
||||
}
|
||||
|
||||
void MatchFinder_Init_2(CMatchFinder *p, int readData)
|
||||
|
||||
void MatchFinder_Init_LowHash(CMatchFinder *p)
|
||||
{
|
||||
size_t i;
|
||||
CLzRef *items = p->hash;
|
||||
size_t numItems = p->fixedHashSize;
|
||||
for (i = 0; i < numItems; i++)
|
||||
items[i] = kEmptyHashValue;
|
||||
}
|
||||
|
||||
|
||||
void MatchFinder_Init_HighHash(CMatchFinder *p)
|
||||
{
|
||||
size_t i;
|
||||
CLzRef *items = p->hash + p->fixedHashSize;
|
||||
size_t numItems = (size_t)p->hashMask + 1;
|
||||
for (i = 0; i < numItems; i++)
|
||||
items[i] = kEmptyHashValue;
|
||||
}
|
||||
|
||||
|
||||
void MatchFinder_Init_3(CMatchFinder *p, int readData)
|
||||
{
|
||||
UInt32 i;
|
||||
UInt32 *hash = p->hash;
|
||||
UInt32 num = p->hashSizeSum;
|
||||
for (i = 0; i < num; i++)
|
||||
hash[i] = kEmptyHashValue;
|
||||
|
||||
p->cyclicBufferPos = 0;
|
||||
p->buffer = p->bufferBase;
|
||||
p->pos = p->streamPos = p->cyclicBufferSize;
|
||||
p->pos =
|
||||
p->streamPos = p->cyclicBufferSize;
|
||||
p->result = SZ_OK;
|
||||
p->streamEndWasReached = 0;
|
||||
|
||||
@@ -312,10 +333,14 @@ void MatchFinder_Init_2(CMatchFinder *p, int readData)
|
||||
MatchFinder_SetLimits(p);
|
||||
}
|
||||
|
||||
|
||||
void MatchFinder_Init(CMatchFinder *p)
|
||||
{
|
||||
MatchFinder_Init_2(p, True);
|
||||
MatchFinder_Init_HighHash(p);
|
||||
MatchFinder_Init_LowHash(p);
|
||||
MatchFinder_Init_3(p, True);
|
||||
}
|
||||
|
||||
|
||||
static UInt32 MatchFinder_GetSubValue(CMatchFinder *p)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user