PIL / Positional Interchange Layout

Positional Interchange Layout

A binary layout for complete objects and partial changes.
Independent of the datastore that carries it.

Inside a PIL Record.

Conceptual layout. Actual widths depend
on the Definition and present fields.

01Field StatesAbsent · Null · Direct · Offset
02Integer WidthsWhen Enabled
03Direct ValuesScalars & Dictionary IDs
04End OffsetsVariable Boundaries
05Variable ValuesStrings · Bytes · Arrays

Absent is different from null. Adaptive integer encoding is selected by the Definition. REF16 remains an optional shared-value reference.

PIL / Positional Interchange Layout

PIL Definitions

Field positions, types, and dictionaries live in a shared Definition. A PIL record can carry complete state or a single changed field.

Definitions are encoded as CBOR. CDDL describes their structure; the codec enforces the remaining semantic rules.

Download the Definition Schema
A DefinitionJSON View of CBOR
{
  "definition": "payment/transactions",
  "pil": 0,
  "version": 0,
  "fields": [
    { "name": "id",           "type": "UUID" },
    { "name": "revision_id",  "type": "U16"  },
    { "name": "state", "type": "STRING",
      "values": ["pending", "authorized", "captured"] }
  ]
}
A Changestate: authorizedOmitted fields remain omitted.

Data Seeds & Seed Packs

Trie-Trunk implements PIL as data seeds and PIL PACs as seed packs. A seed pack groups data seeds under a Definition and can factor common values. Pods and Sods are the datastores that hold them on the server and in the browser.

The CDDL download describes the portable CBOR Definition structure. Trie-Trunk resource bindings belong to a separate application profile. It does not replace semantic validation or introduce a new wire format.

Explore Seeds

Pill Packer Libraries

Portable codecs, separate from Trie-Trunk’s storage and delivery policies.

Rust

PIL encoding and decoding, borrowed scans, PAC reading, and gzip decoding. The native codec also exposes a C ABI for language bindings.

JavaScript / WASM

Initial npm reader and definition-import bindings around the Rust codec, including browser use. Full encoding API parity is still pending.

Go

A synchronized wrapper over the Rust C ABI provides initial reader and definition APIs. The codec stays native; Go manages the integration.

Packages are not published yet. PAC writing and common-value selection still live in Trie-Trunk; extraction into Pill Packer is pending.