Skip to content

A simple and small bloom filter implementation in plain C.


Notifications You must be signed in to change notification settings


Folders and files

Last commit message
Last commit date

Latest commit


Repository files navigation

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:

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

See Makefile comments for other build options.

The shared library will be in ./build/
A static library will be in ./build/libbloom.a

Sample Usage

#include "bloom.h"

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

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

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

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

See murmur2/README for info on MurmurHash2.