Meziantou.Framework.BloomFilters 2.0.2

Prefix Reserved
dotnet add package Meziantou.Framework.BloomFilters --version 2.0.2
                    
NuGet\Install-Package Meziantou.Framework.BloomFilters -Version 2.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Meziantou.Framework.BloomFilters" Version="2.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Meziantou.Framework.BloomFilters" Version="2.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Meziantou.Framework.BloomFilters" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Meziantou.Framework.BloomFilters --version 2.0.2
                    
#r "nuget: Meziantou.Framework.BloomFilters, 2.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Meziantou.Framework.BloomFilters@2.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Meziantou.Framework.BloomFilters&version=2.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Meziantou.Framework.BloomFilters&version=2.0.2
                    
Install as a Cake Tool

Meziantou.Framework.BloomFilters

High-performance in-memory Bloom filters and counting Bloom filters for .NET.

Use BloomFilter when you need fast membership checks (Add + MayContain) and can tolerate false positives.

using Meziantou.Framework.BloomFilters;

// Configure the filter for ~1,000 items and 1% false positive probability
var size = BloomFilterSize.CreateOptimalSize(expectedItemCount: 1000, falsePositiveProbability: 0.01);
var filter = BloomFilter.CreateXXHash3(size);

filter.Add("alice@example.com");
filter.Add("bob@example.com");

if (filter.MayContain("alice@example.com"))
{
    // Item may exist (no false negatives)
}

// Approximate number of inserted items
var estimatedItemCount = filter.GetEstimateCount();

Use CountingBloomFilter when you need to remove values or estimate per-value occurrences.

using Meziantou.Framework.BloomFilters;

var size = CountingBloomFilterSize.CreateOptimalSize(expectedItemCount: 1000, falsePositiveProbability: 0.01);
var filter = CountingBloomFilter.CreateXXHash3(size);

filter.Add("alice@example.com");
filter.Add("alice@example.com");

var mayContainAlice = filter.MayContain("alice@example.com"); // true
var estimatedCount = filter.GetEstimatedCount("alice@example.com"); // >= 2

filter.Remove("alice@example.com");

Available factory methods:

  • BloomFilter.CreateXXHash128, CreateXXHash64, CreateXXHash32, CreateXXHash3, CreateCrc64, CreateCrc32
  • CountingBloomFilter.CreateXXHash128, CreateXXHash64, CreateXXHash32, CreateXXHash3, CreateCrc64, CreateCrc32

Supported value types include int, uint, long, ulong, Guid, string, Int128, UInt128, and ReadOnlySpan<byte>.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.2 87 8/9/2026
2.0.1 100 7/17/2026
2.0.0 106 7/5/2026
1.0.5 102 6/28/2026
1.0.4 105 6/22/2026
1.0.3 108 6/14/2026
1.0.2 113 6/13/2026
1.0.1 108 6/13/2026
1.0.0 115 6/9/2026