Open source compressor

Noob Compressor


Background
This is a simple algorithm for compressing data. Can be effective for datastores as long as you have repeating patterns. There are no downsides to using it but it may not be as effective in data without repeating phrases.

Use cases
I am still keeping it open in case anyone wants to learn more about data compression or has a specific use case. This compression algorithm requires data that has frequent patterns however and may not work in diverse systems.


4 Likes

Wait I just noticed some issues with the compression size I am really sorry I have been having a bit of trouble with it

Thanks but don’t need this.

Roblox already lets you store unlimited data and an enormous amount per key (4mb)

Oh really? How come there are all those games that limit your build count?

Okay I fixed the compression issue!

All of which games?

If anyone is limiting your build count it’s probably because they don’t know how to save your builds over multiple keys.

I’m not saying compression is bad, just not always necessary.

Cool!

Do you think we should save builds over multiple keys?

Yes. If it exceeds 4mb. That way it can be infinitely big. (well not infinitely because you still have to abide by the rate limits, but enormously big that virtually no player will ever reach it)

How do I know once it exceeds 4MB, requiring an extended size?

You can use string.len() and httpservice:JSONEncode() to get the size in bytes of the table.


To be clear, I’m not against compression. Honestly I never made something where I had to think about it. If I do I’ll keep this resource in mind. Thanks for it!

What if your compressing data to be sent over a remote? The amount of time it takes to compress and decompress is negligible compared to the latency of sending data. That latency also decreases with compressed data.

4 Likes