hashLog3 added to ZSTD_CCtx

This commit is contained in:
inikep
2016-03-23 15:53:38 +01:00
parent 472638c861
commit 7adceef974
6 changed files with 25 additions and 12 deletions
+3 -2
View File
@@ -196,17 +196,18 @@ MEM_STATIC void ZSTD_updatePrice(seqStore_t* seqStorePtr, U32 litLength, const B
static U32 ZSTD_insertAndFindFirstIndexHash3 (ZSTD_CCtx* zc, const BYTE* ip)
{
U32* const hashTable3 = zc->hashTable3;
U32 const hashLog3 = zc->hashLog3;
const BYTE* const base = zc->base;
const U32 target = (U32)(ip - base);
U32 idx = zc->nextToUpdate3;
while(idx < target) {
hashTable3[ZSTD_hash3Ptr(base+idx, HASHLOG3)] = idx;
hashTable3[ZSTD_hash3Ptr(base+idx, hashLog3)] = idx;
idx++;
}
zc->nextToUpdate3 = target;
return hashTable3[ZSTD_hash3Ptr(ip, HASHLOG3)];
return hashTable3[ZSTD_hash3Ptr(ip, hashLog3)];
}