Existing Repcode Check Only Applies to noDict Case
This commit is contained in:
parent
8b241da4df
commit
7a25f7ef5b
@ -112,8 +112,8 @@ size_t ZSTD_compressBlock_doubleFast_generic(
|
|||||||
const BYTE* match = base + matchIndexS;
|
const BYTE* match = base + matchIndexS;
|
||||||
hashLong[h2] = hashSmall[h] = current; /* update hash tables */
|
hashLong[h2] = hashSmall[h] = current; /* update hash tables */
|
||||||
|
|
||||||
assert(offset_1 <= current); /* supposed guaranteed by construction */
|
if (dictMode == ZSTD_noDict && ((offset_1 > 0) & (MEM_read32(ip+1-offset_1) == MEM_read32(ip+1)))) {
|
||||||
if ((offset_1 > 0) & (MEM_read32(ip+1-offset_1) == MEM_read32(ip+1))) {
|
assert(offset_1 <= current); /* supposed guaranteed by construction */
|
||||||
/* favor repcode */
|
/* favor repcode */
|
||||||
mLength = ZSTD_count(ip+1+4, ip+1+4-offset_1, iend) + 4;
|
mLength = ZSTD_count(ip+1+4, ip+1+4-offset_1, iend) + 4;
|
||||||
ip++;
|
ip++;
|
||||||
@ -162,7 +162,8 @@ size_t ZSTD_compressBlock_doubleFast_generic(
|
|||||||
hashSmall[ZSTD_hashPtr(ip-2, hBitsS, mls)] = (U32)(ip-2-base);
|
hashSmall[ZSTD_hashPtr(ip-2, hBitsS, mls)] = (U32)(ip-2-base);
|
||||||
|
|
||||||
/* check immediate repcode */
|
/* check immediate repcode */
|
||||||
while ( (ip <= ilimit)
|
while ( dictMode == ZSTD_noDict
|
||||||
|
&& (ip <= ilimit)
|
||||||
&& ( (offset_2>0)
|
&& ( (offset_2>0)
|
||||||
& (MEM_read32(ip) == MEM_read32(ip - offset_2)) )) {
|
& (MEM_read32(ip) == MEM_read32(ip - offset_2)) )) {
|
||||||
/* store sequence */
|
/* store sequence */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user