Table of Contents

Class CatalogCodec

Namespace
Typhon.Protocol
Assembly
Typhon.Protocol.dll

A codec: a CodecKind and the parameters that kind reads. Parameters a kind does not read stay at their default and are not written.

public sealed class CatalogCodec
Inheritance
CatalogCodec
Inherited Members

Remarks

Nothing here names a CLR type or a storage offset. A decoder that does not recognise Kind can still skip the field when FixedBytes says how wide it is — which only a codec newer than this library carries.

Constructors

CatalogCodec()

public CatalogCodec()

Properties

Bits

Width in bits for the quantizing kinds: 8, 16, 24 or 32.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public int Bits { get; init; }

Property Value

int

FixedBytes

Wire width in bytes, declared only by a codec newer than the protocol minor a client may speak, so that client can skip the field instead of refusing the catalog.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public int FixedBytes { get; init; }

Property Value

int

Kind

The codec kind Type names; Unknown for a token this library does not know.

[JsonIgnore]
public CodecKind Kind { get; init; }

Property Value

CodecKind

Max

Upper bound per axis (exclusive), paired with Min.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public double[] Max { get; init; }

Property Value

double[]

MaxBytes

Upper bound on encoded length for Str and Blob.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public int MaxBytes { get; init; }

Property Value

int

MaxCount

The most elements a List may carry, at most 255.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public int MaxCount { get; init; }

Property Value

int

Min

Lower bound per axis (inclusive): one value for Quant, two or three for a position.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public double[] Min { get; init; }

Property Value

double[]

MinCount

The fewest elements a List may carry.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public int MinCount { get; init; }

Property Value

int

N

Bit count for Bits, or byte count for Bytes.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public int N { get; init; }

Property Value

int

Of

The element codec of a List.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public CatalogCodec Of { get; init; }

Property Value

CatalogCodec

QuantaDiv

Divisor applied to the position step, for Vel2 and Vel3.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public int QuantaDiv { get; init; }

Property Value

int

Scale

The size of one step, for Vec2 and Vec3.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public double Scale { get; init; }

Property Value

double

Type

The codec's wire token, serialized as t — the name the TypeScript table is keyed by. Kept as the token rather than the enum so a codec newer than this library survives a parse and a re-serialization unchanged.

[JsonPropertyName("t")]
public string Type { get; init; }

Property Value

string