| Copyright | (C) 2012-14 Edward Kmett |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | Edward Kmett <ekmett@gmail.com> |
| Stability | provisional |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell98 |
Codec.Compression.Zlib.Lens
Contents
Description
lens support for the zlib library
- gzipped :: Iso' ByteString ByteString
- zlibbed :: Iso' ByteString ByteString
- deflated :: Iso' ByteString ByteString
- compressed :: Format -> Iso' ByteString ByteString
- data Format :: *
- gzip :: Format
- zlib :: Format
- deflate :: Format
- zlibbed' :: Params -> Iso' ByteString ByteString
- gzipped' :: Params -> Iso' ByteString ByteString
- deflated' :: Params -> Iso' ByteString ByteString
- compressed' :: Format -> Params -> Iso' ByteString ByteString
- data Params
- defaultParams :: Params
- levelC :: Lens' Params CompressionLevel
- methodC :: Lens' Params Method
- windowBitsC :: Lens' Params WindowBits
- windowBitsD :: Lens' Params WindowBits
- memoryLevelC :: Lens' Params MemoryLevel
- strategyC :: Lens' Params CompressionStrategy
- bufferSizeC :: Lens' Params Int
- bufferSizeD :: Lens' Params Int
- dictionary :: Lens' Params (Maybe ByteString)
- data CompressionLevel :: *
- defaultCompression :: CompressionLevel
- noCompression :: CompressionLevel
- bestSpeed :: CompressionLevel
- bestCompression :: CompressionLevel
- compressionLevel :: Int -> CompressionLevel
- data Method :: *
- deflateMethod :: Method
- data WindowBits :: *
- defaultWindowBits :: WindowBits
- windowBits :: Int -> WindowBits
- data MemoryLevel :: *
- defaultMemoryLevel :: MemoryLevel
- minMemoryLevel :: MemoryLevel
- maxMemoryLevel :: MemoryLevel
- memoryLevel :: Int -> MemoryLevel
- data CompressionStrategy :: *
- defaultStrategy :: CompressionStrategy
- filteredStrategy :: CompressionStrategy
- huffmanOnlyStrategy :: CompressionStrategy
High-Level API
gzipped :: Iso' ByteString ByteString Source
Compresses a ByteString using the gzip compression format.
gzipped=compressedgzipgzipped=gzipped'defaultParams
zlibbed :: Iso' ByteString ByteString Source
Compresses a ByteString using the zlib compression format.
zlibbed=compressedzlibzlibbed= 'zlibbed\''defaultParams
deflated :: Iso' ByteString ByteString Source
Compresses a ByteString using the deflate compression format.
deflated=compresseddeflatedeflated=deflated'defaultParams
compressed :: Format -> Iso' ByteString ByteString Source
Compresses a ByteString using the given compression format.
compressedfmt =compressed'fmtdefaultParams
Low-Level API
zlibbed' :: Params -> Iso' ByteString ByteString Source
Compresses a ByteString using the zlib compression format and the given advanced parameters.
zlibbed=compressedzlibzlibbed=zlibbed'defaultParams
gzipped' :: Params -> Iso' ByteString ByteString Source
Compresses a ByteString using the gzip compression format and the given advanced parameters.
gzipped=compressedgzipgzipped=gzipped'defaultParams
deflated' :: Params -> Iso' ByteString ByteString Source
Compresses a ByteString using the deflate compression format and the given advanced parameters.
deflated=compresseddeflatedeflated=deflated'defaultParams
compressed' :: Format -> Params -> Iso' ByteString ByteString Source
Compresses a ByteString using the given compression format and the given advanced parameters.
The advanced parameters needed by gzipped', zlibbed', deflated', and compressed'.
Use defaultParams and the provided Lenses to construct custom Params.
defaultParams :: Params Source
The default advanced parameters for compression and decompression.
levelC :: Lens' Params CompressionLevel Source
The compression level.
windowBitsC :: Lens' Params WindowBits Source
The number of bits in the compression window.
windowBitsD :: Lens' Params WindowBits Source
The number of bits in the decompression window.
memoryLevelC :: Lens' Params MemoryLevel Source
The amount of memory allowed for the internal compression state.
strategyC :: Lens' Params CompressionStrategy Source
The compression strategy.
bufferSizeC :: Lens' Params Int Source
The initial buffer size during compression.
bufferSizeD :: Lens' Params Int Source
The initial buffer size during decompression.
data CompressionLevel :: *
data Method :: *
data WindowBits :: *
windowBits :: Int -> WindowBits
data MemoryLevel :: *
memoryLevel :: Int -> MemoryLevel
data CompressionStrategy :: *