A NIF wrapper around a basic bloom filter.
C++ Erlang Makefile C
Latest commit 43f0eb8 Oct 3, 2016 @kesslerm kesslerm committed on GitHub Merge pull request #13 from kesslerm/fix/otp-warnings
Use erlang:nif_error/1 in nif wrapper
Permalink
Failed to load latest commit information.
c_src Fix deserialize(). Jan 6, 2012
ebin Roll ebloom version 2.0 Apr 11, 2014
src Use erlang:nif_error/1 in nif wrapper Sep 17, 2016
.gitignore Add basic .gitignore Feb 26, 2011
.hgignore Adding ignore file Mar 24, 2010
.hgtags Added tag ebloom-1.0.2 for changeset 7795a460823c Sep 22, 2010
.travis.yml
Makefile
README.org
rebar update rebar to 2.0.0 Aug 16, 2012
rebar.config No longer export from case. Oct 14, 2015
tools.mk Update tools.mk Jan 16, 2014

README.org

ebloom

Overview

Travis-CI :: https://secure.travis-ci.org/basho/ebloom.png

ebloom is a NIF wrapper around a basic bloom filter.

Quick Start

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

Contributing

We encourage contributions to ebloom from the community.

  1. Fork the ebloom repository on Github.
  2. Clone your fork or add the remote if you already have a clone of the repository.
git clone git@github.com:yourusername/ebloom.git
# or
git remote add mine git@github.com:yourusername/ebloom.git
  1. Create a topic branch for your change.
git checkout -b some-topic-branch
  1. Make your change and commit. Use a clear and descriptive commit message, spanning multiple lines if detailed explanation is needed.
  2. Push to your fork of the repository and then send a pull-request through Github.
git push mine some-topic-branch
  1. A Basho engineer or community maintainer will review your patch and merge it into the main repository or send you feedback.