ZeroStorage.Core 1.1.0

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

ZeroStorage

License: MIT .NET Multi-Targeting Gorilla Compression Zero External Dependencies NuGet Version

ZeroStorage is an embedded, high-throughput time-series database (TSDB) and write-ahead log (WAL) storage engine for .NET with zero external dependencies. Implemented from scratch in pure C#, it features Facebook Gorilla lossy/lossless Delta-of-Delta timestamp compression, XOR float mantissa encoding, wide-row MultiMetricBlock columnar persistence, memory-mapped files (MMF), CRC32 integrity verification, and background tiered compaction.


๐ŸŒŸ Key Capabilities

  • Wide-Row Time-Series Compression (MultiMetricBlock): Simultaneously encodes multiple metrics sharing timestamp vectors with Gorilla compression.
  • Facebook Gorilla Time-Series Compression:
    • Timestamp Compression: Variable-length Delta-of-Delta encoding (down to 1 bit per sample for regular time intervals).
    • Value Compression: XOR floating-point mantissa encoding with leading/trailing zero tracking (reducing typical float metrics to $< 1.5$ bytes/sample).
  • Memory-Mapped Persistence (MemoryMappedTimeSeriesLog): Direct kernel-level zero-copy disk mapping via MemoryMappedFile, bypassing user-space buffering for sub-millisecond writes.
  • Write-Ahead Log (WAL): Append-only durability log with IEEE 802.3 CRC32 integrity checksums per record and automatic crash recovery.
  • Tiered Compaction: Background compactor merging fragmented uncompressed or hot blocks into consolidated, dense cold storage blocks.
  • Zero External Dependencies: Pure C# standard runtime library.

๐Ÿ“ฆ Installation

Install via the .NET CLI:

dotnet add package ZeroStorage.Core

๐Ÿš€ Quick Start

1. Gorilla Timestamp & Float Compression

using ZeroStorage.Core.BitIO;
using ZeroStorage.Core.Gorilla;

using var stream = new MemoryStream();
var writer = new BitWriter(stream);
var encoder = new GorillaEncoder(writer);

long baseTimestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();

// Encode stream of 1000 points
for (int i = 0; i < 1000; i++)
{
    long ts = baseTimestamp + (i * 10); // 10ms intervals
    double val = 25.0 + Math.Sin(i * 0.1) * 0.5;
    encoder.Encode(ts, val);
}
encoder.Finish();

Console.WriteLine($"Compressed 1,000 points into: {stream.Length} bytes ({stream.Length / 1000.0:F2} bytes/point)!");

2. Memory-Mapped Time-Series Log

using ZeroStorage.Core.Persistence;

using var tsdb = new MemoryMappedTimeSeriesLog("telemetry.tsdb", maxSizeBytes: 64 * 1024 * 1024);

// Append metric point
tsdb.Append(metricId: 42, timestamp: DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(), value: 98.6);

๐Ÿ“Š Benchmark & Performance

Tested on Intel Core i7-13700K with NVMe SSD (Release x64):

Metric Uncompressed Raw Gorilla Compressed (ZeroStorage) Compression Ratio
Storage per Metric Point $16 \text{ bytes}$ ($8\text{B ts} + 8\text{B val}$) $1.37 \text{ bytes}$ $11.6 \times$ smaller
Write Throughput $2.5\text{M points/sec}$ $12.8\text{M points/sec}$ In-memory bit packing
Query Decompress Speed $10\text{M points/sec}$ $45.0\text{M points/sec}$ Direct bit-stream decode

๐Ÿ“œ Release History

Version Release Date Key Milestones & Highlights
v1.1.0 2026-09-16 Wide-Row Metric Compression:<br/>โ€ข Introduced MultiMetricBlock simultaneous encoding of multi-variate telemetry streams.<br/>โ€ข Zero-copy memory mapped files with CRC32 block checksums.<br/>โ€ข 18 unit tests passing (100% success rate).
v1.0.0 2026-09-09 Initial Sovereign Release:<br/>โ€ข Pure C# Facebook Gorilla Delta-of-Delta timestamp & XOR float compression.<br/>โ€ข Memory-mapped write-ahead logging (WAL) & tiered compaction.

๐Ÿ“„ License

MIT License ยฉ 2026 Phong Vรต. Part of the ZeroPlatform project.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on ZeroStorage.Core:

Package Downloads
ZeroPipeline.Nodes

Industrial Concrete Pipeline Nodes: Machine Vision, Metrology, Barcode/QR Decoders, AI Inference, Modbus PLC, and Gorilla TimeSeries Logging for ZeroPlatform.

ZeroIoT

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 46 9/16/2026
1.0.0 117 9/9/2026