MCPcopy
hub / github.com/valyala/fasthttp / BodyGunzip

Method BodyGunzip

http.go:512–514  ·  view source on GitHub ↗

BodyGunzip returns un-gzipped body data. This method may be used if the response header contains 'Content-Encoding: gzip' for reading un-gzipped body. Use Body for reading gzipped response body.

()

Source from the content-addressed store, hash-verified

510// 'Content-Encoding: gzip' for reading un-gzipped body.
511// Use Body for reading gzipped response body.
512func (resp *Response) BodyGunzip() ([]byte, error) {
513 return resp.BodyGunzipWithLimit(0)
514}
515
516// BodyGunzipWithLimit returns un-gzipped body data and limits the size
517// of uncompressed body data to maxBodySize bytes.

Callers 10

testFSFSCompressFunction · 0.95
TestCompressHandlerFunction · 0.95
TestCompressHandlerVaryFunction · 0.95
TestServeFileCompressedFunction · 0.95
testFSCompressFunction · 0.95
testResponseGzipExtFunction · 0.95

Calls 1

BodyGunzipWithLimitMethod · 0.95

Tested by 10

testFSFSCompressFunction · 0.76
TestCompressHandlerFunction · 0.76
TestCompressHandlerVaryFunction · 0.76
TestServeFileCompressedFunction · 0.76
testFSCompressFunction · 0.76
testResponseGzipExtFunction · 0.76