LasseVK.FastCdc
1.0.2
dotnet add package LasseVK.FastCdc --version 1.0.2
NuGet\Install-Package LasseVK.FastCdc -Version 1.0.2
<PackageReference Include="LasseVK.FastCdc" Version="1.0.2" />
<PackageVersion Include="LasseVK.FastCdc" Version="1.0.2" />
<PackageReference Include="LasseVK.FastCdc" />
paket add LasseVK.FastCdc --version 1.0.2
#r "nuget: LasseVK.FastCdc, 1.0.2"
#:package LasseVK.FastCdc@1.0.2
#addin nuget:?package=LasseVK.FastCdc&version=1.0.2
#tool nuget:?package=LasseVK.FastCdc&version=1.0.2
LasseVK.FastCdc
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 | Versions 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. |
-
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 |