I used it as following
local zlib = require("zlib")
local inflate_stream = zlib.inflate()
local inflated_body = inflate_stream(rbody)
local reverted_rbody, _ = string.gsub(inflated_body, "AAA", "BBB")
local deflate_stream = zlib.deflate()
rbody = deflate_stream("reverted_rbody", 'full')
I want to unzip it, replace something, then zip it again.
But the re-compressed content got another format, that was not a gzip again
I can't gunzip the output, it said "not a gzip"
Any hint appreciate !