Expand description
The compact snapshot format (version 3) and its pinned files.
One format serves two shapes:
- the container this crate embeds (
data/catalog.bin, featureembedded) holds every edition over one shared string table and one set of shared records, so text and templates two editions publish identically are stored once; - a per-edition file (
file_name) holds one edition. Hosts that load a catalog at runtime (the npm package, featureruntime) ship these, so a reader pays only for the edition it uses.
Both are lossless format shifts of the authenticated buildingSMART
PSD/QTO XML (ADR 0017): every set, member, definition, translation,
applicability selector and provenance field decodes exactly as imported.
The encoder is deterministic, and each file’s SHA-256 is pinned here
(pinned_sha256, CONTAINER_SHA256); runtime refuses bytes that do
not match their pin.
Enums§
- Archive
Error - Why a serialized catalog snapshot could not be decoded.
- Encode
Error - Why a snapshot cannot be encoded.
Constants§
- CONTAINER_
SHA256 - SHA-256 of the embedded container,
data/catalog.bin, holding every edition. - EDITIONS
- Every edition with a committed snapshot, in container order.
- FORMAT_
VERSION - The snapshot format version this build reads and writes.
Functions§
- decode_
all - Decode every edition of a snapshot into official-profile catalogs, in its order.
- decode_
edition - Decode
editionfrom a container or a per-edition file into an official-profileCatalog. Only that edition’s records are decoded. - editions
- The editions a snapshot holds, in its order, without decoding their templates.
- encode
- Encode official catalogs into one snapshot, in edition order whatever the order given: one catalog makes a per-edition file, every edition the container. Equal catalogs always encode to equal bytes.
- file_
name - The conventional file name of
edition’s per-edition snapshot, such asifc4x3-add2.bin. - pinned_
sha256 - SHA-256 (lowercase hexadecimal) of
edition’s per-edition snapshot, asencodewrites it from the committed container.