Skip to content

Wisp Supported Types

Primitives

TypeTagWire SizeRoblox TypeExample / Notes
NIL01 bytenilNull value
BOOL12 bytesbooleantrue, false
U822 bytesnumber0255
U1633 bytesnumber065,535
U3245 bytesnumber04,294,967,295
I852 bytesnumber-128127
I1663 bytesnumber-32,76832,767
I3275 bytesnumber-2,147,483,6482,147,483,647
F3285 bytesnumber32-bit float (round-trip check)
F6499 bytesnumber64-bit float (NaN, ±Infinity)

Strings

TypeTagWire SizeRoblox TypeExample / Notes
STR8103 + lenstringMax 255 bytes: "hello"
STR16114 + lenstringMax 65,535 bytes: long text

Vectors & Spatial

TypeTagWire SizeRoblox TypeExample / Notes
VEC31213 bytesVector3Vector3.new(1, 2, 3) — 3×f32
VEC2209 bytesVector2Vector2.new(10, 20) — 2×f32
VEC3INT16337 bytesVector3int16Vector3int16.new(1, 2, 3) — 3×i16
VEC2INT16345 bytesVector2int16Vector2int16.new(5, 10) — 2×i16
CF_LOSSY1329 bytesCFrameAxis-angle (pos + axis + angle) — 7×f32
±0.001mm precision
CF_FULL1449 bytesCFrameFull matrix — 12×f32
For sheared/non-standard CFrames
RAY2225 bytesRayRay.new(origin, direction) — 6×f32
REGION33925 bytesRegion3CFrame center + half-size — 6×f32
REGION3INT164013 bytesRegion3int16Min/Max — 6×i16

Colors & UI

TypeTagWire SizeRoblox TypeExample / Notes
COLOR3154 bytesColor3Color3.fromRGB(255, 128, 0) — 3×u8 (0–255)
BRICKCLR243 bytesBrickColorBrickColor.new("Bright red") — u16 palette ID
UDIM279 bytesUDimUDim.new(0.5, 10) — f32 + i32
UDIM22117 bytesUDim2UDim2.new(0, 100, 0, 50) — 2×(f32+i32)
RECT2817 bytesRectRect.new(0, 0, 100, 100) — 4×f32

Sequences

TypeTagWire SizeRoblox TypeExample / Notes
COLORSEQ292 + N×7ColorSequenceMax 255 keypoints
Each: f32 time + 3×u8 RGB
COLORSEQKP458 bytesColorSequenceKeypointSingle keypoint
NUMSEQ302 + N×12NumberSequenceMax 255 keypoints
Each: 3×f32 (time, value, envelope)
NUMBERSEQKP4613 bytesNumberSequenceKeypointSingle keypoint
NRANGE236 or 10NumberRangeNumberRange.new(0, 100)

Tables & Arrays

TypeTagWire SizeRoblox TypeExample / Notes
TABLE173 + datatableDictionary {hp=100, name="Bob"}
Max 65,535 fields
ARRAY183 + datatableSequence {1, 2, 3, 4}
Max 65,535 elements
ARRAY_RLE193 + runstableRun-length encoded array
Auto for runs ≥3 in 64+ elements
DELTA263 + patchtablePatch format for delta encoding

Special Types

TypeTagWire SizeRoblox TypeExample / Notes
ENUM254 + lenEnumItemEnum.Material.Plastic
Wire: enum name (str8) + u16 value
INSTANCE485 bytesInstanceRegistered via Buffer.RegisterInstance(inst, id)
Wire: u32 ID
FONT31variesFontFamily (str8) + Weight (u16) + Style (u8)
CONTENT32variesContentURI as str8 or str16 (if ≥255 bytes)
DATETIME389 bytesDateTimeDateTime.now() — f64 UnixMillis
PHYSPROP3521 bytesPhysicalPropertiesCustom: 5×f32 (density, friction, elasticity, weights)
PHYSPROP_DEFAULT361 bytePhysicalPropertiesDefault (Plastic) — tag only
AXES422 bytesAxesBitmask: X=1, Y=2, Z=4
FACES432 bytesFacesBitmask: Top/Bottom/Left/Right/Front/Back
TWEENINFO4416 bytesTweenInfof32 time + 2×u8 style/dir + i32 repeats + u8 reverses + f32 delay

Compression Wrappers

TypeTagWire SizeFormatNotes
LZ44713 + compressedCompressedHeader: tag(1) + origSize(4) + compSize(4) + adler32(4) + payload
DEFLATE4913 + compressedCompressedFixed Huffman — best for text
ZSTD5013 + compressedCompressedServer-only via EncodingService

Custom Types

TypeTagWire SizeAPINotes
CUSTOM412 + dataBuffer.RegisterType(id, customType)User-defined encoders/decoders
Max 255 custom type IDs (0–254)

Notes

Automatic Type Selection

  • Numbers: numTag() auto-selects smallest tag (U8 → F64)
  • CFrame: Prefers CF_LOSSY (29 bytes) when precision ≤1mm, else CF_FULL (49 bytes)
  • Arrays: Auto-applies RLE when beneficial (≥64 elements, ≥3-element runs)

Size Limits

  • String: Max 65,535 bytes (STR16)
  • Table/Array: Max 65,535 fields/elements
  • Schema: Max 32 fields for delta encoding (bitmask limit)
  • ColorSequence/NumberSequence: Max 255 keypoints

Wire Format Pattern

[TAG:u8] [SIZE_IF_NEEDED] [DATA]
  • Tag always 1 byte
  • Variable-length data uses u8/u16 length prefix
  • Fixed-size types omit length (e.g., Vector3 is always 12 bytes)

Released under the MIT License.