updated the _extDict variant of double fast

This commit is contained in:
Yann Collet 2019-07-12 14:17:17 -07:00
parent e8a7f5d3ce
commit eaeb7f00b5

View File

@ -463,20 +463,12 @@ static size_t ZSTD_compressBlock_doubleFast_extDict_generic(
/* Complementary insertion */ /* Complementary insertion */
/* done after iLimit test, as candidates could be > iend-8 */ /* done after iLimit test, as candidates could be > iend-8 */
{ U32 const indexToInsert = current+2; { U32 const indexToInsert = current+2;
hashLong[ZSTD_hashPtr(base+indexToInsert, hBitsL, 8)] = hashLong[ZSTD_hashPtr(base+indexToInsert, hBitsL, 8)] = indexToInsert;
hashSmall[ZSTD_hashPtr(base+indexToInsert, hBitsS, mls)] = hashLong[ZSTD_hashPtr(ip-2, hBitsL, 8)] = (U32)(ip-2-base);
indexToInsert; hashSmall[ZSTD_hashPtr(base+indexToInsert, hBitsS, mls)] = indexToInsert;
} hashSmall[ZSTD_hashPtr(ip-1, hBitsS, mls)] = (U32)(ip-1-base);
{ const BYTE* const ipToInsert = ip - 2;
hashLong[ZSTD_hashPtr(ipToInsert, hBitsL, 8)] =
hashSmall[ZSTD_hashPtr(ipToInsert, hBitsS, mls)] =
(U32)(ipToInsert-base);
}
{ const BYTE* const ipToInsert = ip - 1;
hashLong[ZSTD_hashPtr(ipToInsert, hBitsL, 8)] =
hashSmall[ZSTD_hashPtr(ipToInsert, hBitsS, mls)] =
(U32)(ipToInsert-base);
} }
/* check immediate repcode */ /* check immediate repcode */
while (ip <= ilimit) { while (ip <= ilimit) {
U32 const current2 = (U32)(ip-base); U32 const current2 = (U32)(ip-base);