Пример #1
0
// Has checks if the item is in the Filter.
func (cf *FilterL) Has(b []byte) bool {
	return cf.f64.has(xxHash64.Checksum(b, seed), fpValueL(b))
}
Пример #2
0
// Delete removes an item from the Filter and returns whether or not it was present.
// To delete an item safely it must have been previously inserted.
func (cf *FilterL) Delete(b []byte) bool {
	return cf.f64.delete(xxHash64.Checksum(b, seed), fpValueL(b))
}
Пример #3
0
// Insert add an item to the Filter and returns whether it was inserted or not.
//
// NB. The same item cannot be inserted more than 2 times.
func (cf *FilterL) Insert(b []byte) bool {
	return cf.f64.insert(xxHash64.Checksum(b, seed), fpValueL(b))
}