A Dart implementation of a bloom filter. Bloom filters are a space-efficient probabilistic data structure that is used to test whether an element is a member of a set.
final items = [
'roti',
'kapda',
'makaan',
'credit card',
'wifi',
'snacks',
'ghar ki roti',
'bahar ki boti'
];
final bloomy = BloomFilter.murmur(10, 0.001, 12345);
for (String item in items) {
print('Before Adding: is $item added? ${bloomy.contains(item: item)}');
bloomy.add(item: item);
print('After Adding: is $item added? ${bloomy.contains(item: item)}');
}
- Supports false positive probability control
- Supports Murmur hash
- Supports Serialization