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.
const Flags = {
true,
false,
true,
false,
true,
false,
true,
false,
}

const 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.
  • String32: 4-byte unsigned byte-length prefix.
  • 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.
  • Buffer32: 4-byte unsigned length prefix.
  • 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.
  • Array32(node): 4-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.
  • Map32(keyNode, valueNode): 4-byte entry-count prefix.
  • MapFixed(keyNode, valueNode, length): no prefix; exactly length entries.
  • Struct(fields): fields only, with no struct prefix.
  • InheritedStruct(...): one struct node built by merging field maps, Struct nodes, and Schema objects. Duplicate keys error. Delta structs are rejected. Field names are sorted the same way as Struct.
  • 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.

Struct and Schema objects with 0 through 16 fields use inlined writers. Larger field counts use a loop. InheritedStruct and InheritedSchema use that same cutoff after the merge.

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. Each channel is truncated.
  • Color3Round: the same 3-byte layout, with each channel rounded.
  • BrickColor: a built-in palette index in 1 byte.
  • ColorSequenceKeypoint: time stored in one byte (round(time * 255) / 255) plus RGB bytes, 4 bytes.
  • ColorSequence: a 1-byte keypoint count (max 255), then 4 bytes per keypoint.
  • Enum(enumType): the item's index in GetEnumItems(). The node uses 1 byte when that enum has at most 255 items, and 2 bytes otherwise. This is the item index, not EnumItem.Value.
  • Enum8(enumType): deprecated. Stores EnumItem.Value in 1 byte. Prefer Enum.
  • EnumObj: an Enum type itself (not an item) as a 2-byte index into Enum:GetEnums().

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 names are sorted when the node is created, and only the listed values are written.

A schema key that is not a real property of the class, and whose node is Instance, Instance24, or another SerInstance, is treated as a child. Serialization reads that child from the instance. Deserialization parents the decoded instance onto the new one. The schema key is not written as the child's Name; set Name inside the child schema when the name matters.

More Roblox datatypes​

  • Axes: one byte. Bit 0 is X, bit 1 is Y, bit 2 is Z.
  • Faces: one byte. Bits are Front, Top, Right, Back, Left, Bottom.
  • DateTime: UnixTimestampMillis as f64, 8 bytes.
  • DateTimeF32: the same millisecond timestamp as f32, 4 bytes. Lossy for large timestamps.
  • DateTimeInt: UnixTimestamp in whole seconds as a 5-byte unsigned integer.
  • FloatCurveKey: time and value as f32, plus the interpolation-mode index, 9 bytes. Cubic keys also store both tangents and use 17 bytes.
  • PhysicalProperties: density, friction, elasticity, friction weight, and elasticity weight as five f32 values, 20 bytes.
  • NumberSequenceKeypoint: time, value, and envelope as three f32 values, 12 bytes.
  • NumberSequence: a 1-byte keypoint count (max 255), then 12 bytes per keypoint.
  • NumberRange: min and max as f64, 16 bytes.
  • NumberRangeF32: min and max as f32, 8 bytes. Lossy.
  • Font: one packed byte for weight and italic style, then the family. A built-in family adds one id byte (2 bytes total). An rbxassetid:// family writes a 0 tag and the numeric id as unsigned LEB128. Other family strings error.
  • Ray: origin as three f32 values, direction magnitude as f32, and a unit direction packed as two i16 octahedral values, 20 bytes. The direction is lossy.
  • TweenInfo: time and delay as f32, repeat count as i16, and one packed byte for reverses, easing style, and easing direction, 11 bytes.
  • RaycastResult: distance as f32, material item index, a 2-byte _VSID, position as three f32 values, and a normal packed as two i16 octahedral values, 23 bytes.
  • RaycastResult8: the same layout with an i8 octahedral normal, 21 bytes.

RaycastResult and RaycastResult8 deserialize to a plain table with Position, Distance, Material, Instance, and Normal. Roblox does not provide a RaycastResult constructor, so the result is not a RaycastResult userdata. Instance uses the same _VSID map as Types.Instance. The normal is lossy; RaycastResult8 is coarser than RaycastResult.

Pure Luau availability​

The pure Luau module exposes 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, String32, StringFixed, Buffer, Buffer8, Buffer24, Buffer32, BufferFixed.
  • Collections: Array, Array8, Array24, Array32, ArrayFixed, Map, Map8, Map24, Map32, MapFixed, Struct, InheritedStruct, DeltaStruct, DeltaStruct16, Optional.
  • Vectors: Vector, VectorF16, VectorF24, VectorU8, VectorI8, VectorU16, VectorI16, VectorU24, VectorI24.

The Roblox module contains every name in that list, plus the Roblox-only names documented on this page.