jasondavies/bloomfilter.js

Create function to serialize/deserialize bloom filter

Glench opened this issue · 1 comments

Given the standalone nature of your bloomfilter, I was wondering if it would make sense to serialize/deserialize the bloomfilter bytearray/array.

My use case is that I'm trying to send a dictionary to the front-end to see if words the user types in are in it. I thought it might be faster/smaller to store the dictionary in a bloomfilter.

Another good idea, thanks! We either need to allow a bloom filter to be constructed for a given byte array, or add serialisation/deserialisation support directly. A byte array is preferable, so that you could use any encoding you wanted over the wire (base64 &c.)