lzip-0.0.0.0: Lzip compression / Lzlib bindings
Safe HaskellTrustworthy
LanguageHaskell2010

Codec.Compression.Lzlib.ST

Description

lzlib operations in the ST monad

See respective functions in Codec.Compression.Lzlib for documentation where missing.

Synopsis

Compression functions

data CompressParams Source #

Parameters for lzip compressor

If compressDictionarySize is 65535 and compressMatchLenLimit is 16, the "fast variant" of LZMA is chosen.

Constructors

CompressParams 

Fields

compressParamPreset :: Int -> CompressParams Source #

Construct CompressParams based on the standard preset levels used by the lzip command-line interface.

The table below shows the parameters as a function of the level input argument:

level compressDictionarySize compressMatchLenLimit
≤0 65535 bytes 16 bytes
1 1 MiB 5 bytes
2 1.5 MiB 6 bytes
3 2 MiB 8 bytes
4 3 MiB 12 bytes
5 4 MiB 20 bytes
6 8 MiB 36 bytes
7 16 MiB 68 bytes
8 24 MiB 132 bytes
≥9 32 MiB 273 bytes

compressMemberSize is set to its maximum allowed value (i.e. 2 PiB) for all compression levels.

NOTE: The "0" preset parameters will cause the encoder to use the "fast variant" of the LZMA algorithm.

Decompression functions

Error codes

data LzErrno Source #

lzlib error codes

See lzlib manual for more details.

Instances

Instances details
Eq LzErrno Source # 
Instance details

Defined in Codec.Compression.Lzlib.FFI

Methods

(==) :: LzErrno -> LzErrno -> Bool #

(/=) :: LzErrno -> LzErrno -> Bool #

Show LzErrno Source # 
Instance details

Defined in Codec.Compression.Lzlib.FFI

Exception LzErrno Source # 
Instance details

Defined in Codec.Compression.Lzlib.FFI