Safe Haskell | None |
---|
This module exports utilities to compress and decompress pipes
streams
using the zlib compression codec.
- decompressD :: Proxy p => WindowBits -> () -> Pipe p ByteString ByteString IO r
- compressD :: Proxy p => CompressionLevel -> WindowBits -> () -> Pipe p ByteString ByteString IO r
- defaultCompression :: CompressionLevel
- noCompression :: CompressionLevel
- bestSpeed :: CompressionLevel
- bestCompression :: CompressionLevel
- compressionLevel :: Int -> CompressionLevel
- defaultWindowBits :: WindowBits
- windowBits :: Int -> WindowBits
Streams
decompressD :: Proxy p => WindowBits -> () -> Pipe p ByteString ByteString IO rSource
Decompress bytes flowing downstream using the given WindowBits
.
See the Codec.Zlib module for details about this values.
compressD :: Proxy p => CompressionLevel -> WindowBits -> () -> Pipe p ByteString ByteString IO rSource
Compress bytes flowing downstream.
See the Codec.Zlib module for details about these values.
Compression level
The following are re-exported from Codec.Compression.Zlib for your convenience.
defaultCompression :: CompressionLevel
The default compression level is 6 (that is, biased towards higher compression at expense of speed).
noCompression :: CompressionLevel
No compression, just a block copy.
The fastest compression method (less compression)
bestCompression :: CompressionLevel
The slowest compression method (best compression).
compressionLevel :: Int -> CompressionLevel
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
A specific compression window size, specified in bits in the range 8..15