Expand description
High-performance Rust implementation of ISO 24138:2024 (ISCC).
This crate provides the core ISCC algorithm implementations. All 10 gen_*_v0
functions are the public Tier 1 API surface, designed to be compatible with
the iscc-core Python reference implementation.
Re-exports§
pub use codec::encode_base64;pub use codec::iscc_decompose;pub use streaming::DataHasher;pub use streaming::InstanceHasher;pub use types::*;
Modules§
- codec
- ISCC codec: type enums, header encoding/decoding, base32, and component encoding.
- streaming
- Streaming hash types for incremental ISCC code generation.
- types
- Structured result types for ISCC code generation functions.
Enums§
- Iscc
Error - Error type for ISCC operations.
Constants§
- IO_
READ_ SIZE - Buffer size in bytes for streaming file reads (4 MB).
- META_
TRIM_ DESCRIPTION - Max UTF-8 byte length for description metadata trimming.
- META_
TRIM_ META - Max decoded payload size in bytes for the meta element.
- META_
TRIM_ NAME - Max UTF-8 byte length for name metadata trimming.
- TEXT_
NGRAM_ SIZE - Character n-gram width for text content features.
Functions§
- alg_
cdc_ chunks - Split data into content-defined chunks.
- alg_
minhash_ 256 - Compute a 256-bit MinHash digest from 32-bit integer features.
- alg_
simhash - Compute a SimHash from a sequence of equal-length hash digests.
- conformance_
selftest - Run conformance tests against vendored test vectors.
- encode_
component - Encode a raw digest into an ISCC unit string.
- gen_
audio_ code_ v0 - Generate an Audio-Code from a Chromaprint feature vector.
- gen_
data_ code_ v0 - Generate a Data-Code from raw byte data.
- gen_
image_ code_ v0 - Generate an Image-Code from pixel data.
- gen_
instance_ code_ v0 - Generate an Instance-Code from raw byte data.
- gen_
iscc_ code_ v0 - Generate a composite ISCC-CODE from individual ISCC unit codes.
- gen_
meta_ code_ v0 - Generate a Meta-Code from name and optional metadata.
- gen_
mixed_ code_ v0 - Generate a Mixed-Code from multiple Content-Code strings.
- gen_
sum_ code_ v0 - Generate a composite ISCC-CODE from a file in a single pass.
- gen_
text_ code_ v0 - Generate a Text-Code from plain text content.
- gen_
video_ code_ v0 - Generate a Video-Code from frame signature data.
- iscc_
decode - Decode an ISCC unit string into its header components and raw digest.
- json_
to_ data_ url - Convert a JSON string into a
data:URL with JCS canonicalization. - sliding_
window - Generate sliding window n-grams from a string.
- soft_
hash_ video_ v0 - Compute a similarity-preserving hash from video frame signatures.
- text_
clean - Clean and normalize text for display.
- text_
collapse - Normalize and simplify text for similarity hashing.
- text_
remove_ newlines - Remove newlines and collapse whitespace to single spaces.
- text_
trim - Trim text so its UTF-8 encoded size does not exceed
nbytes.
Type Aliases§
- Iscc
Result - Result type alias for ISCC operations.