Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Load bloom filter from bytes (instead of loading from file) #44

Open
jonsnowseven opened this issue Dec 4, 2020 · 2 comments
Open

Load bloom filter from bytes (instead of loading from file) #44

jonsnowseven opened this issue Dec 4, 2020 · 2 comments

Comments

@jonsnowseven
Copy link

Hello.

Is there a way to load a Bloom Filter from bytes instead of loading from a file? The advantage is that we do not need to download a file to load a Bloom Filter.

Thank you in advance.

@jonsnowseven
Copy link
Author

I ended up doing a workaround:

import io
import pybloom_live

with open(<bloomfilter_file>, "rb") as f:
    bytes_io = io.BytesIO(f.read())

pybloom_live.BloomFilter.fromfile(bytes_io)

@yankun1992
Copy link

Maybe you can try fastbloom. A super fast bloom filter | counting bloom filter implemented by Rust for Python!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants