Copyright © 2018-2020 Maxim Molchanov
Version: 2.1.0
Authors: Maxim Molchanov (m.molchanov@vonmo.com).
erbloom is a safe and fast Bloom filter (Including Forgetful filters and False Positive Rate option) for Erlang/Elixir
Updated: May 25 2020
rebar.conf:
{erbloom, "2.1.0-rc.0"}
or
{erbloom, ".*", {git, "https://github.com/Vonmo/erbloom.git", {tag, "v2.1.0"}}}
erlang.mk:
dep_erbloom = hex 2.1.0-rc.0
mix.exs:
{:erbloom, "~> 2.1.0-rc.0"}
Now you can create a new filter instance:
{ok, Filter} = bloom:new(9585059,1000000).
or filter with wanted rate of false positives: bloom:new_optimal(1000000, 0.55).
Create a new forgetful filter:
{ok, Filter} = bloom:new_forgetful(BitmapSize, ItemsCount, NumFilters, RotateAfter).
or with fp_rate: bloom:new_forgetful_optimal(ItemsCount, NumFilters, RotateAfter, FpRate).
Set a new element:
ok | true = bloom:set(Filter, "somekey").
Check up element:
true | false = bloom:check(Filter, "anotherkey").
Serialize:
{ok, Binary} = bloom:serialize(Filter).
Deserialize:
bloom:deserialize(Binary).
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
make doc - generate documentation from EDoc
Generated by EDoc