pub fn insert(bitset: &mut [u8], hash: u64) {
    let block_index = hash_to_block_index(hash, bitset.len());
    let key = hash as u32;

    let mask = new_mask(key);
    let slice = &bitset[block_index * 32..(block_index + 1) * 32];
    let mut block_mask = load_block(slice);

    for i in 0..8 {
        block_mask[i] |= mask[i];

        let mut_slice = &mut bitset[block_index * 32..(block_index + 1) * 32];
        unload_block(block_mask, mut_slice)
    }
}
/// Inserts a new hash to the set
Inserts a new hash to the set
Inserts a new hash to the set
pub fn insert(bitset: &mut [u8], hash: u64) {
    let block_index = hash_to_block_index(hash, bitset.len());
    let key = hash as u32;
    let mask = new_mask(key);
    let slice = &bitset[block_index * 32..(block_index + 1) * 32];
    let mut block_mask = load_block(slice);
    for i in 0..8 {
        block_mask[i] |= mask[i];
        let mut_slice = &mut bitset[block_index * 32..(block_index + 1) * 32];
        unload_block(block_mask, mut_slice)
    }
}
pub fn insert ( bitset : & mut [ u8 ] , hash : u64 ) { let block_index = hash_to_block_index ( hash , bitset . len ( ) ) ; let key = hash as u32 ; let mask = new_mask ( key ) ; let slice = & bitset [ block_index * 32 .. ( block_index + 1 ) * 32 ] ; let mut block_mask = load_block ( slice ) ; for i in 0 .. 8 { block_mask [ i ] |= mask [ i ] ; let mut_slice = & mut bitset [ block_index * 32 .. ( block_index + 1 ) * 32 ] ; unload_block ( block_mask , mut_slice ) } }
Inserts a new hash to the set
Inserts a new hash to the set
bitset
&mut [u8]
hash
u64