decompress package:zlib

Decompress a stream of data in the gzip format, throw DecompressError on failure. Note that the decompression is performed lazily. Errors in the data stream may not be detected until the end of the stream is demanded (since it is only at the end that the final checksum can be checked). If this is important to you, you must make sure to consume the whole decompressed stream before doing any IO action that depends on it.
Decompress a stream of data in the zlib format, throw DecompressError on failure. Note that the decompression is performed lazily. Errors in the data stream may not be detected until the end of the stream is demanded (since it is only at the end that the final checksum can be checked). If this is important to you, you must make sure to consume the whole decompressed stream before doing any IO action that depends on it.
Decompress a data stream provided as a lazy ByteString. It will throw an exception if any error is encountered in the input data. If you need more control over error handling then use one the incremental versions, decompressST or decompressIO.
Decompress a stream of data in the raw deflate format.
Like decompress but with the ability to specify various decompression parameters. Typical usage:
decompressWith defaultCompressParams { ... }
Incremental decompression in the IO monad. Chunk size must fit into CUInt.
Incremental decompression in the ST monad. Using ST makes it possible to write pure lazy functions while making use of incremental decompression. Chunk size must fit into CUInt.
Like decompress but with the ability to specify various decompression parameters.
The possible error cases when decompressing a stream. This can be shown to give a human readable error message.
The full set of parameters for decompression. The defaults are defaultDecompressParams. The decompressBufferSize is the size of the first output buffer, containing the uncompressed data. If you know an exact or approximate upper bound on the size of the decompressed data then setting this parameter can save memory. The default decompression output buffer size is 32k. If your estimate is wrong it does not matter too much, the default buffer size will be used for the remaining chunks. One particular use case for setting the decompressBufferSize is if you know the exact size of the decompressed data and want to produce a strict ByteString. The compression and decompression functions use lazy ByteStrings but if you set the decompressBufferSize correctly then you can generate a lazy ByteString with exactly one chunk, which can be converted to a strict ByteString in O(1) time using concat . toChunks.
The unfolding of the decompression process, where you provide a sequence of compressed data chunks as input and receive a sequence of uncompressed data chunks as output. The process is incremental, in that the demand for input and provision of output are interleaved. To indicate the end of the input supply an empty input chunk. Note that for gzipFormat with the default decompressAllMembers True you will have to do this, as the decompressor will look for any following members. With decompressAllMembers False the decompressor knows when the data ends and will produce DecompressStreamEnd without you having to supply an empty chunk to indicate the end of the input.
Includes any trailing unconsumed input data.
An error code