decompress

Predicate to specify whether gzipped data should be decompressed on the fly (see alwaysDecompress and browserDecompress). Argument is the mime type. Default: browserDecompress. Since 0.1.0
Decompress (inflate) a stream of ByteStrings. For example:
sourceFile "test.z" $= decompress defaultWindowBits $$ sinkFile "test"
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.
Read a GZip file, decompressing all sections that are found. Returns a decompresed data stream and Nothing, or an unreliable string and Just (error). If you get anything other than Nothing, the String returned should be discarded.
Decompress an InputStream of strict ByteStrings from the zlib format
Decompress a stream using zlib (just like the gzip command)
This Option controls whether gzipped data should be decompressed on the fly. By default everything except for "application/x-tar" is decompressed, i.e. we have:
decompress (/= "application/x-tar")
You can also choose to decompress everything like this:
decompress (const True)
Decompress a stream of data in the bzip2 format. There are a number of errors that can occur. In each case an exception will be thrown. The possible error conditions are:
  • if the stream does not start with a valid gzip header
  • if the compressed stream is corrupted
  • if the compressed stream ends prematurely
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 lazy ByteString from the .xz format
Decompress a single-frame payload of known size. Typically this will be a payload that was compressed with compress. Note: This function is not capable of decompressing a payload generated by the streaming or lazy compression APIs.
Decompress a buffer. The destination buffer must be already allocated. Returns the number of bytes written into destination buffer, or an error description if it fails.
Decompress a buffer. The destination buffer must be already allocated. Returns the number of bytes written into destination buffer, or an error code if it fails (which can be tested using isError).
Decompress a payload. The input will be consumed lazily, and the decompressed result generated lazily. Note: if any error occurs, decompression will fail part-way through with a call to error.
Begin a streaming decompression operation. The initial result will be either an Error or a Consume.
Decompress lazy ByteString from a Brotli stream.
Don't use this on pathological input; it may not be secure This does not handle nested streams
Decompress data in the Snappy format. If the input is not compressed or is corrupt, an exception will be thrown.
Decompress bytes flowing from a Producer.
decompress :: MonadIO m
=> Producer ByteString m r
-> Producer ByteString m r
Decompress bytes flowing from a Producer. See the Codec.Compression.Zlib module for details about WindowBits.
decompress :: MonadIO m
=> WindowBits
=> Producer ByteString m r
-> Producer ByteString m r