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, …become0, 1, 2, 3, …) and then the same LEB128 encoding asUInt. 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 forF32F64: 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): exactlylengthbytes 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): exactlylengthbytes 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; exactlylengthelements.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; exactlylengthentries.Struct(fields): fields only, with no struct prefix.InheritedStruct(...): one struct node built by merging field maps,Structnodes, andSchemaobjects. Duplicate keys error. Delta structs are rejected. Field names are sorted the same way asStruct.DeltaStruct(fields): sparse struct; walks present input keys;u8present-count and field ids (max 255 present fields).DeltaStruct16(fields): sparse struct; walks present input keys;u16present-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: threeF32components, 12 bytes.VectorF16: threeF16components, 6 bytes.VectorF24: threeF24components, 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: twoF32components, 8 bytes.Vector2F16: twoF16components, 4 bytes.Vector2F24: twoF24components, 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: fourF32components, 16 bytes.UDim2Scale: the two scale components asF32, 8 bytes; decoded offsets are zero.UDim2Offset: the two offset components asF32, 8 bytes; decoded scales are zero.UDim2OffsetI16: the two offset components asI16, 4 bytes; decoded scales are zero.UDim2ScaleF24: the two scale components asF24, 6 bytes; decoded offsets are zero.UDim2Quant(scaleMin, scaleMax): the two scale components quantized intoU16over[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 inGetEnumItems(). The node uses 1 byte when that enum has at most 255 items, and 2 bytes otherwise. This is the item index, notEnumItem.Value.Enum8(enumType): deprecated. StoresEnumItem.Valuein 1 byte. PreferEnum.EnumObj: anEnumtype itself (not an item) as a 2-byte index intoEnum:GetEnums().
Roblox CFrames
CFrame: position plus a 3-by-3 rotation matrix using 12F32values, 48 bytes.CFrameF16: the same 12 components usingF16, 24 bytes.CFrameF24: the same 12 components usingF24, 36 bytes.QCFrame: position plus quaternion using sevenF32values, 28 bytes.QCFrameF16: the same seven values usingF16, 14 bytes.QCFrameF24: the same seven values usingF24, 21 bytes.CFrameQuant: position as threeF32values plus yaw, pitch, and roll asU16, 18 bytes.CFrameQuant8: position as threeF32values plus yaw, pitch, and roll asU8, 15 bytes.CFrameQuantF16: position as threeF16values plus yaw, pitch, and roll asU16, 12 bytes.CFrameQuant8F16: position as threeF16values plus yaw, pitch, and roll asU8, 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_VSIDreference ID.Instance24: a 3-byte_VSIDreference ID.SerInstance(className, schema): serializes the listed properties with no class or length prefix; deserialization callsInstance.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 isX, bit 1 isY, bit 2 isZ.Faces: one byte. Bits areFront,Top,Right,Back,Left,Bottom.DateTime:UnixTimestampMillisasf64, 8 bytes.DateTimeF32: the same millisecond timestamp asf32, 4 bytes. Lossy for large timestamps.DateTimeInt:UnixTimestampin whole seconds as a 5-byte unsigned integer.FloatCurveKey: time and value asf32, plus the interpolation-mode index, 9 bytes.Cubickeys also store both tangents and use 17 bytes.PhysicalProperties: density, friction, elasticity, friction weight, and elasticity weight as fivef32values, 20 bytes.NumberSequenceKeypoint: time, value, and envelope as threef32values, 12 bytes.NumberSequence: a 1-byte keypoint count (max 255), then 12 bytes per keypoint.NumberRange: min and max asf64, 16 bytes.NumberRangeF32: min and max asf32, 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). Anrbxassetid://family writes a0tag and the numeric id as unsigned LEB128. Other family strings error.Ray: origin as threef32values, direction magnitude asf32, and a unit direction packed as twoi16octahedral values, 20 bytes. The direction is lossy.TweenInfo: time and delay asf32, repeat count asi16, and one packed byte for reverses, easing style, and easing direction, 11 bytes.RaycastResult: distance asf32, material item index, a 2-byte_VSID, position as threef32values, and a normal packed as twoi16octahedral values, 23 bytes.RaycastResult8: the same layout with ani8octahedral 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.