ZeroAsset 1.1.0
dotnet add package ZeroAsset --version 1.1.0
NuGet\Install-Package ZeroAsset -Version 1.1.0
<PackageReference Include="ZeroAsset" Version="1.1.0" />
<PackageVersion Include="ZeroAsset" Version="1.1.0" />
<PackageReference Include="ZeroAsset" />
paket add ZeroAsset --version 1.1.0
#r "nuget: ZeroAsset, 1.1.0"
#:package ZeroAsset@1.1.0
#addin nuget:?package=ZeroAsset&version=1.1.0
#tool nuget:?package=ZeroAsset&version=1.1.0
ZeroAsset ๐ฆ
High-Performance Digital Asset Management, Zero-Byte Variant Branching, and Hierarchical Curation Engine for .NET
๐ 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.
- Canonical
- 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 | Versions 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. |
-
.NETFramework 4.6.2
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.5)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
- System.ValueTuple (>= 4.5.0)
- ZeroPrimitives.Core (>= 1.5.0)
-
.NETStandard 2.0
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.5)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
- System.ValueTuple (>= 4.5.0)
- ZeroPrimitives.Core (>= 1.5.0)
-
net8.0
- ZeroPrimitives.Core (>= 1.5.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.