RLCL V0.1.0 [Release]; A dynamic, lossless compression module for Roblox

RLCL is the acronym for the full name, “Roblox Lossless Compression Library.”

This project aims to provide Developers with open-source compression algorithms to enhance their experiences.

RLCL has many features and packages; when I’m posting this (7/21/23), there are LZ4, LZW, and byte packages.

To get started, insert the module into your game. Using it is very straightforward.

Here’s some pseudo-code to get an idea of how this works. (mind you, I made this off a whim)

local RLCL = require(script.RLCL) 
local LZ4 = RLCL.LZ4

local ToCompress = "tobeornottobeortobe"
local Compressed = LZ4.Encode(ToCompress)

print(Compressed)

local Decompressed = LZ4.Decode(Compressed)

print(Decompressed)

There’s also a multitude of exported types at the top of the module.

export type ByteArray = {number}

export type LZW = {Encode : (Input: string)->ByteArray, Decode : (Input: ByteArray)->string?}
export type Bytes = {ToBytes : (Input: string)->ByteArray, ToString : (Input: ByteArray)->string, RandomBytes : (Generations: number)->ByteArray}
export type LZ4 = {Encode : (Input: string)->string, Decode : (Input: string)->string}

Enjoy the RLCL module; and let me know what I should add next <3

Nalcij’s RLCL [V0.1.0].lua (9.5 KB)

10 Likes