Skip to content
A simple and small bloom filter implementation in plain C.
Branch: master
Clone or download
Latest commit 07136f9 Feb 18, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
docs Describe branches. Feb 18, 2019
misc A few small performance tests. Feb 18, 2019
murmur2 Initial checkin. Jun 17, 2012
.gitignore
ChangeLog Update ChangeLog date for 1.6. Feb 18, 2019
LICENSE Make the bloom filter minimum capacity be 1000 elements. Jun 8, 2017
Makefile Update date. Feb 18, 2019
README
bloom.c
bloom.h Merge pull request #16 from robguima/master Sep 8, 2018

README

Introduction
------------
This is libbloom, a simple and small bloom filter implementation in C.

If you are reading this you probably already know about bloom filters
and why you might use one. If not, the wikipedia article is a good intro:
http://en.wikipedia.org/wiki/Bloom_filter


Building
--------
The Makefile assumes GNU Make, so run 'make' or 'gmake' as appropriate
on your system.

By default it builds an optimized 64 bit libbloom. See Makefile comments
for other build options.

The shared library will be in ./build/libbloom.so


Sample Usage
------------

#include "bloom.h"

struct bloom bloom;
bloom_init(&bloom, 1000000, 0.01);
bloom_add(&bloom, buffer, buflen);

if (bloom_check(&bloom, buffer, buflen)) {
  printf("It may be there!\n");
}


Documentation
-------------
Read bloom.h for more detailed documentation on the public interfaces.


License
-------
This code (except MurmurHash2) is under BSD license. See LICENSE file.

See murmur2/README for info on MurmurHash2.
You can’t perform that action at this time.