Fireboltofdeath / flamework-binary-serializer

A blazing fast binary serializer, or something
6 stars 0 forks source link

Add CFrame packing #13

Closed Fireboltofdeath closed 5 months ago

Fireboltofdeath commented 5 months ago

Adds support for CFrame packing.

This reduces the size of CFrames when its position is Vector3.zero/Vector3.one or when its rotation is axis aligned. When packed, each CFrame has an additional 1 bit of overhead.

When both position and rotation are optimized, each CFrame only takes a byte + 1 bit. If only one is optimized, the CFrame is 11 bytes smaller than normal.