Woven from repetition
Named after Old English twilic — the root of twill. Repeated keys, shapes, and strings are woven together, not sent again and again.
MessagePack-like usability. Decisively smaller on repeated structure, keys, strings, and homogeneous arrays.
import { encode, decode } from '@twilic/core'
// same-shape objects → keys sent once
const records = [
{ id: 1001n, name: 'alice', score: 98.6 },
{ id: 1002n, name: 'bob', score: 74.1 },
{ id: 1003n, name: 'carol', score: 88.0 },
]
const bytes = encode(records)
// keys written once · values only per row
const decoded = decode(bytes)
Named after Old English twilic — the root of twill. Repeated keys, shapes, and strings are woven together, not sent again and again.
Dynamic profile works like MessagePack with no schema required. Bound profile uses a shared schema to eliminate field names and type tags entirely.
First transmission may be self-describing. Compact forms activate automatically as repetition is observed — no manual tuning needed.
Row-wise and columnar batch profiles with per-column codecs — delta, FOR, RLE, XOR float, dictionary — for decisive wins on tabular data.
Optional stateful mode supports base snapshots, state patches, template batches, and trained dictionaries over long-lived streams.
Official implementations in Rust, Go, Python, JavaScript/TypeScript, Java, Scala, Ruby, R, Zig, PHP, Kotlin, Dart, Elixir, Lua, C, C++, C#, and Swift.