Copyright | © 2015 Herbert Valerio Riedel |
---|---|
License | BSD3 |
Maintainer | hvr@gnu.org |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Simple IO-Streams interface for lzma/xz compression
See also the XZ Utils home page: http://tukaani.org/xz/
- decompress :: InputStream ByteString -> IO (InputStream ByteString)
- decompressWith :: DecompressParams -> InputStream ByteString -> IO (InputStream ByteString)
- defaultDecompressParams :: DecompressParams
- data DecompressParams = DecompressParams {}
- compress :: OutputStream ByteString -> IO (OutputStream ByteString)
- compressWith :: CompressParams -> OutputStream ByteString -> IO (OutputStream ByteString)
- defaultCompressParams :: CompressParams
- data CompressParams = CompressParams {}
- data IntegrityCheck
- data CompressionLevel
ByteString
decompression
decompress :: InputStream ByteString -> IO (InputStream ByteString) Source
Decompress an InputStream
of strict ByteString
s from the .xz
format
decompressWith :: DecompressParams -> InputStream ByteString -> IO (InputStream ByteString) Source
Like decompress
but with the ability to specify various decompression
parameters. Typical usage:
decompressWith defaultDecompressParams { decompress... = ... }
defaultDecompressParams :: DecompressParams Source
The default set of parameters for decompression. This is typically used with the decompressWith function with specific parameters overridden.
data DecompressParams Source
Set of parameters for decompression. The defaults are defaultDecompressParams
.
DecompressParams | |
|
ByteString
compression
compress :: OutputStream ByteString -> IO (OutputStream ByteString) Source
Convert an OutputStream
that consumes compressed ByteString
s
(in the .xz
format) into an OutputStream
that consumes
uncompressed ByteString
s
compressWith :: CompressParams -> OutputStream ByteString -> IO (OutputStream ByteString) Source
Like compress
but with the ability to specify various compression
parameters. Typical usage:
compressWith defaultCompressParams { compress... = ... }
defaultCompressParams :: CompressParams Source
The default set of parameters for compression. This is typically used with the compressWith function with specific parameters overridden.
data CompressParams Source
Set of parameters for compression. The defaults are defaultCompressParams
.
CompressParams | |
|
data IntegrityCheck Source
Integrity check type (only supported when compressing .xz
files)
IntegrityCheckNone | disable integrity check (not recommended) |
IntegrityCheckCrc32 | CRC32 using the polynomial from IEEE-802.3 |
IntegrityCheckCrc64 | CRC64 using the polynomial from ECMA-182 |
IntegrityCheckSha256 | SHA-256 |
data CompressionLevel Source
Compression level presets that define the tradeoff between computational complexity and compression ratio
CompressionLevel0
has the lowest compression ratio as well as the
lowest memory requirements, whereas CompressionLevel9
has the
highest compression ratio and can require over 600MiB during
compression (and over 60MiB during decompression). The
man-page for xz(1)
contains more detailed information with tables describing the
properties of all compression level presets.
CompressionLevel6
is the default setting in
defaultCompressParams
as it provides a good trade-off and
matches the default of the xz(1)
tool.