Skip to main content

Buffer Compression

Hassle-free & Behind the Scenes

YetAnotherNet will work behind the scenes to automatically compress the data you send for you into Buffers. The library features an internal Ser/Des library to serialize all Luau Datatypes and most Roblox Datatypes.

What's great about this compression is that it requires almost no additional work from the user to use. As long as you use all supported datatypes, YetAnotherNet will pack your data efficiently into buffers with no data-loss.

You can see the list of Supported Datatypes and Unsupported Datatypes on this page.

Get Even More Buffer Compression

Hey! Did you know you could use Middleware to use libraries like Squash and Flamework Binary Serializer?

You can compress your data even more by checking out Compression with Squash and Compression with Flamework Binary Serializer.

Datatypes

Supported Datatypes

The following Datatypes can be Serialized by YetAnotherNet, when using these Datatypes, your data will be packed efficiently into a buffer.

Keep in mind that the buffer will be compressed even further by Roblox, the sizes listed here are not the sizes that will actually be sent over the network, the size sent may be lower.

DatatypeBytes
array (table)1-5 bytes per entry + size of value
dictionary (table)2-10 bytes per key-value pair + size of key and value
boolean1
number4
stringN/A
BrickColor2
CFrame48
Color312
DateTime8
EnumItemN/A
Instance4
Rect16
Region360
Region3int1612
TweenInfo25 + Size of EnumItems
UDim8
UDim216
Vector28
Vector2int164
Vector312
Vector3int166

Datatypes last updated 04/15/2024, any datatypes added after this date are Unimplemented/Unknown.

If a Datatype not listed here is sent, it will cause the library to send a partially compressed payload over the network, you will lose out on some compression, but the loss will try to be minimized.

Unsupported Datatypes

The following Datatypes are considered Unserializable, either because there is no way to properly serialize/deserialize them, or they have not been implemented.

If it's unimplemented, you may request it be implemented or create a Pull Request to implement it yourself.

DatatypeStatus
AxesUnimplemented: niche datatype
CatalogSearchParamsUnimplemented: niche datatype
ColorSequenceUnimplemented: requires ColorSequenceKeypoint
ColorSequenceKeypointUnimplemented
DockWidgetPluginGuiInfoUnimplemented: niche datatype
FacesUnimplemented
FloatCurveKeyUnimplemented
FontUnimplemented
functionCannot Serialize/Deserialize
NumberRangeUnimplemented
NumberSequenceUnimplemented: requires NumberSequenceKeypoint
NumberSequenceKeypointUnimplemented
OverlapParamsUnimplemented: niche datatype
Path2DControlPointUnimplemented
PathWaypointUnimplemented
PhysicalPropertiesUnimplemented
RandomCannot Serialize/Deserialize
RayUnimplemented
RaycastParamsUnimplemented: niche datatype
RaycastResultCannot Serialize/Deserialize
RBXScriptConnectionCannot Serialize/Deserialize
RBXScriptSignalCannot Serialize/Deserialize
RotationCurveKeyUnimplemented
SecretCannot Serialize/Deserialize
SharedTableCannot Serialize/Deserialize
threadCannot Serialize/Deserialize

Datatypes last updated 04/12/2024, any datatypes added after this date are Unimplemented/Unknown.

Some additional things to know about the supported datatypes are that tables are treated as dictionaries and arrays. Arrays will always be cheaper than using a Dictionary, make sure that you don't have any "holes" in your arrays, otherwise it will be serialized as an Dictionary.