Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module modifies material in Renzo Carbonara's pipes-zlib package.
Synopsis
- decompress :: MonadIO m => WindowBits -> ByteString m r -> ByteString m r
- decompress' :: MonadIO m => WindowBits -> ByteString m r -> ByteString m (Either (ByteString m r) r)
- compress :: MonadIO m => CompressionLevel -> WindowBits -> ByteString m r -> ByteString m r
- gunzip :: MonadIO m => ByteString m r -> ByteString m r
- gunzip' :: MonadIO m => ByteString m r -> ByteString m (Either (ByteString m r) r)
- gzip :: MonadIO m => CompressionLevel -> ByteString m r -> ByteString m r
- data CompressionLevel
- defaultCompression :: CompressionLevel
- noCompression :: CompressionLevel
- bestSpeed :: CompressionLevel
- bestCompression :: CompressionLevel
- compressionLevel :: Int -> CompressionLevel
- defaultWindowBits :: WindowBits
- windowBits :: Int -> WindowBits
Streams
:: MonadIO m | |
=> WindowBits | |
-> ByteString m r | Compressed stream |
-> ByteString m r | Decompressed stream |
Decompress a streaming bytestring. WindowBits
is from Codec.Compression.Zlib
decompress
defaultWindowBits
::MonadIO
m =>ByteString
m r ->ByteString
m r
:: MonadIO m | |
=> WindowBits | |
-> ByteString m r | Compressed byte stream |
-> ByteString m (Either (ByteString m r) r) | Decompressed byte stream, ending with either leftovers or a result |
Decompress a zipped byte stream, returning any leftover input that follows the compressed material.
:: MonadIO m | |
=> CompressionLevel | |
-> WindowBits | |
-> ByteString m r | Decompressed stream |
-> ByteString m r | Compressed stream |
Compress a byte stream.
See the Codec.Compression.Zlib module for details about
CompressionLevel
and WindowBits
.
:: MonadIO m | |
=> ByteString m r | Compressed stream |
-> ByteString m r | Decompressed stream |
Decompress a gzipped byte stream.
:: MonadIO m | |
=> ByteString m r | Compressed byte stream |
-> ByteString m (Either (ByteString m r) r) | Decompressed bytes stream, returning either a |
Decompress a gzipped byte stream, returning any leftover input that follows the compressed stream.
:: MonadIO m | |
=> CompressionLevel | |
-> ByteString m r | Decompressed stream |
-> ByteString m r | Compressed stream |
Compress a byte stream in the gzip format.
Compression levels
data CompressionLevel Source #
How hard should we try to compress?
Instances
Eq CompressionLevel Source # | |
Defined in Streaming.Zip (==) :: CompressionLevel -> CompressionLevel -> Bool # (/=) :: CompressionLevel -> CompressionLevel -> Bool # | |
Ord CompressionLevel Source # | |
Defined in Streaming.Zip compare :: CompressionLevel -> CompressionLevel -> Ordering # (<) :: CompressionLevel -> CompressionLevel -> Bool # (<=) :: CompressionLevel -> CompressionLevel -> Bool # (>) :: CompressionLevel -> CompressionLevel -> Bool # (>=) :: CompressionLevel -> CompressionLevel -> Bool # max :: CompressionLevel -> CompressionLevel -> CompressionLevel # min :: CompressionLevel -> CompressionLevel -> CompressionLevel # | |
Read CompressionLevel Source # | |
Defined in Streaming.Zip | |
Show CompressionLevel Source # | |
Defined in Streaming.Zip showsPrec :: Int -> CompressionLevel -> ShowS # show :: CompressionLevel -> String # showList :: [CompressionLevel] -> ShowS # |
compressionLevel :: Int -> CompressionLevel Source #
A specific compression level between 0 and 9.
Window size
The following are re-exported from Codec.Compression.Zlib for your convenience.
defaultWindowBits :: WindowBits #
The default WindowBits
is 15 which is also the maximum size.
windowBits :: Int -> WindowBits Source #