Create a brand new instance. Allowable params are error_rate, min_length.
error_rate
min_length
Adds email addresses to the filter. You can either add email addresses directly, or add the output of a sha1_base64 hash.
Checks the provided arg list against the bloom filter, and returns a list of equivalent length, with true or false values depending on whether there was a match. Takes either email addresses or sha1_base64 hashes as args.
Removes all addresses from the filter
Builds a bloom filter and stores it internally
Returns the number of 'on' bits in the bloom filter
Returns the current list of salts
Sets the salts to be used with this filter
Sets the maximum false positive rate on the filter to RATE. RATE must be a number between 0 and 1.
Given a key, hash it using the list of salts and return a bitmask the same length as the Bloom filter. Note that Perl will pad the bitmask out with zeroes so it's a muliple of 8.
Using the stored information for number of salts, number of items, and desired error rate, calculate how long to make the filter string to ensure the error rate stays within bounds.
Maciej Ceglowski <maciej@ceglowski.com>
(c) 2004 Maciej Ceglowski, Joshua Schachter
This is free software, distributed under version 2 of the GNU Public License (GPL). See LICENSE for full text.
To install Bloom::Filter, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bloom::Filter
CPAN shell
perl -MCPAN -e shell install Bloom::Filter
For more information on module installation, please visit the detailed CPAN module installation guide.