Skip to main content

Crate subms_bloom_filter

Crate subms_bloom_filter 

Source
Expand description

Minimal bloom filter - standalone, reusable, zero-dependency.

Standard double-hashed bloom filter: FNV-1a 64-bit produces two 32-bit subhashes for the double-hashing trick. Sizing defaults to ~10 bits per key and k=7, which gives ~1% false-positive rate. Suitable as a building block for other cookbook samples (LSM tree SSTables, in particular).

The on-disk layout is fixed and language-agnostic:

bit_count: u32 (big-endian)
k:         u32 (big-endian)
words:     u32 (big-endian) - number of u64 words
bits:      (u64 big-endian) * words

Structsยง

BloomFilter