jaybaird / python-bloomfilter

Scalable Bloom Filter implemented in Python
MIT License
1.62k stars 330 forks source link

how to remove element in a scaledbloomfilter? #43

Open nickhuangxinyu opened 3 years ago

nickhuangxinyu commented 3 years ago

I want to remove some elements, so next time add(them) will return false.

is there inner function to do this?

FredWe commented 2 years ago

According to my quick search result, a basic Bloom Filter doesn't support remove operation because adding an element is irreversible in Bloom filter.

For further information, see 1) the wiki page explaining how Bloom Filter works and 2) a StackExchange page discussing how to improve Bloom Filter to make it support delete operation, like using a second bloom filter to store deleted elements, or using Counting Bloom Filter or 3) search some new data structure like "Cuckoo Filter"