FastCdcFs.Net.Shell
1.1.0-alpha06
This is a prerelease version of FastCdcFs.Net.Shell.
dotnet tool install --global FastCdcFs.Net.Shell --version 1.1.0-alpha06
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local FastCdcFs.Net.Shell --version 1.1.0-alpha06
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=FastCdcFs.Net.Shell&version=1.1.0-alpha06&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package FastCdcFs.Net.Shell --version 1.1.0-alpha06
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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 | 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 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.
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.1.0-alpha06 | 147 | 10/12/2025 |
| 1.1.0-alpha05 | 147 | 10/12/2025 |
| 1.1.0-alpha04 | 110 | 10/11/2025 |
| 1.1.0-alpha02 | 165 | 10/6/2025 |
| 1.0.2 | 172 | 10/6/2025 |
| 1.0.1 | 169 | 10/6/2025 |
| 1.0.0 | 248 | 10/6/2025 |
| 1.0.0-alpha11 | 161 | 10/5/2025 |
| 1.0.0-alpha04 | 134 | 10/3/2025 |
| 1.0.0-alpha03 | 130 | 10/3/2025 |
| 1.0.0-alpha02 | 132 | 10/3/2025 |
| 1.0.0-alpha010 | 96 | 10/4/2025 |
| 1.0.0-alpha01 | 166 | 10/1/2025 |
| 1.0.0-alpha009 | 93 | 10/4/2025 |