Safe Haskell | Safe-Infered |
---|
- enumCompress :: MonadIO m => CompressParams -> Enumeratee ByteString ByteString m a
- enumDecompress :: MonadIO m => DecompressParams -> Enumeratee ByteString ByteString m a
- data BZipParamsException
- data BZipException
- = ConfigError
- | MemError
- | DataError
- | DataErrorMagic
- | Unexpected !Int
- | IncorrectState
- data CompressParams = CompressParams {}
- defaultCompressParams :: CompressParams
- data DecompressParams = DecompressParams {}
- defaultDecompressParams :: DecompressParams
- data BlockSize
- data WorkFactor
Enumeratees
:: MonadIO m | |
=> CompressParams | Parameters of compression |
-> Enumeratee ByteString ByteString m a |
Compress the input and send to inner iteratee.
enumDecompress :: MonadIO m => DecompressParams -> Enumeratee ByteString ByteString m aSource
Decompress the input and send to inner iteratee. If there is end of zlib stream it is left unprocessed.
Exceptions
data BZipParamsException Source
Denotes error is user-supplied parameter
IncorrectBlockSize !Int | Incorrect block size was chosen |
IncorrectWorkFactor !Int | Incorrect work size was chosen |
IncorrectBufferSize !Int | Incorrect buffer size was chosen |
data BZipException Source
Denotes error in compression and decompression
ConfigError | bzip2 library internal error |
MemError | Memory allocation failed |
DataError | Corrupted input |
DataErrorMagic | Incorrect magic number |
Unexpected !Int | Unknown or unexpected error |
IncorrectState | Incorrect state - denotes error in library |
Parameters
data CompressParams Source
Set of parameters for compression. For sane defaults use
defaultCompressParams
CompressParams | |
|
data DecompressParams Source
Set of parameters for decompression. For sane defaults see
defaultDecompressParams
.
DecompressParams | |
|
The compression level specify the tradeoff between speed and compression.
DefaultBlockSize | Default compression level set at 6 |
BestSpeed | The fastest compression method (however less compression) |
BestCompression | The best compression method (however slowest) |
CompressionLevel !Int | Compression level set by number from 1 to 9 |
data WorkFactor Source
DefaultWorkFactor | Default work factor (set at 30) |
WorkFactor !Int | Hand-tuned work factor |