Skip to main content

Module snapshot

Module snapshot 

Source
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, feature embedded) 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, feature runtime) 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§

ArchiveError
Why a serialized catalog snapshot could not be decoded.
EncodeError
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 edition from a container or a per-edition file into an official-profile Catalog. 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 as ifc4x3-add2.bin.
pinned_sha256
SHA-256 (lowercase hexadecimal) of edition’s per-edition snapshot, as encode writes it from the committed container.