zlib.inflate

zlib

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

Decompress raw deflate data

Returns the decompressed data and the number of compressed bytes consumed from the input. max_size caps the output, 64 MB by default as a guard against decompression bombs. A caller that knows the size may pass a larger cap. An output past the cap returns nil. Input that ends before the stream does returns nil and "truncated stream".