FastCdcFs.Net 1.1.0-alpha06

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

FastCdcFS.Net

A .NET library for creating read-only virtual file systems backed by fast content-defined chunking. It allows efficient storage, deduplication, and retrieval of files and directories while keeping access fast and lightweight. Ideal for scenarios where immutable file systems are needed, such as archival storage, distribution, or data integrity�focused applications.

Usage

Create a file system

Create the file system with shell / terminal

Use FastCdcFs.Shell to a create virtual file-system:

fastcdcfs build -d "/directory/to/add" -o myfs.fastcdcfs
fastcdcfs build -f "/file/to/add"
fastcdcfs build -f "/another/file/to/add" --target "non/root/destination"
fastcdcfs build -d "/directory/to/add"
fastcdcfs build -d "/another/directory/to/add" --target "another/non/root/destination" --recursive
fastcdcfs build -o myfs.fastcdcfs
Create the file system programmatically
var writer = new FastCdcFsWriter(Options.Default);
writer.AddFile("/file/to/add");
writer.AddFile("/another/file/to/add", "non/root/destination");
writer.Build("/target/location");

Read a file system

Read the file system with shell / terminal
# list files (optional pass --directory to limit outputs to a specific directory)
fastcdcfs list myfs.fastcdcfs
fastcdcfs list myfs.fastcdcfs --directory "/non/root/destination"

# extract everything
fastcdcfs extract myfs.fastcdcfs --target "/extract/to"

# extract file
fastcdcfs extract --file "non/root/destination/file" myfs.fastcdcfs --target "/extract/to"

# extract directory (optional recursively)
fastcdcfs extract --directory "non/root/destination/file" myfs.fastcdcfs --target "/extract/to"
Read the file system programmatically
using var reader = new CdcFsReader("myfs.fastcdcfs");

foreach (var file in reader.List().Where(e => e.IsFile))
{
    // read all bytes
    var data = file.ReadAllBytes();

    // get stream
    var stream = file.OpenRead();
}
using var reader = new CdcFsReader("myfs.fastcdcfs");

foreach (var file in reader.List("a/known/directory"))
{
    // ...
}
using var reader = new CdcFsReader("myfs.fastcdcfs");

// read known entries immediately
var entry = reader.Get("some/known/file/path");
var stream = entry!.Open();

File System Format

Version 2 (Current)

  • Improved zero file size handling
  • Support for no compression dict even with compression
+--------------------------------------------------------------------------------------+
| [0x00..0x08]      magic: utf8 "FASTCDCFS"         | identifies file
| [0x09..0x09]      version: byte (2)               | identifies the file system version
| [0x0A..0x0A]      mode: byte                      | identifies the file system modes
| [0x0B..0x0C]      meta data length: u32           | length of metadata
| [0x0D..0x0E]  -   directory count: u32            | number of directories
| [0x0F..]     |C|  directory table: <repeated>
| [..]         |O|    parent id: u32                | parent id of directory
| [..]         |M|    name: utf8                    | name of directory
| [..]         |P|  files count: u32                | number of files
| [..]         |R|  files table: <repeated>
| [..]         |E|    directory id: u32             | id of directory
| [..]         |S|    name: utf8                    | name of file
| [..]         |S|    length: u32                   | length of file
| [..]         |E|    chunk count: u32              | number of chunk ids, not available when version > 1 and length = 0
| [..]         |D|    file chunk table: <repeated>
| [..]         |*|      chunk id: u32               | chunk id
| [..]         |.|  compression dict length: u32    | length of compression dict *
| [..]         |.|  compression dict: raw           | compression dict *
| [..]         |.|  chunk boundary count: u32       | number of chunk boundaries
| [..]         |.|  chunk boundary table: <repeated>
| [..]         |.|    chunk length: u32             | length of chunk
| [..]         | |    compressed chunk length: u32  | length of compressed chunk *
| [..]          -     chunk hash: u64               | xxHash64 of the chunk **
| [..]              meta data hash: u64             | xxHash64 of the meta data **
| [..]              chunk blobs: raw                | chunk blobs
+--------------------------------------------------------------------------------------+

* only available when the mode is not nozstd
** only available when the mode is not nohash
  • the meta data is only compressed when the mode is not nozstd
  • the utf8 string encoding uses a 7-bit encoded length prefix
  • the id of a directory is the index in the directory table
  • the id of a chunk is the index in the chunk boundary table

File System Modes

None:   0x0
NoZstd: 0x1
NoHash: 0x2
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 was computed.  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.

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.1.0-alpha06 153 10/12/2025
1.1.0-alpha05 151 10/12/2025
1.1.0-alpha04 109 10/11/2025
1.1.0-alpha02 160 10/6/2025
1.0.2 194 10/6/2025
1.0.1 185 10/6/2025
1.0.0 178 10/6/2025
1.0.0-alpha11 156 10/5/2025
1.0.0-alpha04 138 10/3/2025
1.0.0-alpha03 160 10/3/2025
1.0.0-alpha02 149 10/3/2025
1.0.0-alpha010 94 10/4/2025
1.0.0-alpha009 94 10/4/2025