broomfilter 0.1.4

A bloom filter that sweeps away your certainty. Probably.
Documentation
1
2
3
4
5
6
7
8
9
10
use xxhash_rust::xxh3::xxh3_128;

#[inline]
pub fn hash(value: &[u8]) -> (u64, u64) {
    let h128 = xxh3_128(value);
    let h1 = h128 as u64;
    let mut h2 = (h128 >> 64) as u64;
    h2 |= 1;
    (h1, h2)
}