ZeroAsset 1.1.0

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

ZeroAsset ๐Ÿ“ฆ

High-Performance Digital Asset Management, Zero-Byte Variant Branching, and Hierarchical Curation Engine for .NET

ZeroPlatform Tier License: MIT .NET Multi-Targeting NuGet Version Zero External Dependencies Unit Tests


๐Ÿ“– Overview

ZeroAsset is a sovereign, zero-external-dependency asset management engine for .NET. Built in pure C#, it provides foundational algorithms and data structures for high-speed photo and video management workflows, non-destructive virtual copy branching, strict hierarchical contiguous sorting, and collision-free content-addressable cache keys.

Designed for professional photo/video workstations (like ZVision) and industrial media management systems, ZeroAsset guarantees zero heap allocations on high-frequency evaluation hot paths.


๐ŸŒŸ Key Capabilities

  • Zero-Byte Variant Branching (VariantIdentifier):
    • Canonical #vc<n> suffix parser and string representation generator.
    • Disk path resolver identifying the physical master file path from arbitrary variant identifiers.
    • Monotonic copy ID allocation ensuring deterministic unique IDs for new copies.
    • Sidecar file resolution (e.g. .xmp) mapped back to master assets.
  • Hierarchical Contiguous Sorting (HierarchicalContiguousComparer):
    • Implements a Strict Weak Ordering comparator guaranteeing that child variants/virtual copies always remain contiguously adjacent to their master parent in the filmstrip or grid, regardless of the active primary sort mode (Capture Date, File Name, Star Rating, File Size, or Custom).
  • Immutable Asset Curation (AssetCuration):
    • Star ratings (0โ€“5 stars with clamping).
    • Color labels (None, Red, Yellow, Green, Blue, Purple).
    • Culling pick flags (None, Pick, Reject).
    • Zero-allocation immutable record updates (WithRating, WithFlag, WithColorLabel, WithKeywords).
  • Content-Addressable Cache Keys (AssetCacheKey):
    • Cryptographically isolates master assets and virtual copies to prevent thumbnail, preview, or proxy cache collision.
    • Generates deterministic, hex-encoded 64-bit cache identifiers based on path, variant copy ID, and edit recipe hash.

๐Ÿ“ฆ Installation

Install via the .NET CLI:

dotnet add package ZeroAsset

Or via the Package Manager Console:

Install-Package ZeroAsset

๐Ÿš€ Quick Start

1. Variant Identification & Master Resolution

using ZeroAsset.Curation;

// Parse a virtual copy path
string virtualPath = @"D:\Photos\RAW_0042.CR3#vc1";
var variant = VariantIdentifier.Parse(virtualPath);

Console.WriteLine($"Is Master: {variant.IsMaster}");     // False
Console.WriteLine($"Copy ID: {variant.CopyId}");         // 1
Console.WriteLine($"Master File: {variant.MasterPath}"); // D:\Photos\RAW_0042.CR3

// Generate the next variant ID
int nextId = VariantIdentifier.GetNextCopyId(new[] { 1, 2 }); // 3
string newVariantPath = VariantIdentifier.CreateVariantPath(variant.MasterPath, nextId);
// -> D:\Photos\RAW_0042.CR3#vc3

2. Hierarchical Contiguous Filmstrip Sorting

using ZeroAsset.Curation;

var items = new List<AssetNode>
{
    new AssetNode("IMG_0002.CR3", copyId: 0, rating: 5),
    new AssetNode("IMG_0001.CR3", copyId: 0, rating: 2),
    new AssetNode("IMG_0001.CR3#vc1", copyId: 1, rating: 4),
};

// Sort by rating while keeping variants grouped with their parent master
var comparer = new HierarchicalContiguousComparer<AssetNode>(
    primaryComparison: (a, b) => b.Rating.CompareTo(a.Rating)
);

items.Sort(comparer);
// Result: IMG_0001.CR3#vc1 stays directly with IMG_0001.CR3!

3. Collision-Free Thumbnail & Proxy Cache Keys

using ZeroAsset.Curation;

// Compute deterministic cache key for a variant
string cacheKey = AssetCacheKey.Compute(
    masterPath: @"D:\Photos\RAW_0042.CR3",
    copyId: 1,
    pipelineRecipeHash: 0x9A4B12C3D4E5F678
);

Console.WriteLine($"Cache Key: {cacheKey}");

๐Ÿงช Automated Testing

ZeroAsset includes automated unit and stress tests targeting both .NET 8.0 and .NET Framework 4.6.2:

dotnet test tests/ZeroAsset.Tests/ZeroAsset.Tests.csproj -c Release

๐Ÿ“„ License & Author

Distributed under the permissive MIT License.
Architected and maintained by Phong Vรต (kzxl) as part of the ZeroPlatform industrial computing ecosystem.

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

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 61 9/29/2026
1.0.0 68 9/28/2026