zlib.decompress

zlib

decompress(data, max_size) -> decompressed, bytes_consumed, err

Decompress zlib-wrapped data

Input must include the zlib header and adler32 footer. Returns the decompressed data and the number of bytes consumed from the input. max_size caps the output, 64 MB by default; a larger cap is honoured, as in inflate. Input that ends before the stream does returns nil and "truncated stream".