Skip to main content

Type catalog

All public nodes are under VoidSentryUltimate.Types. Sizes below are wire sizes. Variable-size nodes include the stated prefix plus their payload.

Numbers​

  • U8, I8: 1-byte unsigned or signed integer.
  • U16, I16: 2-byte unsigned or signed integer.
  • U24, I24: 3-byte unsigned or signed integer.
  • U32, I32: 4-byte unsigned or signed integer.
  • U40, I40: 5-byte unsigned or signed integer.
  • U48, I48: 6-byte unsigned or signed integer.
  • UInt: unsigned LEB128 integer, 1 to 8 bytes. Each byte carries 7 value bits; the high bit marks another byte. Widths are 1 byte below 2^7, 2 below 2^14, 3 below 2^21, 4 below 2^28, 5 below 2^35, 6 below 2^42, 7 below 2^49, and 8 below 2^56. Negative values are rejected.
  • Int: signed integer stored as ZigZag (0, -1, 1, -2, … become 0, 1, 2, 3, …) and then the same LEB128 encoding as UInt. Small magnitudes stay short; a negative value uses the same width as the matching unsigned magnitude.
  • F16: 2-byte reduced-precision float.
  • F24: 3-byte reduced-precision float.
  • F32: 4-byte float.
  • Number: Alias for F32
  • F64: 8-byte float.

F16 uses less space than F24, with less precision and range. F24 retains more of an F32 value while still saving one byte. Both are lossy conversions; use F32 or F64 when reduced precision is unacceptable. The implementation does not promise application-specific error bounds, so test representative values before choosing a reduced format.

Booleans​

  • Bool: one boolean in 1 byte.
  • BoolPacked: exactly 8 booleans packed into 1 byte, in array positions 1 through 8.
local flags = {
true,
false,
true,
false,
true,
false,
true,
false,
}

local bytes = VoidSentryUltimate.Serialize(Types.BoolPacked, flags)

Strings​

  • String: 2-byte unsigned byte-length prefix, then 0 to 65,535 bytes.
  • String8: 1-byte unsigned byte-length prefix, then 0 to 255 bytes.
  • String24: 3-byte unsigned byte-length prefix, then 0 to 16,777,215 bytes.
  • StringFixed(length): exactly length bytes with no prefix.

The prefix records bytes, not UTF-8 characters. StringFixed requires the caller to provide exactly the configured byte length.

Buffers​

  • Buffer: 2-byte unsigned length prefix, then 0 to 65,535 bytes.
  • Buffer8: 1-byte unsigned length prefix, then 0 to 255 bytes.
  • Buffer24: 3-byte unsigned length prefix, then 0 to 16,777,215 bytes.
  • BufferFixed(length): exactly length bytes with no prefix.

Collections and composition​

  • Array(node): 2-byte element-count prefix.
  • Array8(node): 1-byte element-count prefix.
  • Array24(node): 3-byte element-count prefix.
  • ArrayFixed(node, length): no prefix; exactly length elements.
  • Map(keyNode, valueNode): 2-byte entry-count prefix.
  • Map8(keyNode, valueNode): 1-byte entry-count prefix.
  • Map24(keyNode, valueNode): 3-byte entry-count prefix.
  • MapFixed(keyNode, valueNode, length): no prefix; exactly length entries.
  • Struct(fields): fields only, with no struct prefix.
  • DeltaStruct(fields): sparse struct; walks present input keys; u8 present-count and field ids (max 255 present fields).
  • DeltaStruct16(fields): sparse struct; walks present input keys; u16 present-count and field ids (max 65,535 present fields).
  • Optional(node): 1-byte presence marker, followed by the value only when present.

The 1-, 2-, and 3-byte count prefixes represent up to 255, 65,535, and 16,777,215 entries respectively. Fixed variants do not encode a count and perform no exact-length validation.

Vectors​

The Roblox module exposes Vector3 nodes:

  • Vector: three F32 components, 12 bytes.
  • VectorF16: three F16 components, 6 bytes.
  • VectorF24: three F24 components, 9 bytes.
  • VectorU8, VectorI8: three integer components, 3 bytes.
  • VectorU16, VectorI16: three integer components, 6 bytes.
  • VectorU24, VectorI24: three integer components, 9 bytes.

It also exposes Vector2 nodes:

  • Vector2: two F32 components, 8 bytes.
  • Vector2F16: two F16 components, 4 bytes.
  • Vector2F24: two F24 components, 6 bytes.
  • Vector2U8, Vector2I8: two integer components, 2 bytes.
  • Vector2U16, Vector2I16: two integer components, 4 bytes.
  • Vector2U24, Vector2I24: two integer components, 6 bytes.

The pure Luau module exposes the Vector, VectorF16, VectorF24, VectorU8, VectorI8, VectorU16, VectorI16, VectorU24, and VectorI24 names for Luau's vector type. It has vector support but no Roblox-only types.

Roblox UI and value types​

  • UDim2: four F32 components, 16 bytes.
  • UDim2Scale: the two scale components as F32, 8 bytes; decoded offsets are zero.
  • UDim2Offset: the two offset components as F32, 8 bytes; decoded scales are zero.
  • UDim2OffsetI16: the two offset components as I16, 4 bytes; decoded scales are zero.
  • UDim2ScaleF24: the two scale components as F24, 6 bytes; decoded offsets are zero.
  • UDim2Quant(scaleMin, scaleMax): the two scale components quantized into U16 over [scaleMin, scaleMax], 4 bytes; decoded offsets are zero.
  • Color3: RGB channels as three bytes, 3 bytes.
  • Enum(enumType): an enum item's numeric value in 2 bytes.
  • Enum8(enumType): an enum item's numeric value in 1 byte.

Roblox CFrames​

  • CFrame: position plus a 3-by-3 rotation matrix using 12 F32 values, 48 bytes.
  • CFrameF16: the same 12 components using F16, 24 bytes.
  • CFrameF24: the same 12 components using F24, 36 bytes.
  • QCFrame: position plus quaternion using seven F32 values, 28 bytes.
  • QCFrameF16: the same seven values using F16, 14 bytes.
  • QCFrameF24: the same seven values using F24, 21 bytes.
  • CFrameQuant: position as three F32 values plus yaw, pitch, and roll as U16, 18 bytes.
  • CFrameQuant8: position as three F32 values plus yaw, pitch, and roll as U8, 15 bytes.
  • CFrameQuantF16: position as three F16 values plus yaw, pitch, and roll as U16, 12 bytes.
  • CFrameQuant8F16: position as three F16 values plus yaw, pitch, and roll as U8, 9 bytes.

The compressed variants trade precision for smaller payloads. Quaternion variants are smaller than matrix variants but reconstruct orientation from quaternion components. Quantized variants store Euler angles instead of a matrix or quaternion; U8 orientation is coarser than U16.

Roblox instances​

  • Instance: a 2-byte _VSID reference ID.
  • Instance24: a 3-byte _VSID reference ID.
  • SerInstance(className, schema): serializes the listed properties with no class or length prefix; deserialization calls Instance.new(className) and assigns those properties.

For Instance and Instance24, module initialization maintains maps between instances and IDs. On the server, existing and newly added descendants receive a numeric _VSID attribute and IDs from removed descendants can be reused. On the client, existing and newly added descendants are observed and their replicated _VSID attributes populate the local maps. The referenced instance must be present and reachable in the current context.

SerInstance is different: it does not serialize a reference and does not use _VSID. It creates a new instance during deserialization. Its property names are sorted when the node is created, and only the listed property values are written.

Pure Luau availability​

LuauVS.luau exposes exactly these public Types names:

  • Numbers and booleans: U8, I8, U16, I16, U24, I24, U32, I32, U40, I40, U48, I48, UInt, Int, F16, F24, F32, Number, F64, Bool, BoolPacked.
  • Strings and buffers: String, String8, String24, StringFixed, Buffer, Buffer8, Buffer24, BufferFixed.
  • Collections: Array, Array8, Array24, ArrayFixed, Map, Map8, Map24, MapFixed, Struct, DeltaStruct, DeltaStruct16, Optional.
  • Vectors: Vector, VectorF16, VectorF24, VectorU8, VectorI8, VectorU16, VectorI16, VectorU24, VectorI24.

The Roblox module contains all names above plus the Roblox-only names documented in this page.