Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module exports utilities to compress and decompress GZip pipes
streams.
- decompress :: MonadIO m => Proxy x' x () ByteString m r -> Proxy x' x () ByteString m r
- decompress' :: MonadIO m => Producer ByteString m r -> Producer ByteString m (Either (Producer ByteString m r) r)
- compress :: MonadIO m => CompressionLevel -> Proxy x' x () ByteString m r -> Proxy x' x () ByteString m r
- data CompressionLevel
- defaultCompression :: CompressionLevel
- noCompression :: CompressionLevel
- bestSpeed :: CompressionLevel
- bestCompression :: CompressionLevel
- compressionLevel :: Int -> CompressionLevel
Streams
:: MonadIO m | |
=> Proxy x' x () ByteString m r | Compressed stream |
-> Proxy x' x () ByteString m r | Decompressed stream |
Decompress bytes flowing from a Producer
.
decompress
::MonadIO
m =>Producer
ByteString
m r ->Producer
ByteString
m r
:: MonadIO m | |
=> Producer ByteString m r | Compressed stream |
-> Producer ByteString m (Either (Producer ByteString m r) r) | Decompressed stream, returning either a |
Decompress bytes flowing from a Producer
, returning any leftover input
that follows the compressed stream.
:: MonadIO m | |
=> CompressionLevel | |
-> Proxy x' x () ByteString m r | Decompressed stream |
-> Proxy x' x () ByteString m r | Compressed stream |
Compress bytes flowing from a Producer
.
compress
::MonadIO
m =>CompressionLevel
->Producer
ByteString
m r ->Producer
ByteString
m r
Compression level
data CompressionLevel Source #
How hard should we try to compress?
compressionLevel :: Int -> CompressionLevel Source #
A specific compression level between 0 and 9.