The compression algorithm I was referring to wasn’t related to my use cases for __gc
, but, I’d absolutely love a compression API. A feature request was already made to allow us to have access to the same compression used in rbxm files. To be honest, if we had this exposed, this would bring a whole new wave of rbxm processing imo, and it’d be huge for utilities like Rojo. I already shared support for the feature, but, it’s a few years old now so it may have been discarded for some reason or another, or maybe its just extremely low priority.
Additionally, the reason I have been developing my own algorithm for such a long time now is actually because it layers quite well with LZ4! In fact, I’d argue that my algorithm meshes so well when layered with LZ4 that its the perfect duo.
LZ4 is mainly based on repetition. My algorithm does little to no manipulation to bit structure, so not only can it be manipulated and stored directly in memory with a very low cost in a majority of cases, but it actually should end up improving LZ4 efficiency as the input size is significantly lower to begin with without negating most benefits of LZ4.
So, if LZ4 became exposed to developers, this would genuinely be one of the most important Roblox updates to me personally as it would give me a huge incentive for a professional release of my algorithm.
Edit: In fact here’s the specific request and my reply 2 years later Expose low level general compression as a lua function