go-bloom icon indicating copy to clipboard operation
go-bloom copied to clipboard

feature request: allow serialization/deserialization of filters

Open nictuku opened this issue 11 years ago • 1 comments

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?

nictuku avatar Apr 27 '13 21:04 nictuku

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.

patrickmn avatar May 07 '13 07:05 patrickmn