Binary format concepts
The vocabulary used by the catalog. Encoding, access, validation, identity and authentication are separate dimensions: an encoding can be canonical without being safe to traverse, and a safe view can expose bytes that have never been authenticated.
Last reviewed: October 17, 2026
Schema and description
An interface description language (IDL) gives a language-neutral source from which tools generate host types or codecs. Protocol Buffers and OMG IDL define the wire formats their declarations produce. A description of existing bytes instead states where fields already lie: Kaitai Struct, DFDL and Construct can describe someone else's file. The distinction is about control over bytes, not whether the declaration happens to live in a separate file.
A host-language schema uses types, annotations or combinators in the programming language. Its expressive power is not necessarily its native memory layout: Construct interprets Python objects, whereas the Flat draft proposes proving a subset of D layouts. The serde catalog distinguishes derivation, value-level codecs and reified schemas; that classification is not repeated here.
TLV and field identification
Tag–length–value (TLV) framing lets a reader identify a field and find its end without understanding its value. ASN.1 BER is the direct example. Protobuf carries a field number and wire type in its key, but only some wire types carry an explicit length. Calling all of it TLV hides that difference. A type marker in MessagePack identifies a value's kind, not its application field number.
Positional identification derives meaning from order and an external schema (Avro, SBE); tagged identification uses stable numbers (Thrift); named identification carries field names (BSON). Tags enable skipping only when the grammar also identifies the field's extent. They do not by themselves promise compatibility.
Varint and zig-zag
A varint represents an integer using a variable number of bytes. In protobuf base-128 varints, seven payload bits travel in each byte and the high bit indicates continuation. A decoder needs a maximum encoded width and overflow checks, even when every individual byte fits.
Zig-zag maps signed integers to unsigned integers with small magnitudes: 0 → 0, -1 → 1, 1 → 2, -2 → 3. This is not two's-complement serialization. Protobuf's sint32 and sint64 use it; int32 and int64 do not. See the encoding specification and Thrift's compact protocol.
Relative offset and region
A relative offset is an integer displacement interpreted against a specified base. The base is part of the type's semantics, not recoverable from the integer alone. FlatBuffers offsets are relative to the offset field; SSZ offsets locate variable parts within their enclosing serialized value. OpenType uses offsets from particular table or subtable starts; the foreign-layout comparison explains why those are not interchangeable.
A region is the caller-selected slice against which access is bounded. Being inside the whole file is weaker than being inside the intended table. The font parser's common rules require checked arithmetic before access. A count measures elements; a byte length measures bytes; confusing the two is a multiplication and overflow bug.
Vtable and far pointer
A FlatBuffers vtable stores per-field offsets, allowing a table to omit fields and allowing older readers to ignore added fields. The table's signed displacement locates the vtable; ordinary object offsets have different semantics. This is serialized metadata, not a native C++ virtual-method table.
A Cap'n Proto far pointer reaches a landing pad in another segment when the ordinary relative pointer cannot name the target in its own segment. Segment bounds and landing-pad rules belong to the validation argument. A file with offsets is not automatically a one-segment, directly castable object.
In-place access and zero-copy
In-place access reads encoded fields where they lie, without materializing the complete application object graph first. It may still decode an integer, check a bound or swap bytes. Zero-copy is a claim about a particular data path: a borrowed string can be zero-copy even when its enclosing object was parsed. Neither term implies zero work, aligned native references, validated UTF-8, or authenticated contents. See FlatBuffers, Cap'n Proto and the access comparison.
Native references impose stronger requirements than accessor-based views: alignment, lifetime, valid bit patterns and host byte order must all hold. The Flat draft's layout proof treats these separately from the bounds proof. A read-only mapping's lifetime does not protect it from another process truncating the backing file; that is a byte-source and publication problem.
Verifier and traversal limit
A verifier checks structural conditions needed by later operations. Its postcondition depends on what it checks: a FlatBuffers verifier is not an application semantic validator. Eager verification and per-access checks are alternative placements of work, not substitutes for an explicit threat model.
A traversal limit budgets work while following references. Cap'n Proto charges repeatedly reached objects again because those visits cost work. A depth limit bounds the active path; it does not bound a shallow graph's fan-out. Charging at least one unit per element also prevents zero-size elements from consuming unbounded loop iterations for zero charged bytes. See the validation comparison for the proposed Flat policy.
Determinism and canonical encoding
Use the existing canonical-form definition for the shared concept. This catalog distinguishes three contracts:
| Contract | Input held equal | What it guarantees |
|---|---|---|
| Deterministic producer | Same implementation inputs and operation sequence | Repeatable output bytes |
| Canonical encoding profile | Same value under an explicitly defined equivalence | One permitted representation |
| Strict canonical decoder | Received bytes | Rejects representations outside that profile |
CBOR §4.2 supplies deterministic encoding rules, with application choices still required. DER constrains BER for a given ASN.1 type. Protobuf explicitly separates deterministic serialization from a canonical form. COSE can sign an exact byte string without making every CBOR representation canonical. A signature over bytes is meaningful without canonicalization; semantic deduplication across encoders needs the stronger contract.
Three different hashes
The identity-versus-provenance discussion and build-input cache survey already distinguish cache keys from content addresses. For a Flat arena, keep three domains explicit:
- Build-input key: identifies fonts, rasterizer version, configuration and other declared producer inputs. It does not prove that the output bytes match those inputs.
- Encoding digest: commits to exact file bytes, including representation choices, padding and metadata. The covered range and treatment of an embedded digest field must be specified.
- Typed-value root: commits to the value under a specified type and tree grammar, as SSZ
hash_tree_rootdoes. It need not equal a hash of the serialized bytes.
A layout fingerprint identifies a schema representation for compatibility checking (Avro, the Flat draft). A non-cryptographic fingerprint is not an authenticity mechanism, and even a cryptographic schema hash says nothing about whether a particular payload satisfies application invariants.
Domain separation
Domain separation makes different classes of hashed input distinguishable. RFC 6962 §2.1 prefixes leaf input with 0x00 and internal-node input with 0x01. Bao instead inherits BLAKE3's compression flags and root rules; transplanting only its binary tree shape does not transplant its security construction. SSZ relies on typed structure, fixed chunks and length or selector mixing; its root is not self-describing across all types.
The domain includes the protocol's type, version, lengths and tree parameters where the construction requires them. Inventing a separator byte is not a replacement for defining an unambiguous encoding of the rest of the frame.
Inclusion and consistency proof
An inclusion proof demonstrates that a leaf belongs under a trusted root. A consistency proof demonstrates that a later log tree extends an earlier one without changing its prefix (RFC 6962 §§2.1.1–2.1.2). Inclusion alone does not establish append-only history, freshness or the authority of the root. Certificate Transparency and Hypercore add root authentication and protocol rules around the hash tree.
Flat-tree, tiles and outboards
Flat-tree is an indexing scheme for a binary tree, used by Hypercore; it is unrelated to the name of sparkles:wired's Flat format. An index says where nodes are addressed, not which bytes or signatures the nodes commit to.
A tile groups log nodes or entries into independently retrievable storage units (tiled logs). An outboard stores verification nodes separately from blob data (iroh/Bao). Both separate proof distribution from the encoded application's access layout. That separation lets a catalog remain memory-mappable while another layer verifies requested byte ranges.
Sources
- RFC 8949 §4.2: deterministic encoding terminology.
- Protobuf encoding guide: keys, varints and zig-zag.
- RFC 6962 §2.1: tree grammar and proofs.
- Subject pages provide pinned implementation evidence; comparison maps these concepts to Flat requirements.