Enum CodecKind
The closed set of wire codecs (03-wire-protocol § 4). A client refuses at WELCOME a codec it does not know, unless the field declares
FixedBytes and can therefore be skipped.
public enum CodecKind
Fields
Angle = 21Radians in [−π, π), a two's-complement code (W7).
Bits = 23An unsigned integer of N ∈ [1, 24] bits, in its section's pack (W12).
Blob = 27Raw bytes:
varulength, at most MaxBytes.Bool = 1A boolean: always one bit of its section's pack (W12).
Bytes = 26Exactly N raw bytes.
EntityRef = 24A netId as
varu; 0 is null.F16 = 11IEEE half.
F32 = 10IEEE single.
I16 = 5Signed 16-bit integer, little-endian.
I32 = 7Signed 32-bit integer, little-endian.
I8 = 3Signed 8-bit integer.
List = 29MinCount..MaxCount elements of Of:
varu count | element*(W28).Pos2 = 13A 2D position, Quant per axis (W3).
Pos3 = 14A 3D position, Quant per axis (W3).
Quant = 12A scalar quantized over [min, max) at Bits bits (W2).
Quat3 = 22A rotation, smallest-three in 32 bits (W8).
Snorm = 20A value in [−1, 1]: max(q / (2ᵇ⁻¹ − 1), −1) (W6).
Str = 25UTF-8 text:
varubyte length, at most MaxBytes.TickLo = 28An absolute past tick from its low 16 bits, rebuilt against the frame's tick (W9).
U16 = 4Unsigned 16-bit integer, little-endian.
U32 = 6Unsigned 32-bit integer, little-endian.
U8 = 2Unsigned 8-bit integer.
Unknown = 0A token this library does not know. Decodable only by skipping FixedBytes.
Unorm = 19A value in [0, 1]: q / (2ᵇ − 1) (W6).
Vari = 9Zigzag-encoded signed LEB128 varint, 1–5 bytes.
Varu = 8Unsigned LEB128 varint, 1–5 bytes.
Vec2 = 15A signed 2D vector, Scale per step (W4).
Vec3 = 16A signed 3D vector, Scale per step (W4).
Vel2 = 17Engine-measured 2D displacement per tick, in position steps ÷ QuantaDiv (W5). Only inside a position.
Vel3 = 18Engine-measured 3D displacement per tick (W5). Only inside a position.
Remarks
Closed, and that is the point. Server-side a codec is a struct type parameter of the column loop, so the JIT specializes and inlines it — a
specialization detail that cannot cross the wire. Naming each codec by a kind plus its parameters is what lets a TypeScript client decode any Typhon
server with one interpreter and no build step.
Every member has an explicit wire token (CodecTokens): the tokens are the contract the TypeScript codec table is keyed by, so they are
not left to a naming policy — varu and unorm are not the camelCase of any readable identifier. Unknown is what a token from a
newer server parses to.