class HTTP::Features::AutoDeflate::GzippedBody
Gzip-compressed request body wrapper
def compress(&block)
- Api: - public
Returns:
-
(nil)-
def compress(&block) gzip = Zlib::GzipWriter.new(BlockIO.new(block)) @body.each { |chunk| gzip.write(chunk) } ensure gzip.finish end