Expand description
Unified non-cryptographic hash functions for performance-sensitive crates.
The crate exposes three small, dependency-free building blocks:
fnvfor stable FNV-1a hashing, including the flashsieve-compatible two-byte fast path.splitmixfor high-quality seed finalization and compact pair hashing.wyhashfor fast bulk hashing of arbitrary byte slices.blake3_hashfor stable, content-addressed streaming hashing using BLAKE3.
§Examples
use hashkit::{bloom_hash_pair, hash_to_index};
let (h1, h2) = bloom_hash_pair(b'a', b'b');
let slot = hash_to_index(h1 ^ h2, 1024);
assert!(slot < 1024);Modules§
- blake3_
hash - BLAKE3 content hashing for deduplication and stability.
- fnv
- FNV-1a hashing helpers.
- splitmix
SplitMix64finalization helpers.- wyhash
WyHashbulk hashing.
Functions§
- bloom_
hash_ pair - Returns the two hash functions used for double-hashed bloom filter probes.
- hash_
to_ index - Reduces a hash into a bit index.