Skip to main content

Module container

Module container 

Source
Expand description

The .hmc hypermedia container: a single, fast-compression (ZIP) file that bundles an original source document together with all of its derived assets (canonical HTML, CML/RDF, plain text, structural chunks, embeddings, extraction metadata) behind one self-describing HmcManifest.

Why a container per document:

  • the original and everything derived from it travel together — provenance never gets separated from the source;
  • ZIP gives random access, partial reads, and is readable by every tool;
  • re-running the pipeline updates derived assets in place without touching the verbatim source.

Layout inside the zip:

manifest.json              # the index (HmcManifest)
source/<original>          # verbatim source bytes
derived/document.html      # canonical structured HTML
derived/document.txt       # plain text with [[page N]] markers
derived/document.cml.ttl   # CML / RDF annotations (optional)
derived/chunks.jsonl       # structural chunks (optional)
embeddings/vectors.f32     # row-major f32 embedding matrix (optional)
meta/extraction.json       # tool versions / timings / confidence (optional)

Structs§

AssetEntry
One stored member of the container.
HmcContainer
Read side: opens a .hmc, exposes the manifest, and reads assets on demand.
HmcManifest
The root manifest of an .hmc container.
HmcWriter
Builder that accumulates assets in memory and writes a .hmc zip in one shot.
PipelineInfo
Which tools produced this container — for reproducibility and re-runs.
SourceInfo
Description of the original source document.
StatusFlags
Coarse processing status carried in the manifest so a library scan can route work (what still needs extraction / embedding / analysis) without unpacking.

Enums§

AssetKind
Logical role of an asset inside a container. The path in AssetEntry is authoritative; kind is the typed lens used for retrieval/UX.
HmcError

Constants§

HMC_EXTENSION
Conventional file extension for a hypermedia container.
HMC_FORMAT_VERSION
Current on-disk format version of the .hmc container.

Functions§

blake3_hex
BLAKE3 hex of a byte slice — the hashing used throughout the container.

Type Aliases§

Result