Lines Matching defs:hash

30  * Initializes the rolling hash state such that it will honor the
43 * In the gear hash algorithm, bit n depends on the last n bytes;
55 /* In this degenerate case we simply honor the hash rate. */
61 * Feeds [data, data + minMatchLength) into the hash without registering any
62 * splits. This effectively resets the hash state. This is used when skipping
68 U64 hash = state->rolling;
72 hash = (hash << 1) + ZSTD_ldm_gearTab[data[n] & 0xff]; \
101 U64 hash, mask;
103 hash = state->rolling;
108 hash = (hash << 1) + ZSTD_ldm_gearTab[data[n] & 0xff]; \
110 if (UNLIKELY((hash & mask) == 0)) { \
131 state->rolling = hash;
171 * Returns a pointer to the start of the bucket associated with hash. */
173 ldmState_t* ldmState, size_t hash, ldmParams_t const ldmParams)
175 return ldmState->hashTable + (hash << ldmParams.bucketSizeLog);
179 * Insert the entry with corresponding hash into the hash table */
181 size_t const hash, const ldmEntry_t entry,
184 BYTE* const pOffset = ldmState->bucketOffsets + hash;
187 *(ZSTD_ldm_getBucket(ldmState, hash, ldmParams) + offset) = entry;
293 U32 const hash = (U32)(xxhash & (((U32)1 << hBits) - 1));
298 ZSTD_ldm_insertEntry(ldmState, hash, entry, *params);
345 /* Rolling hash state */
355 /* Initialize the rolling hash state with the first minMatchLength bytes */
371 U32 const hash = (U32)(xxhash & (((U32)1 << hBits) - 1));
374 candidates[n].hash = hash;
376 candidates[n].bucket = ZSTD_ldm_getBucket(ldmState, hash, *params);
386 U32 const hash = candidates[n].hash;
396 * the previous one, we merely register it in the hash table and
399 ZSTD_ldm_insertEntry(ldmState, hash, newEntry, *params);
443 /* No match found -- insert an entry into the hash table
446 ZSTD_ldm_insertEntry(ldmState, hash, newEntry, *params);
465 /* Insert the current entry into the hash table --- it must be
467 ZSTD_ldm_insertEntry(ldmState, hash, newEntry, *params);