/ios-bloom-filter

Simple bloom filter for iOS. Add strings to a set and quickly test if they're a part of the set

Primary LanguageObjective-C

iOS Bloom Filter

This library is meant to be used as a simple bloom filter for your iOS applications. You can only add strings to the set, for the moment. You can easily create a bloom filter, and set the number of bits for your vector array, and the number of hash functions you want to use:

  BloomFilter bfilter = [[BloomFilter alloc] initWithNumberOfBits:1000000 andWithNumberOfHashes:3];

To add a word to the set:

  [bfilter addToSet:@"my word"];

To test whether a word is in the set:

  BOOL found = [bfilter lookup:@"my word"];