Lines Matching defs:hash
200 #define ZSTD_ROW_HASH_CACHE_SIZE 8 /* Size of prefetching hash cache for row-based matchfinder */
246 U32 hash;
840 * Add the buffer to the hash value.
842 static U64 ZSTD_rollingHash_append(U64 hash, void const* buf, size_t size)
847 hash *= prime8bytes;
848 hash += istart[pos] + ZSTD_ROLL_HASH_CHAR_OFFSET;
850 return hash;
854 * Compute the rolling hash value of the buffer.
862 * Compute the primePower to be passed to ZSTD_rollingHash_rotate() for a hash
871 * Rotate the rolling hash by one byte.
873 MEM_STATIC U64 ZSTD_rollingHash_rotate(U64 hash, BYTE toRemove, BYTE toAdd, U64 primePower)
875 hash -= (toRemove + ZSTD_ROLL_HASH_CHAR_OFFSET) * primePower;
876 hash *= prime8bytes;
877 hash += toAdd + ZSTD_ROLL_HASH_CHAR_OFFSET;
878 return hash;