Expand description
The metadata chunk (SPEC.md, section 12): who made a file, how it may be
used, and lasting ids for its parts, as entries of a subject, a key and a
value.
Metadata never makes a file unreadable. Decoding drops what breaks a rule, entry by entry, or the whole payload when it is malformed; encoding refuses what a writer must not write.
entries u32 count, then per entry:
u32 the node index the entry is about, or FFFFFFFF for the file
u32 length, key
u32 length, valueStructs§
- Metadata
Entry - One entry of metadata.
Enums§
- Encode
Metadata Error - Why a list of metadata entries could not be encoded.
Constants§
- METADATA_
TAG - The tag of the metadata chunk.
- METADATA_
VERSION - The metadata payload layout this build writes and reads.
- TEXT_
KEYS - The registered keys whose value is UTF-8 text (
SPEC.md, 12.1). - UUID_
KEY - The registered key whose value is the 16 bytes of a UUID.
Functions§
- decode_
metadata - Decodes a metadata payload against
scene, the scene of the same file. It never fails: a malformed payload is no metadata at all, and an entry that breaks a rule of section 12 is left out (SPEC.md, 12.2). - encode_
metadata - Encodes
entriesas a metadata payload, in their order, checking them againstscene.