Iscc.Lib
0.4.0
dotnet add package Iscc.Lib --version 0.4.0
NuGet\Install-Package Iscc.Lib -Version 0.4.0
<PackageReference Include="Iscc.Lib" Version="0.4.0" />
<PackageVersion Include="Iscc.Lib" Version="0.4.0" />
<PackageReference Include="Iscc.Lib" />
paket add Iscc.Lib --version 0.4.0
#r "nuget: Iscc.Lib, 0.4.0"
#:package Iscc.Lib@0.4.0
#addin nuget:?package=Iscc.Lib&version=0.4.0
#tool nuget:?package=Iscc.Lib&version=0.4.0
Iscc.Lib
High-performance C# / .NET bindings for ISO 24138:2024 —
International Standard Content Code (ISCC). Built as P/Invoke bindings to the Rust-compiled ISCC
library via csbindgen, with an idiomatic C# API featuring
typed result records, IDisposable streaming hashers, and PascalCase method names.
What is ISCC
The ISCC is a similarity-preserving fingerprint and identifier for digital media assets. ISCCs are generated algorithmically from digital content, just like cryptographic hashes. However, instead of using a single cryptographic hash function to identify data only, the ISCC uses various algorithms to create a composite identifier that exhibits similarity-preserving properties (soft hash).
Installation
dotnet add package Iscc.Lib
Quick Start
using Iscc.Lib;
// Generate a Meta-Code from content metadata
var result = IsccLib.GenMetaCodeV0("Hello World");
Console.WriteLine(result.Iscc); // "ISCC:..."
// Streaming for large files
using var hasher = new IsccDataHasher();
using var fs = File.OpenRead("large_file.bin");
byte[] buf = new byte[65536];
int n;
while ((n = fs.Read(buf, 0, buf.Length)) > 0)
hasher.Update(buf.AsSpan(0, n));
DataCodeResult dataResult = hasher.Finalize();
Console.WriteLine(dataResult.Iscc);
API Overview
Code Generators
| Method | Description |
|---|---|
GenMetaCodeV0 |
Generate a Meta-Code from metadata fields |
GenTextCodeV0 |
Generate a Text-Code from plain text |
GenImageCodeV0 |
Generate an Image-Code from pixel data |
GenAudioCodeV0 |
Generate an Audio-Code from Chromaprint data |
GenVideoCodeV0 |
Generate a Video-Code from frame signatures |
GenMixedCodeV0 |
Generate a Mixed-Code from Content-Codes |
GenDataCodeV0 |
Generate a Data-Code from binary data |
GenInstanceCodeV0 |
Generate an Instance-Code from binary data |
GenIsccCodeV0 |
Generate a composite ISCC-CODE |
GenSumCodeV0 |
Generate an ISCC-SUM from a file path |
Utilities
- Text processing:
TextClean,TextRemoveNewlines,TextTrim,TextCollapse - Algorithm primitives:
AlgSimhash,AlgMinhash256,AlgCdcChunks,SlidingWindow - Soft hashing:
SoftHashVideoV0 - Encoding:
EncodeBase64,EncodeComponent - Codec:
IsccDecode,IsccDecompose,JsonToDataUrl - Streaming:
IsccDataHasher,IsccInstanceHasherfor incremental processing - Diagnostics:
ConformanceSelftest
Links
License
Apache-2.0
| 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 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. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.