I recently got interested in optimizing everything I can to make the game run as fast as possible and as smooth as possible. That led me down a rabbit hole to learn about buffering and optimizing remote event sending.
With that information i present to you my new buffer module!!!
This buffer is used for sending information through remote events from client to server or vice versa!
It’s used to compress numbers and strings down so when you send them over with remote events they don’t put that much load onto the server or respectively the client!
Here’s how to use it:
First you require the module.

After that you buffer the value you want ( in this case the number 20 ) and you send it over to the server.

On the side you want to receive it you require the module once again and listen for the event.
After that you just use the ReadBuffer function ( Remember: It has to have the same signed or unsigned property and you have to use the same function type that you used for writing to read the buffer. So if you used write8 you have to use read8. )

![]()
For strings, it works the exact same way, just use a different parameter when reading!
With all that said here is the module and i hope you guys can put it to good use!
BufferModule.lua (3.4 KB)
For anyone that is nerdy enough and wants to know all the logic on why and how this works you can either look at the buffer doc or just read the explanation below!
LUA ( or in this case, LUAU ) uses a universal type for numbers that takes up 8 bytes of memory which is an insanely high number and it also includes floating points which in general takes a lot of memory. With that said if you only need to send a small number or a number for type checking its way more efficient to compress that number down into a 1 byte instance making it up to 8 times more efficient!
Also, for anyone wondering:
8 bits (1 byte)
- Signed: −2^7 → 2^7 − 1 (−128 → 127)
- Unsigned: 0 → 2^8 − 1 (0 → 255)
16 bits (2 bytes)
- Signed: −2^15 → 2^15 − 1 (−32,768 → 32,767)
- Unsigned: 0 → 2^16 − 1 (0 → 65,535)
32 bits (4 bytes)
- Signed: −2^31 → 2^31 − 1 (−2.1 billion → 2.1 billion)
- Unsigned: 0 → 2^32 − 1 (0 → 4.29 billion)
64 bits (8 bytes)
- Signed: −2^63 → 2^63 − 1 (−9.22 quintillion → 9.22 quintillion)
- Unsigned: 0 → 2^64 − 1 (0 → 18.4 quintillion)
Thank you for anyone that has read this far. This is my first ever post so i hope i did good.
With all due respect,
Zixp ( SoulRhythm )
Have an amazing day and God bless!








