Skip to content
Safe and Fast Bloom Filter for Erlang
Erlang Rust Makefile Dockerfile Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
crates/bloom
imgs/base
priv
src
test
.gitignore
LICENSE
Makefile
README.md
docker-compose.yml
docker.mk
rebar.config
rebar.lock

README.md

erbloom

Safe and Fast Bloom Filter for Erlang

Without docker you must install erlang >=20.1 and rust >=1.23 on your machine. After you can run these goals:

release: rebar3 as prod release

test: rebar3 as test ct

In Docker enviroment:

  • make build_imgs - build docker images
  • make up - run sandbox
  • make down - terminate sandbox
  • make tests - run tests
  • make lint - linter
  • make xref - xref analysis
  • make prod - generate release for target

Using as a lib

  1. Add deps in rebar.conf:
{deps, [
    {erbloom, ".*", {git, "https://github.com/Vonmo/erbloom.git", {tag, "1.0.0"}}}      
]}
  1. Now you can create a new filter instance: {ok, Filter} = bloom:new(9585059,1000000).
  2. Set a new element bloom:set(Filter, "somekey").
  3. Check up element bloom:check(Filter, "anotherkey").
  4. Serialize {ok,{Bitmap,NumBits,NumFuns,{Sv00,Sv01},{Sv10,Sv11}}} = bloom:serialize(Filter).
  5. Deserialize bloom:deserialize(Bitmap,NumBits,NumFuns,Sv00,Sv01,Sv10,Sv11).
You can’t perform that action at this time.