serializable_bloom_filter 1.0.1 copy "serializable_bloom_filter: ^1.0.1" to clipboard
serializable_bloom_filter: ^1.0.1 copied to clipboard

Simple, efficient, and serializable implementation of bloom filters.

example/serializable_bloom_filter_example.dart

import 'package:serializable_bloom_filter/serializable_bloom_filter.dart';

void main() {
  // Create a new Bloom filter with a false positive probability of 1% and an expected number of items of 100
  BloomFilter bloomFilter =
      BloomFilter(falsePositiveProbability: 0.01, numItems: 100);

  // Add items to the filter
  bloomFilter.add("Alice");
  bloomFilter.add("Bob");

  // Check if an item is in the filter
  print(bloomFilter.contains("Alice")); // true
  print(bloomFilter.contains("Bob")); // true
  print(bloomFilter
      .contains("Charlie")); // false (might be true due to false positive)
}
3
likes
140
pub points
7%
popularity

Publisher

verified publisherflutterflow.io

Simple, efficient, and serializable implementation of bloom filters.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

More

Packages that depend on serializable_bloom_filter