Table of Contents

Enum CodecKind

Namespace
Typhon.Protocol
Assembly
Typhon.Protocol.dll

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 = 21

Radians in [−π, π), a two's-complement code (W7).

Bits = 23

An unsigned integer of N ∈ [1, 24] bits, in its section's pack (W12).

Blob = 27

Raw bytes: varu length, at most MaxBytes.

Bool = 1

A boolean: always one bit of its section's pack (W12).

Bytes = 26

Exactly N raw bytes.

EntityRef = 24

A netId as varu; 0 is null.

F16 = 11

IEEE half.

F32 = 10

IEEE single.

I16 = 5

Signed 16-bit integer, little-endian.

I32 = 7

Signed 32-bit integer, little-endian.

I8 = 3

Signed 8-bit integer.

List = 29

MinCount..MaxCount elements of Of: varu count | element* (W28).

Pos2 = 13

A 2D position, Quant per axis (W3).

Pos3 = 14

A 3D position, Quant per axis (W3).

Quant = 12

A scalar quantized over [min, max) at Bits bits (W2).

Quat3 = 22

A rotation, smallest-three in 32 bits (W8).

Snorm = 20

A value in [−1, 1]: max(q / (2ᵇ⁻¹ − 1), −1) (W6).

Str = 25

UTF-8 text: varu byte length, at most MaxBytes.

TickLo = 28

An absolute past tick from its low 16 bits, rebuilt against the frame's tick (W9).

U16 = 4

Unsigned 16-bit integer, little-endian.

U32 = 6

Unsigned 32-bit integer, little-endian.

U8 = 2

Unsigned 8-bit integer.

Unknown = 0

A token this library does not know. Decodable only by skipping FixedBytes.

Unorm = 19

A value in [0, 1]: q / (2ᵇ − 1) (W6).

Vari = 9

Zigzag-encoded signed LEB128 varint, 1–5 bytes.

Varu = 8

Unsigned LEB128 varint, 1–5 bytes.

Vec2 = 15

A signed 2D vector, Scale per step (W4).

Vec3 = 16

A signed 3D vector, Scale per step (W4).

Vel2 = 17

Engine-measured 2D displacement per tick, in position steps ÷ QuantaDiv (W5). Only inside a position.

Vel3 = 18

Engine-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.