You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I couldn't find any command available in lua script to decompress strings compressed via popular compression libraries like zlib. It will be great if redis lua interpreter loads a zlib library by default.
Also any practical advice regarding decompressing string in lua scripts evaled by Redis is appreciated.
The text was updated successfully, but these errors were encountered:
That's because there isn't, but you've learned that the hard way.
It will be great if redis lua interpreter loads a zlib library by default.
Superficially, that could be a good a idea. However, do you really want Redis to spend its time (currently, Lua scripts block the main server thread) on compression and decompression? If Redis a Ferrari, that's like using it to drive to the grocery store :)
That said, while Redis itself doesn't do compression, Redis modules can! I'm not aware of a zlib module (although it should be fairly easy to put one together), but here's something that does a fairly sophisticated zstd (IIRC threaded): https://github.com/chadnickbok/redis-zstd-module
About redis spending time on decompression; I want that if the time complexity is linear with respect to the string size. If I am not making a mistake, the time for that is actually linear, so why not? For my use-case I actually don't need compression inside lua script.
Thanks for the provided link.
I couldn't find any command available in lua script to decompress strings compressed via popular compression libraries like zlib. It will be great if redis lua interpreter loads a zlib library by default.
Also any practical advice regarding decompressing string in lua scripts evaled by Redis is appreciated.
The text was updated successfully, but these errors were encountered: