Safe Haskell | None |
---|---|
Language | Haskell2010 |
Interface to zlib
and gzip
compression for Bytestring
s and Builder
s
Synopsis
- gunzip :: InputStream ByteString -> IO (InputStream ByteString)
- decompress :: InputStream ByteString -> IO (InputStream ByteString)
- gzip :: CompressionLevel -> OutputStream ByteString -> IO (OutputStream ByteString)
- compress :: CompressionLevel -> OutputStream ByteString -> IO (OutputStream ByteString)
- gzipBuilder :: CompressionLevel -> OutputStream Builder -> IO (OutputStream Builder)
- compressBuilder :: CompressionLevel -> OutputStream Builder -> IO (OutputStream Builder)
- newtype CompressionLevel = CompressionLevel Int
- defaultCompressionLevel :: CompressionLevel
ByteString decompression
gunzip :: InputStream ByteString -> IO (InputStream ByteString) Source #
Decompress an InputStream
of strict ByteString
s from the gzip
format
decompress :: InputStream ByteString -> IO (InputStream ByteString) Source #
Decompress an InputStream
of strict ByteString
s from the zlib
format
ByteString compression
gzip :: CompressionLevel -> OutputStream ByteString -> IO (OutputStream ByteString) Source #
Convert an OutputStream
that consumes compressed ByteString
s into an
OutputStream
that consumes uncompressed ByteString
s in the gzip
format
compress :: CompressionLevel -> OutputStream ByteString -> IO (OutputStream ByteString) Source #
Convert an OutputStream
that consumes compressed ByteString
s into an
OutputStream
that consumes uncompressed ByteString
s in the zlib
format
Builder compression
gzipBuilder :: CompressionLevel -> OutputStream Builder -> IO (OutputStream Builder) Source #
Convert an OutputStream
that consumes compressed Builder
s into an
OutputStream
that consumes uncompressed Builder
s in the gzip
format
compressBuilder :: CompressionLevel -> OutputStream Builder -> IO (OutputStream Builder) Source #
Convert an OutputStream
that consumes compressed Builder
s into an
OutputStream
that consumes uncompressed Builder
s in the zlib
format
Compression level
newtype CompressionLevel Source #
Parameter that defines the tradeoff between speed and compression ratio
Instances
Eq CompressionLevel Source # | |
Defined in System.IO.Streams.Zlib (==) :: CompressionLevel -> CompressionLevel -> Bool # (/=) :: CompressionLevel -> CompressionLevel -> Bool # | |
Num CompressionLevel Source # | |
Defined in System.IO.Streams.Zlib (+) :: CompressionLevel -> CompressionLevel -> CompressionLevel # (-) :: CompressionLevel -> CompressionLevel -> CompressionLevel # (*) :: CompressionLevel -> CompressionLevel -> CompressionLevel # negate :: CompressionLevel -> CompressionLevel # abs :: CompressionLevel -> CompressionLevel # signum :: CompressionLevel -> CompressionLevel # fromInteger :: Integer -> CompressionLevel # | |
Read CompressionLevel Source # | |
Defined in System.IO.Streams.Zlib | |
Show CompressionLevel Source # | |
Defined in System.IO.Streams.Zlib showsPrec :: Int -> CompressionLevel -> ShowS # show :: CompressionLevel -> String # showList :: [CompressionLevel] -> ShowS # |
defaultCompressionLevel :: CompressionLevel Source #
A compression level that balances speed with compression ratio