LasseVK.FastCdc 1.0.2

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

LasseVK.FastCdc

build codeql

This package implements the FastCdc algorithm for efficient chunking of large datasets.

Note: Portions of this library were added by AI, given that I have an IDE that uses AI-style autocompletion. There is however, no portion of it not vetted by me.

Discord

You can reach me through my Discord server.

Nuget package

You can find the Nuget package here.

Installation

You can install the package from the command line, using dotnet:

dotnet add package LasseVK.FastCdc

Or you can use your favorite IDE which should have a Nuget package manager built in.

Framework support

The package supports the following .NET versions:

  • .NET 8.0 (until november 10, 2026)
  • .NET 9.0 (until november 10, 2026)
  • .NET 10.0 (until november 14, 2028)

This follows the official supported versions policies from Microsoft:

Note: After support for a .NET version ends, the package will still exist on nuget for use with that version, but I won't guarantee that updates to that version will be made.

Usage

You provide one of the following types of datasets to the Chunker.Chunk methods:

  • ReadOnlySpan<byte>
  • byte[]
  • Stream (or one of its descendants)

In return, you get a collection of Chunk records, each specifying the offset and length of the chunk.

Optionally you can provide a ChunkingOptions options object, specifying how the chunking algorithm should operate. Specifically the options allows you to control the average, minimum and maximum chunk size.

var bytes = File.ReadAllBytes("path/to/file");
var chunks = Chunker.Chunk(bytes).ToList();

foreach (var chunk in chunks)
{
    var bytesOfChunk = bytes[chunk.Offset..(chunk.Offset + chunk.Length)];
    // TODO: Process chunk data
}

The above example works for files that can be loaded into memory. For larger files, consider using a Stream instead of byte[] to avoid loading the entire file into memory at once, like this:

using var stream = File.OpenRead("path/to/file");
foreach (var chunk in Chunker.Chunk(bytes))
{
    var bytesOfChunk = ... // TODO: Read bytes and process them
}
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

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 100 5/19/2026