From: Yann Collet Date: Fri, 12 Jul 2019 21:17:17 +0000 (-0700) Subject: updated the _extDict variant of double fast X-Git-Tag: v1.4.1^2~4^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eaeb7f00b5dea51b3e39175cee930bef0b0e16eb;p=thirdparty%2Fzstd.git updated the _extDict variant of double fast --- diff --git a/lib/compress/zstd_double_fast.c b/lib/compress/zstd_double_fast.c index b65fd41e7..5957255d9 100644 --- a/lib/compress/zstd_double_fast.c +++ b/lib/compress/zstd_double_fast.c @@ -463,20 +463,12 @@ static size_t ZSTD_compressBlock_doubleFast_extDict_generic( /* Complementary insertion */ /* done after iLimit test, as candidates could be > iend-8 */ { U32 const indexToInsert = current+2; - hashLong[ZSTD_hashPtr(base+indexToInsert, hBitsL, 8)] = - hashSmall[ZSTD_hashPtr(base+indexToInsert, hBitsS, mls)] = - indexToInsert; - } - { 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); + hashLong[ZSTD_hashPtr(base+indexToInsert, hBitsL, 8)] = indexToInsert; + hashLong[ZSTD_hashPtr(ip-2, hBitsL, 8)] = (U32)(ip-2-base); + hashSmall[ZSTD_hashPtr(base+indexToInsert, hBitsS, mls)] = indexToInsert; + hashSmall[ZSTD_hashPtr(ip-1, hBitsS, mls)] = (U32)(ip-1-base); } + /* check immediate repcode */ while (ip <= ilimit) { U32 const current2 = (U32)(ip-base);