github.com/yourbasic/bloom (go): Package bloom provides a Bloom filter implementation.  A Bloom filter is a fast and space-efficient probabilistic data structure used to test set membership.  A membership test returns either ”likely member” or ”definitely not a member”. Only false positives can occur: an element that has been added to the filter will always be identified as ”likely member”.  The probabilities of different outcomes of a membership test at a false-positives rate of 1/100 are:  Elements can be added, but not removed. With more elements in the filter, the probability of false positives increases.  A  full filter with a false-positives rate of 1/p uses roughly 0.26ln(p) bytes per element and performs ⌈1.4ln(p)⌉ bit array lookups per test:  Each membership test makes a single call to a 128-bit hash function. This improves speed without increasing the false-positives rate as shown by Kirsch and Mitzenmacher.  This implementation is not intended for cryptographic use.  The internal data representation is different for big-endian and little-endian machines.  The Basics example contains a typcial use case: a blacklist of shady websites.  Build a blacklist of shady websites.
Keywords: bloom-filter|data-structures|go