Travis-CI ::
ebloom
is a NIF wrapper around a basic bloom filter.
You must have Erlang/OTP R13B04 or later and a GNU-style build
system to compile and run ebloom
.
git clone git://github.com/basho/ebloom.git
cd ebloom
make
Start up an Erlang shell with the path to ebloom
included.
erl -pa path/to/ebloom/ebin
Create a new bloom filter, insert elements, and test for an elements presence.
1> PredictedElementCount=5.
5
2> FalsePositiveProbability=0.01.
3> RandomSeed=123.
123
4> {ok, Ref} = ebloom:new(PredictedElementCount, FalsePositiveProbability, RandomSeed).
{ok,<<>>}
5> ebloom:insert(Ref, <<"abcdef">>).
ok
6> true = ebloom:contains(Ref, <<"abcdef">>).
true
7> false = ebloom:contains(Ref, <<"zzzzzz">>).
false
We encourage contributions to ebloom
from the community.
- Fork the
ebloom
repository on Github. - Clone your fork or add the remote if you already have a clone of the repository.
git clone [email protected]:yourusername/ebloom.git
# or
git remote add mine [email protected]:yourusername/ebloom.git
- Create a topic branch for your change.
git checkout -b some-topic-branch
- Make your change and commit. Use a clear and descriptive commit message, spanning multiple lines if detailed explanation is needed.
- Push to your fork of the repository and then send a pull-request through Github.
git push mine some-topic-branch
- A Basho engineer or community maintainer will review your patch and merge it into the main repository or send you feedback.