Lua: How to gzip a string (gzip, not zlib) in memory?
问题 Given a string, how can I compress it in memory with gzip? I'm using Lua. It sounds like an easy problem, but there is a huge list of libraries. So far, all that I tried were either dead or I could produce only zlib compressed strings. In my use case, I need gzip compression, as it is expected by the receiver. As a test, if you dump the compressed string to a file, zcat should be able to decompress it. I'm using OpenResty, so any Lua library should be fine. (The only solution that I got