XXHash.Managed 1.5.2

dotnet add package XXHash.Managed --version 1.5.2
                    
NuGet\Install-Package XXHash.Managed -Version 1.5.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="XXHash.Managed" Version="1.5.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="XXHash.Managed" Version="1.5.2" />
                    
Directory.Packages.props
<PackageReference Include="XXHash.Managed" />
                    
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 XXHash.Managed --version 1.5.2
                    
#r "nuget: XXHash.Managed, 1.5.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 XXHash.Managed@1.5.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=XXHash.Managed&version=1.5.2
                    
Install as a Cake Addin
#tool nuget:?package=XXHash.Managed&version=1.5.2
                    
Install as a Cake Tool

xxHash3

MS backed implementation (https://www.nuget.org/packages/System.IO.Hashing/) is recommended over this library as it is faster and better supported.

Nuget packets:

https://www.nuget.org/packages/XXHash.Native/ (Windows-x64, Linux-x64 SSE2)

https://www.nuget.org/packages/XXHash.Managed/

Yan Collet reference C implementation: https://github.com/Cyan4973/xxHash

Alexander Melnik port: https://github.com/uranium62/xxHash

Milosz Krajewski port: https://github.com/MiloszKrajewski/K4os.Hash.xxHash

Microsoft port: https://github.com/dotnet/runtime/tree/main/src/libraries/System.IO.Hashing/src/System/IO/Hashing

There are some others implementations available on nuget, but they are much slower or produce incorrect results.

BloomFilter

BloomFilter avx2 optimized implementation is taken from Rocksdb. It can be hard to use as you should have good knowledge of your data in advance to tune number of parameters. Expect 1-2 bytes per key as good size estimation.

XXH3 Streaming mode

In case your input is larger than MaxArraySize in dotnet (~ 2 GiB), or it doesn't represented as continuous block of memory at once you should use streaming mode.

var state = new XXH3State(seed: 10);
using var fileStream = File.OpenRead("largefile");
await state.AppendAsync(fileStream);
var hash64 = state.GetXXH3_64();

Calculating current hash value is non destructive and another portion of data can be added afterwise. Just keep in mind feeding very small blocks (like 1 byte) and repeatedly calculating hash value maybe slow. Note: This isn't replacement for HashCode.Combne as far as XXH3State is rather big (>500 bytes).

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on XXHash.Managed:

Repository Stars
Bobris/BTDB
Key Value Database in .Net with Object DB Layer, RPC, dynamic IL and much more
Version Downloads Last Updated
1.5.2 317 11/12/2025
1.5.1 228 10/6/2025
1.5.0 10,774 12/21/2023
1.4.1 287 7/25/2023
1.4.0 655 3/20/2023
1.3.2 373 2/17/2023
1.3.1 404 2/6/2023
1.3.0 407 1/30/2023
1.2.1 407 1/26/2023
1.2.0 399 1/26/2023
1.1.1 1,092 6/15/2022
1.1.0 556 6/13/2022
1.0.2 557 6/10/2022
1.0.1 598 6/9/2022
1.0.0 563 6/9/2022