Binary formats, schemas and verifiable encodings
A primary-source catalog of twenty-nine systems for describing bytes, serializing values and committing to data with hashes. Its purpose is to inform a reconsideration of the sparkles:wired Flat draft, not to revise that specification. The first consumers are a font catalog and glyph-atlas cache, built at package-build time and read from mapped files or Android assets. Describing OpenType's bounded foreign layouts is a separate stress test from designing that cache's own arena.
This survey answers nine questions:
- Which in-place formats bound verification work? Access and validation separates eager verification, checked views and traversal accounting, then evaluates
WFL23–WFL24. - Can one mechanism describe foreign bytes and build an arena? Relative offsets and foreign layouts compares base-relative pointers, sibling counts and tagged layouts with formats that own their encoding.
- Host-language schema or separate IDL? Declaration strategy prices Flat's D-types-and-attributes bet against generators and combinators.
- Is rebuilding instead of migrating sound? Evolution distinguishes disposable caches from separately distributed, long-lived files.
- What exactly should a content key identify? Determinism and hashing distinguishes repeatable builders, canonical values, output digests and build-input keys.
- Which Merkle structure fits partial atlas verification? Tree constructions compares typed roots, byte-range proofs, object DAGs and append-only logs.
- What do byte order and alignment really require? Alignment separates portable accessors from native references and examines the APK alignment constraint.
- Which real parser failures matter to Flat? Hostile input maps implementation incidents and differential risks to requirements and gaps.
- What should the owner keep, change, add or defer? The delta table names the draft's
WFLIDs and links each recommendation to evidence.
Last reviewed: October 17, 2026
IMPORTANT
Flat is a draft, not a delivered implementation. The baseline is pinned at 8a454ce151c23b3608467cf8e19821678583ecb3 from the docs/wired-flat branch. Its specification, delivery plan and open issues are cited externally because this catalog is independent of that branch. Performance claims about Flat remain proposed acceptance criteria.
Master catalog
The category describes the system's primary role, not an exclusivity claim: CDDL describes CBOR, while DAG-CBOR constrains CBOR for content addressing. All deep-dives use the same ten dimensions.
| Subject | Category | Schema or framing authority | Distinguishing property | Link |
|---|---|---|---|---|
| ASN.1: BER, DER, PER | Description language | ASN.1 types + encoding rules | Canonical restrictions versus schema-driven bit packing | Deep-dive |
| DFDL | Description language | Annotated XML Schema | Describes existing text and binary representations | Deep-dive |
| CDDL | Description language | Data-definition grammar | Constrains CBOR values, not native memory layout | Deep-dive |
| OMG IDL / CDR / XCDR2 | Description language | IDL + representation and extensibility rules | Alignment, byte order and evolution are protocol choices | Deep-dive |
| Kaitai Struct | Description language | Declarative .ksy | Seeks, counts and switches over foreign bytes | Deep-dive |
| Construct | Description language | Python combinator objects | Context-sensitive parsing and building | Deep-dive |
| Protocol Buffers | Schema-driven protocol | .proto field numbers | Tagged fields; deterministic is not canonical | Deep-dive |
| Apache Thrift | Schema-driven protocol | Thrift IDL + chosen protocol | Binary and compact encodings share field IDs | Deep-dive |
| Apache Avro | Schema-driven protocol | Writer schema + reader resolution | Positional encoding and schema fingerprints | Deep-dive |
| FlatBuffers | Schema-driven protocol | .fbs | Vtable-based in-place access with explicit verifier | Deep-dive |
| Cap'n Proto | Schema-driven protocol | .capnp | Word-oriented pointers; traversal budgets | Deep-dive |
| Simple Binary Encoding | Schema-driven protocol | XML message schema | Fixed block plus sequential groups and tails | Deep-dive |
| Bebop | Schema-driven protocol | .bop | Fixed structs versus evolvable framed messages | Deep-dive |
| MessagePack | Self-describing encoding | Type-marker grammar | Compact dynamically typed values | Deep-dive |
| CBOR | Self-describing encoding | RFC 8949 | Generic encoding plus deterministic profiles | Deep-dive |
| BSON | Self-describing encoding | Document grammar | Length-delimited typed elements with names | Deep-dive |
| Smile | Self-describing encoding | Jackson Smile grammar | JSON tokens with shared-name/value references | Deep-dive |
| UBJSON | Self-describing encoding | Marker grammar | JSON model with typed/counted container optimization | Deep-dive |
| Ethereum SSZ | Merkleized format | Consensus types and bounds | Canonical serialization and separate typed Merkle roots | Deep-dive |
| IPLD | Content-addressed formats | Data model + codec + CID | DAG-CBOR / DAG-PB and algorithm-labelled links | Deep-dive |
| Tendermint / CometBFT | Merkleized protocol | Protobuf schemas and consensus rules | Amino migration; simple RFC 6962-style tree | Deep-dive |
| COSE / deterministic CBOR / dCBOR | Signing and encoding profiles | RFCs and versioned dCBOR work | Exact signed bytes versus value-normalization rules | Deep-dive |
| Git objects | Content-addressed framing | Type, size and payload | Object identity precedes zlib storage | Deep-dive |
Plutus Core Data | Ledger encoding | Algebraic values + ledger CBOR rules | Datum hashes are not automatically a Merkle tree | Deep-dive |
| iroh / Bao | Verified byte framing | BLAKE3 tree and transfer grammar | Range verification with separate outboard nodes | Deep-dive |
| BitTorrent v2 | Merkleized distribution | BEP 52 | Per-file SHA-256 piece trees | Deep-dive |
| Certificate Transparency | Verifiable log framing | RFC 6962 and tiled/static APIs | Typed leaves, signed roots and append-only proofs | Deep-dive |
| TUF / in-toto | Signed metadata | Metadata schemas, canonical JSON, envelopes | Authentication and rollback policy above payload layout | Deep-dive |
| Hypercore | Signed append-only log | Block/tree and manifest encodings | Flat-tree indexing with signed commitments | Deep-dive |
Taxonomy
By encoding style
| Encoding style | Subjects | Important boundary |
|---|---|---|
| Describes another format | DFDL, Kaitai, Construct | Description power does not imply allocation-free views |
| Schema-defined positional or bit-oriented | PER, CDR, Avro, SBE, SSZ | Writer and reader must share enough schema context |
| Tagged fields or values | BER/DER, protobuf, Thrift, Bebop messages, MessagePack, CBOR, BSON, Smile, UBJSON | A value type marker is not an application field ID |
| Pointer/offset layout | FlatBuffers, Cap'n Proto, SSZ variable parts | Offset base and target extent differ across formats |
| Encoding profile or data model | CDDL, IPLD, COSE/dCBOR, Plutus Data | Schema, canonicalization and signing need separate rules |
| Object, blob or log framing | Git, Bao, BitTorrent v2, CT, TUF/in-toto, Hypercore, CometBFT | Integrity structure is not the application's memory layout |
By access model
| Access model | Examples | Cost that remains |
|---|---|---|
| Direct accessor views | FlatBuffers, Cap'n Proto, SBE fixed blocks | Bounds/verification, pointer following, version or byte-order checks |
| Fixed part plus variable tail | SSZ, SBE, Bebop | Dynamic-element boundaries or sequential scans |
| Sequential token/object decoding | protobuf, Thrift, Avro, MessagePack, CBOR, BSON, Smile, UBJSON, BER/PER, CDR | Materialization and indexing depend on implementation |
| Declarative parsing or validation | Kaitai, DFDL, Construct, CDDL | Generated/interpreted parse work; not a native-reference proof |
| Authenticated retrieval | IPLD, Git, Bao, BitTorrent, CT, CometBFT, Hypercore, TUF/in-toto, COSE, Plutus | Fetching, hashing or signature verification before trust |
By canonical-form contract
| Contract | Examples | Caution |
|---|---|---|
| Encoding constrained for a specified type/profile | DER, SSZ, DAG-CBOR, dCBOR | Type, profile revision and value equivalence remain part of the contract |
| Generic format with deterministic/canonical profile | CBOR, Cap'n Proto, TUF canonical JSON | Ordinary valid input need not satisfy the profile |
| Repeatable producer, not general canonicality | protobuf, FlatBuffers | Field order, builder history or representations can differ |
| Exact-byte commitment | Git, Bao, BitTorrent, COSE, DSSE, CT, CometBFT, Hypercore, Plutus datum hashes | A different encoding legitimately has a different identity |
| No general canonical profile established by the base format | Thrift, Avro, SBE, Bebop, MessagePack, BSON, Smile, UBJSON, CDR | Schema canonicalization or one encoder's stable output is not a universal value-encoding rule |
| Description, not a unique byte encoding | DFDL, CDDL, Kaitai, Construct | Canonicality belongs to the described format/profile, not to the declaration mechanism |
The synthesis examines formats without a single general canonical form, including name order, numeric representations, optional defaults and implementation-specific settings; absence is not permission to hash decoded values without defining their equivalence.
By merkleization
| Structure | Subjects | What the root means |
|---|---|---|
| Typed value tree | SSZ | A value under its type, bounds and mixing rules |
| Content-addressed object DAG | IPLD, Git | Encoded blocks linked by hashes |
| Byte chunk tree | Bao, BitTorrent v2 | Byte ranges under a particular tree construction |
| Append-only log tree | CT, CometBFT simple tree, Hypercore | Ordered leaves; log protocols add history and signatures |
| Whole encoded value or signed metadata, not inherently a tree | Plutus datum hash, COSE/dCBOR, TUF/in-toto | Exact scope and signature envelope must be read separately |
| No built-in Merkle construction | ASN.1, DFDL, CDDL, CDR, Kaitai, Construct, protobuf, Thrift, Avro, FlatBuffers, Cap'n Proto, SBE, Bebop, MessagePack, CBOR, BSON, Smile, UBJSON | Applications may layer one on top |
Analysis spine
Every deep-dive answers these ten dimensions, including why an absent capability does not apply:
- Schema source of truth.
- Wire encoding.
- Access model.
- Variable-length and optional data.
- Evolution and compatibility.
- Determinism and canonical form.
- Merkleization and content addressing.
- Hostile-input safety.
- Describing foreign formats.
- Implementation and performance evidence.
Milestones
These are dated standards or first-party historical markers, not claims about which implementation invented an idea. Edition-specific details live in the linked deep-dives.
| Date | Milestone | Evidence |
|---|---|---|
| 1988 | ASN.1 / BER appear in the X.208 / X.209 lineage | ASN.1 standards history |
| 2005 | Git makes typed, size-framed objects the unit of identity | Git objects |
| June 2013 | RFC 6962 standardizes Certificate Transparency's tree and signed structures | RFC 6962 |
| October 2013 | RFC 7049 publishes CBOR | RFC 7049 |
| June 2019 | RFC 8610 publishes CDDL | RFC 8610 |
| December 2020 | RFC 8949 replaces RFC 7049, specifying core deterministic encoding | RFC 8949 |
| August 2022 | RFC 9052 / RFC 9053 specify the revised COSE structures and algorithms | COSE |
| Revision-dependent | SSZ progressive types, dCBOR and static/tiled log APIs must be read at the surveyed revision, not as timeless deployment claims | SSZ, dCBOR, CT |
Suggested reading paths
- “I'm revisiting
sparkles:wiredFlat.” Concepts → comparison and delta table → FlatBuffers → Cap'n Proto → Kaitai → Construct → SSZ → Bao. Read the pinned draft beside the findings, not as their conclusion. - “I need to describe OpenType.” Foreign-layout comparison → Kaitai → DFDL → Construct → font parser contract.
- “I need portable signatures or content identity.” Canonicality → ASN.1 DER → CBOR → COSE/dCBOR → IPLD → TUF/in-toto.
- “I need partial verification.” Tree comparison → Bao → BitTorrent v2 → SSZ → CT → Hypercore.
- “I need language integration, not another wire format.” Declaration strategy → serde catalog → Construct → SBE.
Sources
Each subject page names its source revision, official specification sections, implementation paths and evidence limitations. Tool-produced bytes are labelled as observations; upstream vectors and illustrative derivations are not claimed as local benchmark measurements. Cross-subject recommendations are in comparison.
Existing research is linked rather than replicated: content addressing owns file-tree hashing and serde owns the lineage of sparkles:wired's shared schema. This catalog adds byte framing, access contracts, canonical encodings and typed or intra-file verification.