go-bloom
go-bloom copied to clipboard
feature request: allow serialization/deserialization of filters
It would be great if the API provided a way to let the save a bloomfilter on disk and naturally also restore it. That isn't currently possible now, right?
If you agree to have this feature added, do you have any implementation suggestions?
Sorry for the delay in responding.
No, it's not currently possible, but that sounds reasonable. I think the easiest way will be to let you retrieve and set the underlying bitset (https://github.com/pmylund/go-bitset/blob/master/bitset32.go#L27), which should be gob-able. I will try to add this, and an example, within a few days.