decompress -package:zstd
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 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 data in the Snappy format.
If the input is not compressed or is corrupt, an exception will be
thrown.
Don't use this on pathological input; it may not be secure
This does not handle nested streams
Decompress a
ByteString from a lzma or xz container stream.
Decompress the input ByteString.
Decompress the input ByteString.