jasondavies / bloomfilter.js

JavaScript bloom filter using FNV for fast hashing
http://www.jasondavies.com/bloomfilter/
BSD 3-Clause "New" or "Revised" License
759 stars 79 forks source link

contrib/ directory containing Python version? #12

Closed purplerails closed 9 years ago

purplerails commented 9 years ago

Hi Jason,

Great library! Thanks for writing this.

I needed to send Bloom filters to and from my webapp frontend to the Python backend (i.e., do add() in JS and test() in Python and the reverse). I ended up porting bloomfilter.js to Python by doing a line-by-line translation. Maybe I missed a note in the docs about an easier way? :)

If you're interested I can send a pull-request with a contrib/ directory with the Python version. It's a little hacky, because I used a C module to get Javascript numeric semantics (modulo and arithmetic are different in Python than Javascript).

Let me know.

Ranga

purplerails commented 9 years ago

I see that rasky has a PR with a pure-Python implementation. Closing this issue. I'll probably adopt that if/when it gets merged in.

tumist commented 9 years ago

https://github.com/tumist/pybloomfilterjs