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

Possible to serialize? #16

Open devinus opened 9 years ago

devinus commented 9 years ago

We're wondering if we can store the filter somehow for use later.

TDA commented 9 years ago

@devinus

var array = [].slice.call(bloom.buckets),
      json = JSON.stringify(array);

should work for serialization. Take a look at https://github.com/mozilla/fxa-password-strength-checker for a stored filter.