Conventions and Terminology
#2.1 Requirements language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 (RFC 2119, RFC 8174) when, and only when, they appear in all capitals, as shown here.
#2.2 Notation
a || b— concatenation of byte strings.0x..— hexadecimal bytes. Test vectors are lowercase hex.- "byte string" — an ordered sequence of octets.
- All multi-byte integers inside CBOR heads are big-endian (per CBOR); varints (§3.1) are little-endian base-128.
#2.3 Integers
Every integer on the wire in this format — CBOR integers (§5) and varints (§3.1) alike — MUST have magnitude ≤ 2^53 − 1. (This bound is chosen so that every conforming value is exactly representable in an IEEE-754 double; implementations in languages with native 64-bit integers MUST still enforce it on the wire.) There are no exceptions; individual fields impose only tighter ranges. DAG-CBOR itself permits the 64-bit signed range; this profile's bound is stricter, and a conforming value is valid DAG-CBOR either way (§5).
#2.4 Definitions
- Block — an immutable byte string stored under its hash.
- Ref — a reference to a block, carried on the wire as a CIDv1 Link (§4): the CID's content codec is the ref's kind (raw or node) and its multihash digest is the block's hash.
- CID — an IPLD Content IDentifier, version 1: a varint version, a varint content codec (multicodec), and a multihash (§2.5).
- Multihash — a self-describing hash value: varint hash-function code, varint digest length, digest.
- Multicodec — a varint code from the multiformats code table naming
a content type. This format uses
0x55(raw) and0x71(dag-cbor). - Multibase — a one-character prefix naming a base encoding of binary
data. This format uses
0x00(identity) in binary contexts andb(base32lower) in text contexts (§4). - Link — the DAG-CBOR encoding of a CID: tag 42 wrapping the byte
string
0x00 || CID(§5). - Node — a block whose bytes are a canonical-CBOR map with a type tag
(§6). Referenced with the
dag-cborcodec (§4). - Raw block — a block of opaque bytes (a file chunk). Referenced with
the
rawcodec (§4). - Entry — a CBOR map describing one directory member, including its metadata (§7).
- Store — a key–value namespace holding blocks and named refs (§10).
- Pack — a self-delimiting byte stream carrying a set of blocks plus a list of root refs: a CARv1 archive under the profile of §12.
- Spine — for a given path, the chain of blocks from the root to the block containing the path's final entry: the root node, then each component's directory node (and page segment, when paged). An edit rewrites exactly the spine of the edited path; every block off the spine carries over by reference.
- (binding) — a label on some rationale-styled paragraphs elsewhere in this document (e.g. §4 "Tag choice (binding)", §10.2). A paragraph so marked is normative despite reading as rationale.
#2.5 External specifications (normative)
- RFC 8949 — Concise Binary Object Representation (CBOR).
- DAG-CBOR — IPLD DAG-CBOR codec specification, https://ipld.io/specs/codecs/dag-cbor/spec/. This format's codec is a strict subset of DAG-CBOR (§5).
- CID — Content IDentifier specification, https://github.com/multiformats/cid.
- Multihash — https://github.com/multiformats/multihash.
- Multicodec — the multiformats code table, https://github.com/multiformats/multicodec.
- Multibase — https://github.com/multiformats/multibase.
- Unsigned varint — the multiformats unsigned varint (LEB128), https://github.com/multiformats/unsigned-varint; §3.1 states this format's stricter bounds.
- CARv1 — Content Addressable aRchive format, version 1, https://ipld.io/specs/transport/car/carv1/. Packs are CARv1 under the profile of §12.
- CARv2 — https://ipld.io/specs/transport/car/carv2/. Referenced only for version detection and optional import unwrapping (§12.5); never emitted.