bloom2 0.5.1

Fast, compressed, 2-level bloom filter and bitmap
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Bitmap implementations for the backing storage of a [`Bloom2`](crate::Bloom2).

mod compressed_bitmap;
mod vec;
pub use compressed_bitmap::*;
pub use vec::*;

#[inline(always)]
pub(crate) fn bitmask_for_key(key: usize) -> usize {
    1 << (key % (u64::BITS as usize))
}

#[inline(always)]
pub(crate) fn index_for_key(key: usize) -> usize {
    key / (u64::BITS as usize)
}