Copyright | (c) Bradley Hardy 2016 |
---|---|
License | LGPL3 |
Maintainer | bradleyhardy@live.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
- decompressStream :: (MonadIO m, MonadThrow m) => ByteString m r -> ByteString m r
- decompressStream' :: (MonadIO m, MonadThrow m) => WindowBits -> ByteString m r -> ByteString m r
- compressStream :: (MonadIO m, MonadThrow m) => ByteString m r -> ByteString m r
- compressStream' :: (MonadIO m, MonadThrow m) => CompressionLevel -> WindowBits -> ByteString m r -> ByteString m r
- type CompressionLevel = Int
- data WindowBits :: *
- defaultWindowBits :: WindowBits
- defaultCompressionLevel :: CompressionLevel
Decompressing and compressing streams
decompressStream :: (MonadIO m, MonadThrow m) => ByteString m r -> ByteString m r Source
Use Zlib to decompress a ByteString
with the default parameters.
decompressStream' :: (MonadIO m, MonadThrow m) => WindowBits -> ByteString m r -> ByteString m r Source
Use Zlib to decompress a ByteString
with the specified WindowBits
.
compressStream :: (MonadIO m, MonadThrow m) => ByteString m r -> ByteString m r Source
Use Zlib to compress a ByteString
with the default parameters.
compressStream' :: (MonadIO m, MonadThrow m) => CompressionLevel -> WindowBits -> ByteString m r -> ByteString m r Source
Use Zlib to compress a ByteString
with the specified CompressionLevel
and WindowBits
.
Re-exported from Zlib
type CompressionLevel = Int Source
An integer between 0 and 9.
data WindowBits :: *
This specifies the size of the compression window. Larger values of this parameter result in better compression at the expense of higher memory usage.
The compression window size is the value of the the window bits raised to
the power 2. The window bits must be in the range 8..15
which corresponds
to compression window sizes of 256b to 32Kb. The default is 15 which is also
the maximum size.
The total amount of memory used depends on the window bits and the
MemoryLevel
. See the MemoryLevel
for the details.
Eq WindowBits | |
Ord WindowBits | |
Show WindowBits | |
Generic WindowBits | |
type Rep WindowBits = D1 D1WindowBits ((:+:) (C1 C1_0WindowBits (S1 NoSelector (Rec0 Int))) (C1 C1_1WindowBits U1)) |
defaultWindowBits :: WindowBits
The default WindowBits
is 15 which is also the maximum size.
defaultCompressionLevel :: CompressionLevel Source
The default compression level is 6.