Sophie

Sophie

distrib > PLD > th > x86_64 > by-pkgid > 961aece61c7fdf0b561321d86ba94ba6 > files > 3

ghc-zlib-doc-0.6.2.1-2.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /><title>Codec.Compression.Zlib.Internal</title><link href="linuwial.css" rel="stylesheet" type="text/css" title="Linuwial" /><link rel="stylesheet" type="text/css" href="quick-jump.css" /><link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" /><script src="haddock-bundle.min.js" async="async" type="text/javascript"></script><script type="text/x-mathjax-config">MathJax.Hub.Config({ tex2jax: { processClass: "mathjax", ignoreClass: ".*" } });</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script></head><body><div id="package-header"><span class="caption">zlib-0.6.2.1: Compression and decompression in the gzip and zlib formats</span><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul></div><div id="content"><div id="module-header"><table class="info"><tr><th valign="top">Copyright</th><td>(c) 2006-2015 Duncan Coutts</td></tr><tr><th>License</th><td>BSD-style</td></tr><tr><th>Maintainer</th><td>duncan@community.haskell.org</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Codec.Compression.Zlib.Internal</p></div><div id="table-of-contents"><div id="contents-list"><p class="caption" onclick="window.scrollTo(0,0)">Contents</p><ul><li><a href="#g:1">Pure interface</a></li><li><a href="#g:2">Monadic incremental interface</a><ul><li><a href="#g:3">Using incremental compression</a></li><li><a href="#g:4">Using incremental decompression</a></li></ul></li><li><a href="#g:5">The compression parameter types</a></li></ul></div></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Pure and IO stream based interfaces to lower level zlib wrapper</p></div></div><div id="synopsis"><details id="syn"><summary>Synopsis</summary><ul class="details-toggle" data-details-id="syn"><li class="src short"><a href="#v:compress">compress</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressParams" title="Codec.Compression.Zlib.Internal">CompressParams</a> -&gt; ByteString -&gt; ByteString</li><li class="src short"><a href="#v:decompress">decompress</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:DecompressParams" title="Codec.Compression.Zlib.Internal">DecompressParams</a> -&gt; ByteString -&gt; ByteString</li><li class="src short"><span class="keyword">data</span> <a href="#t:CompressStream">CompressStream</a> m<ul class="subs"><li>= <a href="#v:CompressInputRequired">CompressInputRequired</a> { <ul class="subs"><li><a href="#v:compressSupplyInput">compressSupplyInput</a> :: ByteString -&gt; m (<a href="Codec-Compression-Zlib-Internal.html#t:CompressStream" title="Codec.Compression.Zlib.Internal">CompressStream</a> m)</li></ul> }</li><li>| <a href="#v:CompressOutputAvailable">CompressOutputAvailable</a> { <ul class="subs"><li><a href="#v:compressOutput">compressOutput</a> :: !ByteString</li><li><a href="#v:compressNext">compressNext</a> :: m (<a href="Codec-Compression-Zlib-Internal.html#t:CompressStream" title="Codec.Compression.Zlib.Internal">CompressStream</a> m)</li></ul> }</li><li>| <a href="#v:CompressStreamEnd">CompressStreamEnd</a></li></ul></li><li class="src short"><a href="#v:compressST">compressST</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressParams" title="Codec.Compression.Zlib.Internal">CompressParams</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressStream" title="Codec.Compression.Zlib.Internal">CompressStream</a> (ST s)</li><li class="src short"><a href="#v:compressIO">compressIO</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressParams" title="Codec.Compression.Zlib.Internal">CompressParams</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressStream" title="Codec.Compression.Zlib.Internal">CompressStream</a> IO</li><li class="src short"><a href="#v:foldCompressStream">foldCompressStream</a> :: Monad m =&gt; ((ByteString -&gt; m a) -&gt; m a) -&gt; (ByteString -&gt; m a -&gt; m a) -&gt; m a -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressStream" title="Codec.Compression.Zlib.Internal">CompressStream</a> m -&gt; m a</li><li class="src short"><a href="#v:foldCompressStreamWithInput">foldCompressStreamWithInput</a> :: (ByteString -&gt; a -&gt; a) -&gt; a -&gt; (<span class="keyword">forall</span> s. <a href="Codec-Compression-Zlib-Internal.html#t:CompressStream" title="Codec.Compression.Zlib.Internal">CompressStream</a> (ST s)) -&gt; ByteString -&gt; a</li><li class="src short"><span class="keyword">data</span> <a href="#t:DecompressStream">DecompressStream</a> m<ul class="subs"><li>= <a href="#v:DecompressInputRequired">DecompressInputRequired</a> { <ul class="subs"><li><a href="#v:decompressSupplyInput">decompressSupplyInput</a> :: ByteString -&gt; m (<a href="Codec-Compression-Zlib-Internal.html#t:DecompressStream" title="Codec.Compression.Zlib.Internal">DecompressStream</a> m)</li></ul> }</li><li>| <a href="#v:DecompressOutputAvailable">DecompressOutputAvailable</a> { <ul class="subs"><li><a href="#v:decompressOutput">decompressOutput</a> :: !ByteString</li><li><a href="#v:decompressNext">decompressNext</a> :: m (<a href="Codec-Compression-Zlib-Internal.html#t:DecompressStream" title="Codec.Compression.Zlib.Internal">DecompressStream</a> m)</li></ul> }</li><li>| <a href="#v:DecompressStreamEnd">DecompressStreamEnd</a> { <ul class="subs"><li><a href="#v:decompressUnconsumedInput">decompressUnconsumedInput</a> :: ByteString</li></ul> }</li><li>| <a href="#v:DecompressStreamError">DecompressStreamError</a> { <ul class="subs"><li><a href="#v:decompressStreamError">decompressStreamError</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:DecompressError" title="Codec.Compression.Zlib.Internal">DecompressError</a></li></ul> }</li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:DecompressError">DecompressError</a><ul class="subs"><li>= <a href="#v:TruncatedInput">TruncatedInput</a></li><li>| <a href="#v:DictionaryRequired">DictionaryRequired</a></li><li>| <a href="#v:DictionaryMismatch">DictionaryMismatch</a></li><li>| <a href="#v:DataFormatError">DataFormatError</a> String</li></ul></li><li class="src short"><a href="#v:decompressST">decompressST</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:DecompressParams" title="Codec.Compression.Zlib.Internal">DecompressParams</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:DecompressStream" title="Codec.Compression.Zlib.Internal">DecompressStream</a> (ST s)</li><li class="src short"><a href="#v:decompressIO">decompressIO</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:DecompressParams" title="Codec.Compression.Zlib.Internal">DecompressParams</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:DecompressStream" title="Codec.Compression.Zlib.Internal">DecompressStream</a> IO</li><li class="src short"><a href="#v:foldDecompressStream">foldDecompressStream</a> :: Monad m =&gt; ((ByteString -&gt; m a) -&gt; m a) -&gt; (ByteString -&gt; m a -&gt; m a) -&gt; (ByteString -&gt; m a) -&gt; (<a href="Codec-Compression-Zlib-Internal.html#t:DecompressError" title="Codec.Compression.Zlib.Internal">DecompressError</a> -&gt; m a) -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:DecompressStream" title="Codec.Compression.Zlib.Internal">DecompressStream</a> m -&gt; m a</li><li class="src short"><a href="#v:foldDecompressStreamWithInput">foldDecompressStreamWithInput</a> :: (ByteString -&gt; a -&gt; a) -&gt; (ByteString -&gt; a) -&gt; (<a href="Codec-Compression-Zlib-Internal.html#t:DecompressError" title="Codec.Compression.Zlib.Internal">DecompressError</a> -&gt; a) -&gt; (<span class="keyword">forall</span> s. <a href="Codec-Compression-Zlib-Internal.html#t:DecompressStream" title="Codec.Compression.Zlib.Internal">DecompressStream</a> (ST s)) -&gt; ByteString -&gt; a</li><li class="src short"><span class="keyword">data</span> <a href="#t:CompressParams">CompressParams</a> = <a href="#v:CompressParams">CompressParams</a> {<ul class="subs"><li><a href="#v:compressLevel">compressLevel</a> :: !<a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a></li><li><a href="#v:compressMethod">compressMethod</a> :: !<a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a></li><li><a href="#v:compressWindowBits">compressWindowBits</a> :: !<a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a></li><li><a href="#v:compressMemoryLevel">compressMemoryLevel</a> :: !<a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a></li><li><a href="#v:compressStrategy">compressStrategy</a> :: !<a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a></li><li><a href="#v:compressBufferSize">compressBufferSize</a> :: !Int</li><li><a href="#v:compressDictionary">compressDictionary</a> :: Maybe ByteString</li></ul>}</li><li class="src short"><a href="#v:defaultCompressParams">defaultCompressParams</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressParams" title="Codec.Compression.Zlib.Internal">CompressParams</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:DecompressParams">DecompressParams</a> = <a href="#v:DecompressParams">DecompressParams</a> {<ul class="subs"><li><a href="#v:decompressWindowBits">decompressWindowBits</a> :: !<a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a></li><li><a href="#v:decompressBufferSize">decompressBufferSize</a> :: !Int</li><li><a href="#v:decompressDictionary">decompressDictionary</a> :: Maybe ByteString</li><li><a href="#v:decompressAllMembers">decompressAllMembers</a> :: Bool</li></ul>}</li><li class="src short"><a href="#v:defaultDecompressParams">defaultDecompressParams</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:DecompressParams" title="Codec.Compression.Zlib.Internal">DecompressParams</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:Format">Format</a><ul class="subs"><li>= <a href="#v:GZip">GZip</a></li><li>| <a href="#v:Zlib">Zlib</a></li><li>| <a href="#v:Raw">Raw</a></li><li>| <a href="#v:GZipOrZlib">GZipOrZlib</a></li></ul></li><li class="src short"><a href="#v:gzipFormat">gzipFormat</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a></li><li class="src short"><a href="#v:zlibFormat">zlibFormat</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a></li><li class="src short"><a href="#v:rawFormat">rawFormat</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a></li><li class="src short"><a href="#v:gzipOrZlibFormat">gzipOrZlibFormat</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:CompressionLevel">CompressionLevel</a><ul class="subs"><li>= <a href="#v:DefaultCompression">DefaultCompression</a></li><li>| <a href="#v:NoCompression">NoCompression</a></li><li>| <a href="#v:BestSpeed">BestSpeed</a></li><li>| <a href="#v:BestCompression">BestCompression</a></li><li>| <a href="#v:CompressionLevel">CompressionLevel</a> Int</li></ul></li><li class="src short"><a href="#v:defaultCompression">defaultCompression</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a></li><li class="src short"><a href="#v:noCompression">noCompression</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a></li><li class="src short"><a href="#v:bestSpeed">bestSpeed</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a></li><li class="src short"><a href="#v:bestCompression">bestCompression</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a></li><li class="src short"><a href="#v:compressionLevel">compressionLevel</a> :: Int -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:Method">Method</a> = <a href="#v:Deflated">Deflated</a></li><li class="src short"><a href="#v:deflateMethod">deflateMethod</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:WindowBits">WindowBits</a><ul class="subs"><li>= <a href="#v:WindowBits">WindowBits</a> Int</li><li>| <a href="#v:DefaultWindowBits">DefaultWindowBits</a></li></ul></li><li class="src short"><a href="#v:defaultWindowBits">defaultWindowBits</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a></li><li class="src short"><a href="#v:windowBits">windowBits</a> :: Int -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:MemoryLevel">MemoryLevel</a><ul class="subs"><li>= <a href="#v:DefaultMemoryLevel">DefaultMemoryLevel</a></li><li>| <a href="#v:MinMemoryLevel">MinMemoryLevel</a></li><li>| <a href="#v:MaxMemoryLevel">MaxMemoryLevel</a></li><li>| <a href="#v:MemoryLevel">MemoryLevel</a> Int</li></ul></li><li class="src short"><a href="#v:defaultMemoryLevel">defaultMemoryLevel</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a></li><li class="src short"><a href="#v:minMemoryLevel">minMemoryLevel</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a></li><li class="src short"><a href="#v:maxMemoryLevel">maxMemoryLevel</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a></li><li class="src short"><a href="#v:memoryLevel">memoryLevel</a> :: Int -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:CompressionStrategy">CompressionStrategy</a><ul class="subs"><li>= <a href="#v:DefaultStrategy">DefaultStrategy</a></li><li>| <a href="#v:Filtered">Filtered</a></li><li>| <a href="#v:HuffmanOnly">HuffmanOnly</a></li></ul></li><li class="src short"><a href="#v:defaultStrategy">defaultStrategy</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a></li><li class="src short"><a href="#v:filteredStrategy">filteredStrategy</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a></li><li class="src short"><a href="#v:huffmanOnlyStrategy">huffmanOnlyStrategy</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a></li></ul></details></div><div id="interface"><a href="#g:1" id="g:1"><h1>Pure interface</h1></a><div class="top"><p class="src"><a id="v:compress" class="def">compress</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressParams" title="Codec.Compression.Zlib.Internal">CompressParams</a> -&gt; ByteString -&gt; ByteString <a href="#v:compress" class="selflink">#</a></p><div class="doc"><p>Compress a data stream provided as a lazy <code>ByteString</code>.</p><p>There are no expected error conditions. All input data streams are valid. It
 is possible for unexpected errors to occur, such as running out of memory,
 or finding the wrong version of the zlib C library, these are thrown as
 exceptions.</p></div></div><div class="top"><p class="src"><a id="v:decompress" class="def">decompress</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:DecompressParams" title="Codec.Compression.Zlib.Internal">DecompressParams</a> -&gt; ByteString -&gt; ByteString <a href="#v:decompress" class="selflink">#</a></p><div class="doc"><p>Decompress a data stream provided as a lazy <code>ByteString</code>.</p><p>It will throw an exception if any error is encountered in the input data.
 If you need more control over error handling then use one the incremental
 versions, <code><a href="Codec-Compression-Zlib-Internal.html#v:decompressST" title="Codec.Compression.Zlib.Internal">decompressST</a></code> or <code><a href="Codec-Compression-Zlib-Internal.html#v:decompressIO" title="Codec.Compression.Zlib.Internal">decompressIO</a></code>.</p></div></div><a href="#g:2" id="g:2"><h1>Monadic incremental interface</h1></a><div class="doc"><p>The pure <code><a href="Codec-Compression-Zlib-Internal.html#v:compress" title="Codec.Compression.Zlib.Internal">compress</a></code> and <code><a href="Codec-Compression-Zlib-Internal.html#v:decompress" title="Codec.Compression.Zlib.Internal">decompress</a></code> functions are streaming in the sense
 that they can produce output without demanding all input, however they need
 the input data stream as a lazy <code>ByteString</code>. Having the input data
 stream as a lazy <code>ByteString</code> often requires using lazy I/O which is not
 appropriate in all cicumstances.</p><p>For these cases an incremental interface is more appropriate. This interface
 allows both incremental input and output. Chunks of input data are supplied
 one by one (e.g. as they are obtained from an input source like a file or
 network source). Output is also produced chunk by chunk.</p><p>The incremental input and output is managed via the <code><a href="Codec-Compression-Zlib-Internal.html#t:CompressStream" title="Codec.Compression.Zlib.Internal">CompressStream</a></code> and
 <code><a href="Codec-Compression-Zlib-Internal.html#t:DecompressStream" title="Codec.Compression.Zlib.Internal">DecompressStream</a></code> types. They represents the unfolding of the process of
 compressing and decompressing. They operates in either the <code>ST</code> or <code>IO</code>
 monads. They can be lifted into other incremental abstractions like pipes or
 conduits, or they can be used directly in the following style.</p></div><a href="#g:3" id="g:3"><h2>Using incremental compression</h2></a><div class="doc"><p>In a loop:</p><ul><li>Inspect the status of the stream</li><li>When it is <code><a href="Codec-Compression-Zlib-Internal.html#v:CompressInputRequired" title="Codec.Compression.Zlib.Internal">CompressInputRequired</a></code> then you should call the action,
    passing a chunk of input (or <code><a href="BS.html#v:empty" title="BS">empty</a></code> when no more input is available)
    to get the next state of the stream and continue the loop.</li><li>When it is <code><a href="Codec-Compression-Zlib-Internal.html#v:CompressOutputAvailable" title="Codec.Compression.Zlib.Internal">CompressOutputAvailable</a></code> then do something with the given
    chunk of output, and call the action to get the next state of the stream
    and continue the loop.</li><li>When it is <code><a href="Codec-Compression-Zlib-Internal.html#v:CompressStreamEnd" title="Codec.Compression.Zlib.Internal">CompressStreamEnd</a></code> then terminate the loop.</li></ul><p>Note that you cannot stop as soon as you have no more input, you need to
 carry on until all the output has been collected, i.e. until you get to
 <code><a href="Codec-Compression-Zlib-Internal.html#v:CompressStreamEnd" title="Codec.Compression.Zlib.Internal">CompressStreamEnd</a></code>.</p><p>Here is an example where we get input from one file handle and send the
 compressed output to another file handle.</p><pre>go :: Handle -&gt; Handle -&gt; CompressStream IO -&gt; IO ()
go inh outh (CompressInputRequired next) = do
   inchunk &lt;- BS.hGet inh 4096
   go inh outh =&lt;&lt; next inchunk
go inh outh (CompressOutputAvailable outchunk next) =
   BS.hPut outh outchunk
   go inh outh =&lt;&lt; next
go _ _ CompressStreamEnd = return ()</pre><p>The same can be achieved with <code><a href="Codec-Compression-Zlib-Internal.html#v:foldCompressStream" title="Codec.Compression.Zlib.Internal">foldCompressStream</a></code>:</p><pre>foldCompressStream
  (\next -&gt; do inchunk &lt;- BS.hGet inh 4096; next inchunk)
  (\outchunk next -&gt; do BS.hPut outh outchunk; next)
  (return ())</pre></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:CompressStream" class="def">CompressStream</a> m <a href="#t:CompressStream" class="selflink">#</a></p><div class="doc"><p>The unfolding of the compression process, where you provide a sequence
 of uncompressed data chunks as input and receive a sequence of compressed
 data chunks as output. The process is incremental, in that the demand for
 input and provision of output are interleaved.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:CompressInputRequired" class="def">CompressInputRequired</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:compressSupplyInput" class="def">compressSupplyInput</a> :: ByteString -&gt; m (<a href="Codec-Compression-Zlib-Internal.html#t:CompressStream" title="Codec.Compression.Zlib.Internal">CompressStream</a> m)</dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr><tr><td class="src"><a id="v:CompressOutputAvailable" class="def">CompressOutputAvailable</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:compressOutput" class="def">compressOutput</a> :: !ByteString</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:compressNext" class="def">compressNext</a> :: m (<a href="Codec-Compression-Zlib-Internal.html#t:CompressStream" title="Codec.Compression.Zlib.Internal">CompressStream</a> m)</dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr><tr><td class="src"><a id="v:CompressStreamEnd" class="def">CompressStreamEnd</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div><div class="top"><p class="src"><a id="v:compressST" class="def">compressST</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressParams" title="Codec.Compression.Zlib.Internal">CompressParams</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressStream" title="Codec.Compression.Zlib.Internal">CompressStream</a> (ST s) <a href="#v:compressST" class="selflink">#</a></p><div class="doc"><p>Incremental compression in the <code>ST</code> monad. Using <code>ST</code> makes it possible
 to write pure <em>lazy</em> functions while making use of incremental compression.</p></div></div><div class="top"><p class="src"><a id="v:compressIO" class="def">compressIO</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressParams" title="Codec.Compression.Zlib.Internal">CompressParams</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressStream" title="Codec.Compression.Zlib.Internal">CompressStream</a> IO <a href="#v:compressIO" class="selflink">#</a></p><div class="doc"><p>Incremental compression in the <code>IO</code> monad.</p></div></div><div class="top"><p class="src"><a id="v:foldCompressStream" class="def">foldCompressStream</a> :: Monad m =&gt; ((ByteString -&gt; m a) -&gt; m a) -&gt; (ByteString -&gt; m a -&gt; m a) -&gt; m a -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressStream" title="Codec.Compression.Zlib.Internal">CompressStream</a> m -&gt; m a <a href="#v:foldCompressStream" class="selflink">#</a></p><div class="doc"><p>A fold over the <code><a href="Codec-Compression-Zlib-Internal.html#t:CompressStream" title="Codec.Compression.Zlib.Internal">CompressStream</a></code> in the given monad.</p><p>One way to look at this is that it runs the stream, using callback functions
 for the three stream events.</p></div></div><div class="top"><p class="src"><a id="v:foldCompressStreamWithInput" class="def">foldCompressStreamWithInput</a> :: (ByteString -&gt; a -&gt; a) -&gt; a -&gt; (<span class="keyword">forall</span> s. <a href="Codec-Compression-Zlib-Internal.html#t:CompressStream" title="Codec.Compression.Zlib.Internal">CompressStream</a> (ST s)) -&gt; ByteString -&gt; a <a href="#v:foldCompressStreamWithInput" class="selflink">#</a></p><div class="doc"><p>A variant on <code><a href="Codec-Compression-Zlib-Internal.html#v:foldCompressStream" title="Codec.Compression.Zlib.Internal">foldCompressStream</a></code> that is pure rather than operating in a
 monad and where the input is provided by a lazy <code>ByteString</code>. So we only
 have to deal with the output and end parts, making it just like a foldr on a
 list of output chunks.</p><p>For example:</p><pre>toChunks = foldCompressStreamWithInput (:) []</pre></div></div><a href="#g:4" id="g:4"><h2>Using incremental decompression</h2></a><div class="doc"><p>The use of <code><a href="Codec-Compression-Zlib-Internal.html#t:DecompressStream" title="Codec.Compression.Zlib.Internal">DecompressStream</a></code> is very similar to <code><a href="Codec-Compression-Zlib-Internal.html#t:CompressStream" title="Codec.Compression.Zlib.Internal">CompressStream</a></code> but with
 a few differences:</p><ul><li>There is the extra possibility of a <code><a href="Codec-Compression-Zlib-Internal.html#v:DecompressStreamError" title="Codec.Compression.Zlib.Internal">DecompressStreamError</a></code></li><li>There can be extra trailing data after a compressed stream, and the
   <code><a href="Codec-Compression-Zlib-Internal.html#v:DecompressStreamEnd" title="Codec.Compression.Zlib.Internal">DecompressStreamEnd</a></code> includes that.</li></ul><p>Otherwise the same loop style applies, and there are fold functions.</p></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:DecompressStream" class="def">DecompressStream</a> m <a href="#t:DecompressStream" class="selflink">#</a></p><div class="doc"><p>The unfolding of the decompression process, where you provide a sequence
 of compressed data chunks as input and receive a sequence of uncompressed
 data chunks as output. The process is incremental, in that the demand for
 input and provision of output are interleaved.</p><p>To indicate the end of the input supply an empty input chunk. Note that
 for <code>gzipFormat</code> with the default <code><a href="Codec-Compression-Zlib-Internal.html#v:decompressAllMembers" title="Codec.Compression.Zlib.Internal">decompressAllMembers</a></code> <code>True</code> you will
 have to do this, as the decompressor will look for any following members.
 With <code><a href="Codec-Compression-Zlib-Internal.html#v:decompressAllMembers" title="Codec.Compression.Zlib.Internal">decompressAllMembers</a></code> <code>False</code> the decompressor knows when the data
 ends and will produce <code><a href="Codec-Compression-Zlib-Internal.html#v:DecompressStreamEnd" title="Codec.Compression.Zlib.Internal">DecompressStreamEnd</a></code> without you having to supply an
 empty chunk to indicate the end of the input.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:DecompressInputRequired" class="def">DecompressInputRequired</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:decompressSupplyInput" class="def">decompressSupplyInput</a> :: ByteString -&gt; m (<a href="Codec-Compression-Zlib-Internal.html#t:DecompressStream" title="Codec.Compression.Zlib.Internal">DecompressStream</a> m)</dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr><tr><td class="src"><a id="v:DecompressOutputAvailable" class="def">DecompressOutputAvailable</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:decompressOutput" class="def">decompressOutput</a> :: !ByteString</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:decompressNext" class="def">decompressNext</a> :: m (<a href="Codec-Compression-Zlib-Internal.html#t:DecompressStream" title="Codec.Compression.Zlib.Internal">DecompressStream</a> m)</dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr><tr><td class="src"><a id="v:DecompressStreamEnd" class="def">DecompressStreamEnd</a></td><td class="doc"><p>Includes any trailing unconsumed <em>input</em> data.</p></td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:decompressUnconsumedInput" class="def">decompressUnconsumedInput</a> :: ByteString</dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr><tr><td class="src"><a id="v:DecompressStreamError" class="def">DecompressStreamError</a></td><td class="doc"><p>An error code</p></td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:decompressStreamError" class="def">decompressStreamError</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:DecompressError" title="Codec.Compression.Zlib.Internal">DecompressError</a></dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:DecompressError" class="def">DecompressError</a> <a href="#t:DecompressError" class="selflink">#</a></p><div class="doc"><p>The possible error cases when decompressing a stream.</p><p>This can be <code>show</code>n to give a human readable error message.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:TruncatedInput" class="def">TruncatedInput</a></td><td class="doc"><p>The compressed data stream ended prematurely. This may happen if the
 input data stream was truncated.</p></td></tr><tr><td class="src"><a id="v:DictionaryRequired" class="def">DictionaryRequired</a></td><td class="doc"><p>It is possible to do zlib compression with a custom dictionary. This
 allows slightly higher compression ratios for short files. However such
 compressed streams require the same dictionary when decompressing. This
 error is for when we encounter a compressed stream that needs a
 dictionary, and it's not provided.</p></td></tr><tr><td class="src"><a id="v:DictionaryMismatch" class="def">DictionaryMismatch</a></td><td class="doc"><p>If the stream requires a dictionary and you provide one with the
 wrong <code>DictionaryHash</code> then you will get this error.</p></td></tr><tr><td class="src"><a id="v:DataFormatError" class="def">DataFormatError</a> String</td><td class="doc"><p>If the compressed data stream is corrupted in any way then you will
 get this error, for example if the input data just isn't a compressed
 zlib data stream. In particular if the data checksum turns out to be
 wrong then you will get all the decompressed data but this error at the
 end, instead of the normal sucessful <code>StreamEnd</code>.</p></td></tr></table></div><div class="subs instances"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:DecompressError">Instances</h4><details id="i:DecompressError" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:DecompressError:Eq:1"></span> Eq <a href="Codec-Compression-Zlib-Internal.html#t:DecompressError" title="Codec.Compression.Zlib.Internal">DecompressError</a></span> <a href="#t:DecompressError" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:DecompressError:Eq:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Internal.html">Codec.Compression.Zlib.Internal</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:DecompressError" title="Codec.Compression.Zlib.Internal">DecompressError</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:DecompressError" title="Codec.Compression.Zlib.Internal">DecompressError</a> -&gt; Bool</p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:DecompressError" title="Codec.Compression.Zlib.Internal">DecompressError</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:DecompressError" title="Codec.Compression.Zlib.Internal">DecompressError</a> -&gt; Bool</p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:DecompressError:Show:2"></span> Show <a href="Codec-Compression-Zlib-Internal.html#t:DecompressError" title="Codec.Compression.Zlib.Internal">DecompressError</a></span> <a href="#t:DecompressError" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:DecompressError:Show:2"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Internal.html">Codec.Compression.Zlib.Internal</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: Int -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:DecompressError" title="Codec.Compression.Zlib.Internal">DecompressError</a> -&gt; ShowS</p><p class="src"><a href="#v:show">show</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:DecompressError" title="Codec.Compression.Zlib.Internal">DecompressError</a> -&gt; String</p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Codec-Compression-Zlib-Internal.html#t:DecompressError" title="Codec.Compression.Zlib.Internal">DecompressError</a>] -&gt; ShowS</p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:DecompressError:Exception:3"></span> Exception <a href="Codec-Compression-Zlib-Internal.html#t:DecompressError" title="Codec.Compression.Zlib.Internal">DecompressError</a></span> <a href="#t:DecompressError" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:DecompressError:Exception:3"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Internal.html">Codec.Compression.Zlib.Internal</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toException">toException</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:DecompressError" title="Codec.Compression.Zlib.Internal">DecompressError</a> -&gt; SomeException</p><p class="src"><a href="#v:fromException">fromException</a> :: SomeException -&gt; Maybe <a href="Codec-Compression-Zlib-Internal.html#t:DecompressError" title="Codec.Compression.Zlib.Internal">DecompressError</a></p><p class="src"><a href="#v:displayException">displayException</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:DecompressError" title="Codec.Compression.Zlib.Internal">DecompressError</a> -&gt; String</p></div></details></td></tr></table></details></div></div><div class="top"><p class="src"><a id="v:decompressST" class="def">decompressST</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:DecompressParams" title="Codec.Compression.Zlib.Internal">DecompressParams</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:DecompressStream" title="Codec.Compression.Zlib.Internal">DecompressStream</a> (ST s) <a href="#v:decompressST" class="selflink">#</a></p><div class="doc"><p>Incremental decompression in the <code>ST</code> monad. Using <code>ST</code> makes it possible
 to write pure <em>lazy</em> functions while making use of incremental decompression.</p></div></div><div class="top"><p class="src"><a id="v:decompressIO" class="def">decompressIO</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:DecompressParams" title="Codec.Compression.Zlib.Internal">DecompressParams</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:DecompressStream" title="Codec.Compression.Zlib.Internal">DecompressStream</a> IO <a href="#v:decompressIO" class="selflink">#</a></p><div class="doc"><p>Incremental decompression in the <code>IO</code> monad.</p></div></div><div class="top"><p class="src"><a id="v:foldDecompressStream" class="def">foldDecompressStream</a> :: Monad m =&gt; ((ByteString -&gt; m a) -&gt; m a) -&gt; (ByteString -&gt; m a -&gt; m a) -&gt; (ByteString -&gt; m a) -&gt; (<a href="Codec-Compression-Zlib-Internal.html#t:DecompressError" title="Codec.Compression.Zlib.Internal">DecompressError</a> -&gt; m a) -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:DecompressStream" title="Codec.Compression.Zlib.Internal">DecompressStream</a> m -&gt; m a <a href="#v:foldDecompressStream" class="selflink">#</a></p><div class="doc"><p>A fold over the <code><a href="Codec-Compression-Zlib-Internal.html#t:DecompressStream" title="Codec.Compression.Zlib.Internal">DecompressStream</a></code> in the given monad.</p><p>One way to look at this is that it runs the stream, using callback functions
 for the four stream events.</p></div></div><div class="top"><p class="src"><a id="v:foldDecompressStreamWithInput" class="def">foldDecompressStreamWithInput</a> :: (ByteString -&gt; a -&gt; a) -&gt; (ByteString -&gt; a) -&gt; (<a href="Codec-Compression-Zlib-Internal.html#t:DecompressError" title="Codec.Compression.Zlib.Internal">DecompressError</a> -&gt; a) -&gt; (<span class="keyword">forall</span> s. <a href="Codec-Compression-Zlib-Internal.html#t:DecompressStream" title="Codec.Compression.Zlib.Internal">DecompressStream</a> (ST s)) -&gt; ByteString -&gt; a <a href="#v:foldDecompressStreamWithInput" class="selflink">#</a></p><div class="doc"><p>A variant on <code><a href="Codec-Compression-Zlib-Internal.html#v:foldCompressStream" title="Codec.Compression.Zlib.Internal">foldCompressStream</a></code> that is pure rather than operating in a
 monad and where the input is provided by a lazy <code>ByteString</code>. So we only
 have to deal with the output, end and error parts, making it like a foldr on
 a list of output chunks.</p><p>For example:</p><pre>toChunks = foldDecompressStreamWithInput (:) [] throw</pre></div></div><a href="#g:5" id="g:5"><h1>The compression parameter types</h1></a><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:CompressParams" class="def">CompressParams</a> <a href="#t:CompressParams" class="selflink">#</a></p><div class="doc"><p>The full set of parameters for compression. The defaults are
 <code><a href="Codec-Compression-Zlib-Internal.html#v:defaultCompressParams" title="Codec.Compression.Zlib.Internal">defaultCompressParams</a></code>.</p><p>The <code><a href="Codec-Compression-Zlib-Internal.html#v:compressBufferSize" title="Codec.Compression.Zlib.Internal">compressBufferSize</a></code> is the size of the first output buffer containing
 the compressed data. If you know an approximate upper bound on the size of
 the compressed data then setting this parameter can save memory. The default
 compression output buffer size is <code>16k</code>. If your extimate is wrong it does
 not matter too much, the default buffer size will be used for the remaining
 chunks.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:CompressParams" class="def">CompressParams</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:compressLevel" class="def">compressLevel</a> :: !<a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a></dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:compressMethod" class="def">compressMethod</a> :: !<a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a></dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:compressWindowBits" class="def">compressWindowBits</a> :: !<a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a></dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:compressMemoryLevel" class="def">compressMemoryLevel</a> :: !<a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a></dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:compressStrategy" class="def">compressStrategy</a> :: !<a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a></dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:compressBufferSize" class="def">compressBufferSize</a> :: !Int</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:compressDictionary" class="def">compressDictionary</a> :: Maybe ByteString</dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr></table></div><div class="subs instances"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:CompressParams">Instances</h4><details id="i:CompressParams" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:CompressParams:Show:1"></span> Show <a href="Codec-Compression-Zlib-Internal.html#t:CompressParams" title="Codec.Compression.Zlib.Internal">CompressParams</a></span> <a href="#t:CompressParams" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:CompressParams:Show:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Internal.html">Codec.Compression.Zlib.Internal</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: Int -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressParams" title="Codec.Compression.Zlib.Internal">CompressParams</a> -&gt; ShowS</p><p class="src"><a href="#v:show">show</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressParams" title="Codec.Compression.Zlib.Internal">CompressParams</a> -&gt; String</p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Codec-Compression-Zlib-Internal.html#t:CompressParams" title="Codec.Compression.Zlib.Internal">CompressParams</a>] -&gt; ShowS</p></div></details></td></tr></table></details></div></div><div class="top"><p class="src"><a id="v:defaultCompressParams" class="def">defaultCompressParams</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressParams" title="Codec.Compression.Zlib.Internal">CompressParams</a> <a href="#v:defaultCompressParams" class="selflink">#</a></p><div class="doc"><p>The default set of parameters for compression. This is typically used with
 the <code>compressWith</code> function with specific parameters overridden.</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:DecompressParams" class="def">DecompressParams</a> <a href="#t:DecompressParams" class="selflink">#</a></p><div class="doc"><p>The full set of parameters for decompression. The defaults are
 <code><a href="Codec-Compression-Zlib-Internal.html#v:defaultDecompressParams" title="Codec.Compression.Zlib.Internal">defaultDecompressParams</a></code>.</p><p>The <code><a href="Codec-Compression-Zlib-Internal.html#v:decompressBufferSize" title="Codec.Compression.Zlib.Internal">decompressBufferSize</a></code> is the size of the first output buffer,
 containing the uncompressed data. If you know an exact or approximate upper
 bound on the size of the decompressed data then setting this parameter can
 save memory. The default decompression output buffer size is <code>32k</code>. If your
 extimate is wrong it does not matter too much, the default buffer size will
 be used for the remaining chunks.</p><p>One particular use case for setting the <code><a href="Codec-Compression-Zlib-Internal.html#v:decompressBufferSize" title="Codec.Compression.Zlib.Internal">decompressBufferSize</a></code> is if you
 know the exact size of the decompressed data and want to produce a strict
 <code><a href="Data-ByteString.html#v:ByteString" title="Data.ByteString">ByteString</a></code>. The compression and deccompression functions
 use lazy <code><a href="Data-ByteString-Lazy.html#v:ByteString" title="Data.ByteString.Lazy">ByteString</a></code>s but if you set the
 <code><a href="Codec-Compression-Zlib-Internal.html#v:decompressBufferSize" title="Codec.Compression.Zlib.Internal">decompressBufferSize</a></code> correctly then you can generate a lazy
 <code><a href="Data-ByteString-Lazy.html#v:ByteString" title="Data.ByteString.Lazy">ByteString</a></code> with exactly one chunk, which can be
 converted to a strict <code><a href="Data-ByteString.html#v:ByteString" title="Data.ByteString">ByteString</a></code> in <code>O(1)</code> time using
 <code><code><a href="Data-ByteString.html#v:concat" title="Data.ByteString">concat</a></code> . <code><a href="Data-ByteString-Lazy.html#v:toChunks" title="Data.ByteString.Lazy">toChunks</a></code></code>.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:DecompressParams" class="def">DecompressParams</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:decompressWindowBits" class="def">decompressWindowBits</a> :: !<a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a></dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:decompressBufferSize" class="def">decompressBufferSize</a> :: !Int</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:decompressDictionary" class="def">decompressDictionary</a> :: Maybe ByteString</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:decompressAllMembers" class="def">decompressAllMembers</a> :: Bool</dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr></table></div><div class="subs instances"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:DecompressParams">Instances</h4><details id="i:DecompressParams" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:DecompressParams:Show:1"></span> Show <a href="Codec-Compression-Zlib-Internal.html#t:DecompressParams" title="Codec.Compression.Zlib.Internal">DecompressParams</a></span> <a href="#t:DecompressParams" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:DecompressParams:Show:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Internal.html">Codec.Compression.Zlib.Internal</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: Int -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:DecompressParams" title="Codec.Compression.Zlib.Internal">DecompressParams</a> -&gt; ShowS</p><p class="src"><a href="#v:show">show</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:DecompressParams" title="Codec.Compression.Zlib.Internal">DecompressParams</a> -&gt; String</p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Codec-Compression-Zlib-Internal.html#t:DecompressParams" title="Codec.Compression.Zlib.Internal">DecompressParams</a>] -&gt; ShowS</p></div></details></td></tr></table></details></div></div><div class="top"><p class="src"><a id="v:defaultDecompressParams" class="def">defaultDecompressParams</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:DecompressParams" title="Codec.Compression.Zlib.Internal">DecompressParams</a> <a href="#v:defaultDecompressParams" class="selflink">#</a></p><div class="doc"><p>The default set of parameters for decompression. This is typically used with
 the <code>compressWith</code> function with specific parameters overridden.</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Format" class="def">Format</a> <a href="#t:Format" class="selflink">#</a></p><div class="doc"><p>The format used for compression or decompression. There are three
 variations.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:GZip" class="def">GZip</a></td><td class="doc"><div class="warning"><p>Deprecated: Use gzipFormat. Format constructors will be hidden in version 0.7</p></div></td></tr><tr><td class="src"><a id="v:Zlib" class="def">Zlib</a></td><td class="doc"><div class="warning"><p>Deprecated: Use zlibFormat. Format constructors will be hidden in version 0.7</p></div></td></tr><tr><td class="src"><a id="v:Raw" class="def">Raw</a></td><td class="doc"><div class="warning"><p>Deprecated: Use rawFormat. Format constructors will be hidden in version 0.7</p></div></td></tr><tr><td class="src"><a id="v:GZipOrZlib" class="def">GZipOrZlib</a></td><td class="doc"><div class="warning"><p>Deprecated: Use gzipOrZlibFormat. Format constructors will be hidden in version 0.7</p></div></td></tr></table></div><div class="subs instances"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:Format">Instances</h4><details id="i:Format" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Format:Bounded:1"></span> Bounded <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a></span> <a href="#t:Format" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Format:Bounded:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:minBound">minBound</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a></p><p class="src"><a href="#v:maxBound">maxBound</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Format:Enum:2"></span> Enum <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a></span> <a href="#t:Format" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Format:Enum:2"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:succ">succ</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a></p><p class="src"><a href="#v:pred">pred</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a></p><p class="src"><a href="#v:toEnum">toEnum</a> :: Int -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a></p><p class="src"><a href="#v:fromEnum">fromEnum</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; Int</p><p class="src"><a href="#v:enumFrom">enumFrom</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; [<a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a>]</p><p class="src"><a href="#v:enumFromThen">enumFromThen</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; [<a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a>]</p><p class="src"><a href="#v:enumFromTo">enumFromTo</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; [<a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a>]</p><p class="src"><a href="#v:enumFromThenTo">enumFromThenTo</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; [<a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a>]</p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Format:Eq:3"></span> Eq <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a></span> <a href="#t:Format" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Format:Eq:3"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; Bool</p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; Bool</p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Format:Ord:4"></span> Ord <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a></span> <a href="#t:Format" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Format:Ord:4"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; Ordering</p><p class="src"><a href="#v:-60-">(&lt;)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; Bool</p><p class="src"><a href="#v:-60--61-">(&lt;=)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; Bool</p><p class="src"><a href="#v:-62-">(&gt;)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; Bool</p><p class="src"><a href="#v:-62--61-">(&gt;=)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; Bool</p><p class="src"><a href="#v:max">max</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a></p><p class="src"><a href="#v:min">min</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Format:Show:5"></span> Show <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a></span> <a href="#t:Format" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Format:Show:5"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: Int -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; ShowS</p><p class="src"><a href="#v:show">show</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; String</p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a>] -&gt; ShowS</p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Format:Generic:6"></span> Generic <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a></span> <a href="#t:Format" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Format:Generic:6"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> Rep <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> :: Type -&gt; Type</p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:from">from</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> -&gt; Rep <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> x</p><p class="src"><a href="#v:to">to</a> :: Rep <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> x -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Format:Rep:7"></span> <span class="keyword">type</span> Rep <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a></span> <a href="#t:Format" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Format:Rep:7"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="src"><span class="keyword">type</span> Rep <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> = D1 ('MetaData &quot;Format&quot; &quot;Codec.Compression.Zlib.Stream&quot; &quot;zlib-0.6.2.1-GRQpOYeTETk3SIbD26OHMg&quot; 'False) ((C1 ('MetaCons &quot;GZip&quot; 'PrefixI 'False) (U1 :: Type -&gt; Type) :+: C1 ('MetaCons &quot;Zlib&quot; 'PrefixI 'False) (U1 :: Type -&gt; Type)) :+: (C1 ('MetaCons &quot;Raw&quot; 'PrefixI 'False) (U1 :: Type -&gt; Type) :+: C1 ('MetaCons &quot;GZipOrZlib&quot; 'PrefixI 'False) (U1 :: Type -&gt; Type)))</div></details></td></tr></table></details></div></div><div class="top"><p class="src"><a id="v:gzipFormat" class="def">gzipFormat</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> <a href="#v:gzipFormat" class="selflink">#</a></p><div class="doc"><p>The gzip format uses a header with a checksum and some optional meta-data
 about the compressed file. It is intended primarily for compressing
 individual files but is also sometimes used for network protocols such as
 HTTP. The format is described in detail in RFC #1952
 <a href="http://www.ietf.org/rfc/rfc1952.txt">http://www.ietf.org/rfc/rfc1952.txt</a></p></div></div><div class="top"><p class="src"><a id="v:zlibFormat" class="def">zlibFormat</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> <a href="#v:zlibFormat" class="selflink">#</a></p><div class="doc"><p>The zlib format uses a minimal header with a checksum but no other
 meta-data. It is especially designed for use in network protocols. The
 format is described in detail in RFC #1950
 <a href="http://www.ietf.org/rfc/rfc1950.txt">http://www.ietf.org/rfc/rfc1950.txt</a></p></div></div><div class="top"><p class="src"><a id="v:rawFormat" class="def">rawFormat</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> <a href="#v:rawFormat" class="selflink">#</a></p><div class="doc"><p>The 'raw' format is just the compressed data stream without any
 additional header, meta-data or data-integrity checksum. The format is
 described in detail in RFC #1951 <a href="http://www.ietf.org/rfc/rfc1951.txt">http://www.ietf.org/rfc/rfc1951.txt</a></p></div></div><div class="top"><p class="src"><a id="v:gzipOrZlibFormat" class="def">gzipOrZlibFormat</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Format" title="Codec.Compression.Zlib.Internal">Format</a> <a href="#v:gzipOrZlibFormat" class="selflink">#</a></p><div class="doc"><p>This is not a format as such. It enabled zlib or gzip decoding with
 automatic header detection. This only makes sense for decompression.</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:CompressionLevel" class="def">CompressionLevel</a> <a href="#t:CompressionLevel" class="selflink">#</a></p><div class="doc"><p>The compression level parameter controls the amount of compression. This
 is a trade-off between the amount of compression and the time required to do
 the compression.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:DefaultCompression" class="def">DefaultCompression</a></td><td class="doc"><div class="warning"><p>Deprecated: Use defaultCompression. CompressionLevel constructors will be hidden in version 0.7</p></div></td></tr><tr><td class="src"><a id="v:NoCompression" class="def">NoCompression</a></td><td class="doc"><div class="warning"><p>Deprecated: Use noCompression. CompressionLevel constructors will be hidden in version 0.7</p></div></td></tr><tr><td class="src"><a id="v:BestSpeed" class="def">BestSpeed</a></td><td class="doc"><div class="warning"><p>Deprecated: Use bestSpeed. CompressionLevel constructors will be hidden in version 0.7</p></div></td></tr><tr><td class="src"><a id="v:BestCompression" class="def">BestCompression</a></td><td class="doc"><div class="warning"><p>Deprecated: Use bestCompression. CompressionLevel constructors will be hidden in version 0.7</p></div></td></tr><tr><td class="src"><a id="v:CompressionLevel" class="def">CompressionLevel</a> Int</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:CompressionLevel">Instances</h4><details id="i:CompressionLevel" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:CompressionLevel:Eq:1"></span> Eq <a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a></span> <a href="#t:CompressionLevel" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:CompressionLevel:Eq:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a> -&gt; Bool</p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a> -&gt; Bool</p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:CompressionLevel:Show:2"></span> Show <a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a></span> <a href="#t:CompressionLevel" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:CompressionLevel:Show:2"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: Int -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a> -&gt; ShowS</p><p class="src"><a href="#v:show">show</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a> -&gt; String</p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a>] -&gt; ShowS</p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:CompressionLevel:Generic:3"></span> Generic <a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a></span> <a href="#t:CompressionLevel" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:CompressionLevel:Generic:3"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> Rep <a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a> :: Type -&gt; Type</p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:from">from</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a> -&gt; Rep <a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a> x</p><p class="src"><a href="#v:to">to</a> :: Rep <a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a> x -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:CompressionLevel:Rep:4"></span> <span class="keyword">type</span> Rep <a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a></span> <a href="#t:CompressionLevel" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:CompressionLevel:Rep:4"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="src"><span class="keyword">type</span> Rep <a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a> = D1 ('MetaData &quot;CompressionLevel&quot; &quot;Codec.Compression.Zlib.Stream&quot; &quot;zlib-0.6.2.1-GRQpOYeTETk3SIbD26OHMg&quot; 'False) ((C1 ('MetaCons &quot;DefaultCompression&quot; 'PrefixI 'False) (U1 :: Type -&gt; Type) :+: C1 ('MetaCons &quot;NoCompression&quot; 'PrefixI 'False) (U1 :: Type -&gt; Type)) :+: (C1 ('MetaCons &quot;BestSpeed&quot; 'PrefixI 'False) (U1 :: Type -&gt; Type) :+: (C1 ('MetaCons &quot;BestCompression&quot; 'PrefixI 'False) (U1 :: Type -&gt; Type) :+: C1 ('MetaCons &quot;CompressionLevel&quot; 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))))</div></details></td></tr></table></details></div></div><div class="top"><p class="src"><a id="v:defaultCompression" class="def">defaultCompression</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a> <a href="#v:defaultCompression" class="selflink">#</a></p><div class="doc"><p>The default compression level is 6 (that is, biased towards higher
 compression at expense of speed).</p></div></div><div class="top"><p class="src"><a id="v:noCompression" class="def">noCompression</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a> <a href="#v:noCompression" class="selflink">#</a></p><div class="doc"><p>No compression, just a block copy.</p></div></div><div class="top"><p class="src"><a id="v:bestSpeed" class="def">bestSpeed</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a> <a href="#v:bestSpeed" class="selflink">#</a></p><div class="doc"><p>The fastest compression method (less compression)</p></div></div><div class="top"><p class="src"><a id="v:bestCompression" class="def">bestCompression</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a> <a href="#v:bestCompression" class="selflink">#</a></p><div class="doc"><p>The slowest compression method (best compression).</p></div></div><div class="top"><p class="src"><a id="v:compressionLevel" class="def">compressionLevel</a> :: Int -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressionLevel" title="Codec.Compression.Zlib.Internal">CompressionLevel</a> <a href="#v:compressionLevel" class="selflink">#</a></p><div class="doc"><p>A specific compression level between 0 and 9.</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Method" class="def">Method</a> <a href="#t:Method" class="selflink">#</a></p><div class="doc"><p>The compression method</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Deflated" class="def">Deflated</a></td><td class="doc"><div class="warning"><p>Deprecated: Use deflateMethod. Method constructors will be hidden in version 0.7</p></div></td></tr></table></div><div class="subs instances"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:Method">Instances</h4><details id="i:Method" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Method:Bounded:1"></span> Bounded <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a></span> <a href="#t:Method" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Method:Bounded:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:minBound">minBound</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a></p><p class="src"><a href="#v:maxBound">maxBound</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Method:Enum:2"></span> Enum <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a></span> <a href="#t:Method" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Method:Enum:2"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:succ">succ</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a></p><p class="src"><a href="#v:pred">pred</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a></p><p class="src"><a href="#v:toEnum">toEnum</a> :: Int -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a></p><p class="src"><a href="#v:fromEnum">fromEnum</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; Int</p><p class="src"><a href="#v:enumFrom">enumFrom</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; [<a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a>]</p><p class="src"><a href="#v:enumFromThen">enumFromThen</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; [<a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a>]</p><p class="src"><a href="#v:enumFromTo">enumFromTo</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; [<a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a>]</p><p class="src"><a href="#v:enumFromThenTo">enumFromThenTo</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; [<a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a>]</p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Method:Eq:3"></span> Eq <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a></span> <a href="#t:Method" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Method:Eq:3"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; Bool</p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; Bool</p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Method:Ord:4"></span> Ord <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a></span> <a href="#t:Method" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Method:Ord:4"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; Ordering</p><p class="src"><a href="#v:-60-">(&lt;)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; Bool</p><p class="src"><a href="#v:-60--61-">(&lt;=)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; Bool</p><p class="src"><a href="#v:-62-">(&gt;)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; Bool</p><p class="src"><a href="#v:-62--61-">(&gt;=)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; Bool</p><p class="src"><a href="#v:max">max</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a></p><p class="src"><a href="#v:min">min</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Method:Show:5"></span> Show <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a></span> <a href="#t:Method" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Method:Show:5"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: Int -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; ShowS</p><p class="src"><a href="#v:show">show</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; String</p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a>] -&gt; ShowS</p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Method:Generic:6"></span> Generic <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a></span> <a href="#t:Method" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Method:Generic:6"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> Rep <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> :: Type -&gt; Type</p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:from">from</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> -&gt; Rep <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> x</p><p class="src"><a href="#v:to">to</a> :: Rep <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> x -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Method:Rep:7"></span> <span class="keyword">type</span> Rep <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a></span> <a href="#t:Method" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:Method:Rep:7"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="src"><span class="keyword">type</span> Rep <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> = D1 ('MetaData &quot;Method&quot; &quot;Codec.Compression.Zlib.Stream&quot; &quot;zlib-0.6.2.1-GRQpOYeTETk3SIbD26OHMg&quot; 'False) (C1 ('MetaCons &quot;Deflated&quot; 'PrefixI 'False) (U1 :: Type -&gt; Type))</div></details></td></tr></table></details></div></div><div class="top"><p class="src"><a id="v:deflateMethod" class="def">deflateMethod</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:Method" title="Codec.Compression.Zlib.Internal">Method</a> <a href="#v:deflateMethod" class="selflink">#</a></p><div class="doc"><p>'Deflate' is the only method supported in this version of zlib.
 Indeed it is likely to be the only method that ever will be supported.</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:WindowBits" class="def">WindowBits</a> <a href="#t:WindowBits" class="selflink">#</a></p><div class="doc"><p>This specifies the size of the compression window. Larger values of this
 parameter result in better compression at the expense of higher memory
 usage.</p><p>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 <code>9..15</code> which corresponds
 to compression window sizes of 512b to 32Kb. The default is 15 which is also
 the maximum size.</p><p>The total amount of memory used depends on the window bits and the
 <code><a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a></code>. See the <code><a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a></code> for the details.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:WindowBits" class="def">WindowBits</a> Int</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:DefaultWindowBits" class="def">DefaultWindowBits</a></td><td class="doc"><div class="warning"><p>Deprecated: Use defaultWindowBits. WindowBits constructors will be hidden in version 0.7</p></div></td></tr></table></div><div class="subs instances"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:WindowBits">Instances</h4><details id="i:WindowBits" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:WindowBits:Eq:1"></span> Eq <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a></span> <a href="#t:WindowBits" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:WindowBits:Eq:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> -&gt; Bool</p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> -&gt; Bool</p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:WindowBits:Ord:2"></span> Ord <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a></span> <a href="#t:WindowBits" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:WindowBits:Ord:2"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> -&gt; Ordering</p><p class="src"><a href="#v:-60-">(&lt;)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> -&gt; Bool</p><p class="src"><a href="#v:-60--61-">(&lt;=)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> -&gt; Bool</p><p class="src"><a href="#v:-62-">(&gt;)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> -&gt; Bool</p><p class="src"><a href="#v:-62--61-">(&gt;=)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> -&gt; Bool</p><p class="src"><a href="#v:max">max</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a></p><p class="src"><a href="#v:min">min</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:WindowBits:Show:3"></span> Show <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a></span> <a href="#t:WindowBits" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:WindowBits:Show:3"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: Int -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> -&gt; ShowS</p><p class="src"><a href="#v:show">show</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> -&gt; String</p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a>] -&gt; ShowS</p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:WindowBits:Generic:4"></span> Generic <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a></span> <a href="#t:WindowBits" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:WindowBits:Generic:4"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> Rep <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> :: Type -&gt; Type</p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:from">from</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> -&gt; Rep <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> x</p><p class="src"><a href="#v:to">to</a> :: Rep <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> x -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:WindowBits:Rep:5"></span> <span class="keyword">type</span> Rep <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a></span> <a href="#t:WindowBits" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:WindowBits:Rep:5"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="src"><span class="keyword">type</span> Rep <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> = D1 ('MetaData &quot;WindowBits&quot; &quot;Codec.Compression.Zlib.Stream&quot; &quot;zlib-0.6.2.1-GRQpOYeTETk3SIbD26OHMg&quot; 'False) (C1 ('MetaCons &quot;WindowBits&quot; 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :+: C1 ('MetaCons &quot;DefaultWindowBits&quot; 'PrefixI 'False) (U1 :: Type -&gt; Type))</div></details></td></tr></table></details></div></div><div class="top"><p class="src"><a id="v:defaultWindowBits" class="def">defaultWindowBits</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> <a href="#v:defaultWindowBits" class="selflink">#</a></p><div class="doc"><p>The default <code><a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a></code> is 15 which is also the maximum size.</p></div></div><div class="top"><p class="src"><a id="v:windowBits" class="def">windowBits</a> :: Int -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a> <a href="#v:windowBits" class="selflink">#</a></p><div class="doc"><p>A specific compression window size, specified in bits in the range <code>9..15</code></p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:MemoryLevel" class="def">MemoryLevel</a> <a href="#t:MemoryLevel" class="selflink">#</a></p><div class="doc"><p>The <code><a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a></code> parameter specifies how much memory should be allocated
 for the internal compression state. It is a tradoff between memory usage,
 compression ratio and compression speed. Using more memory allows faster
 compression and a better compression ratio.</p><p>The total amount of memory used for compression depends on the <code><a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a></code>
 and the <code><a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a></code>. For decompression it depends only on the
 <code><a href="Codec-Compression-Zlib-Internal.html#t:WindowBits" title="Codec.Compression.Zlib.Internal">WindowBits</a></code>. The totals are given by the functions:</p><pre>compressTotal windowBits memLevel = 4 * 2^windowBits + 512 * 2^memLevel
decompressTotal windowBits = 2^windowBits</pre><p>For example, for compression with the default <code>windowBits = 15</code> and
 <code>memLevel = 8</code> uses <code>256Kb</code>. So for example a network server with 100
 concurrent compressed streams would use <code>25Mb</code>. The memory per stream can be
 halved (at the cost of somewhat degraded and slower compressionby) by
 reducing the <code>windowBits</code> and <code>memLevel</code> by one.</p><p>Decompression takes less memory, the default <code>windowBits = 15</code> corresponds
 to just <code>32Kb</code>.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:DefaultMemoryLevel" class="def">DefaultMemoryLevel</a></td><td class="doc"><div class="warning"><p>Deprecated: Use defaultMemoryLevel. MemoryLevel constructors will be hidden in version 0.7</p></div></td></tr><tr><td class="src"><a id="v:MinMemoryLevel" class="def">MinMemoryLevel</a></td><td class="doc"><div class="warning"><p>Deprecated: Use minMemoryLevel. MemoryLevel constructors will be hidden in version 0.7</p></div></td></tr><tr><td class="src"><a id="v:MaxMemoryLevel" class="def">MaxMemoryLevel</a></td><td class="doc"><div class="warning"><p>Deprecated: Use maxMemoryLevel. MemoryLevel constructors will be hidden in version 0.7</p></div></td></tr><tr><td class="src"><a id="v:MemoryLevel" class="def">MemoryLevel</a> Int</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:MemoryLevel">Instances</h4><details id="i:MemoryLevel" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:MemoryLevel:Eq:1"></span> Eq <a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a></span> <a href="#t:MemoryLevel" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:MemoryLevel:Eq:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a> -&gt; Bool</p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a> -&gt; Bool</p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:MemoryLevel:Show:2"></span> Show <a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a></span> <a href="#t:MemoryLevel" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:MemoryLevel:Show:2"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: Int -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a> -&gt; ShowS</p><p class="src"><a href="#v:show">show</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a> -&gt; String</p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a>] -&gt; ShowS</p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:MemoryLevel:Generic:3"></span> Generic <a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a></span> <a href="#t:MemoryLevel" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:MemoryLevel:Generic:3"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> Rep <a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a> :: Type -&gt; Type</p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:from">from</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a> -&gt; Rep <a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a> x</p><p class="src"><a href="#v:to">to</a> :: Rep <a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a> x -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:MemoryLevel:Rep:4"></span> <span class="keyword">type</span> Rep <a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a></span> <a href="#t:MemoryLevel" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:MemoryLevel:Rep:4"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="src"><span class="keyword">type</span> Rep <a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a> = D1 ('MetaData &quot;MemoryLevel&quot; &quot;Codec.Compression.Zlib.Stream&quot; &quot;zlib-0.6.2.1-GRQpOYeTETk3SIbD26OHMg&quot; 'False) ((C1 ('MetaCons &quot;DefaultMemoryLevel&quot; 'PrefixI 'False) (U1 :: Type -&gt; Type) :+: C1 ('MetaCons &quot;MinMemoryLevel&quot; 'PrefixI 'False) (U1 :: Type -&gt; Type)) :+: (C1 ('MetaCons &quot;MaxMemoryLevel&quot; 'PrefixI 'False) (U1 :: Type -&gt; Type) :+: C1 ('MetaCons &quot;MemoryLevel&quot; 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))))</div></details></td></tr></table></details></div></div><div class="top"><p class="src"><a id="v:defaultMemoryLevel" class="def">defaultMemoryLevel</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a> <a href="#v:defaultMemoryLevel" class="selflink">#</a></p><div class="doc"><p>The default memory level. (Equivalent to <code><code><a href="Codec-Compression-Zlib-Internal.html#v:memoryLevel" title="Codec.Compression.Zlib.Internal">memoryLevel</a></code> 8</code>)</p></div></div><div class="top"><p class="src"><a id="v:minMemoryLevel" class="def">minMemoryLevel</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a> <a href="#v:minMemoryLevel" class="selflink">#</a></p><div class="doc"><p>Use minimum memory. This is slow and reduces the compression ratio.
 (Equivalent to <code><code><a href="Codec-Compression-Zlib-Internal.html#v:memoryLevel" title="Codec.Compression.Zlib.Internal">memoryLevel</a></code> 1</code>)</p></div></div><div class="top"><p class="src"><a id="v:maxMemoryLevel" class="def">maxMemoryLevel</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a> <a href="#v:maxMemoryLevel" class="selflink">#</a></p><div class="doc"><p>Use maximum memory for optimal compression speed.
 (Equivalent to <code><code><a href="Codec-Compression-Zlib-Internal.html#v:memoryLevel" title="Codec.Compression.Zlib.Internal">memoryLevel</a></code> 9</code>)</p></div></div><div class="top"><p class="src"><a id="v:memoryLevel" class="def">memoryLevel</a> :: Int -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:MemoryLevel" title="Codec.Compression.Zlib.Internal">MemoryLevel</a> <a href="#v:memoryLevel" class="selflink">#</a></p><div class="doc"><p>A specific level in the range <code>1..9</code></p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:CompressionStrategy" class="def">CompressionStrategy</a> <a href="#t:CompressionStrategy" class="selflink">#</a></p><div class="doc"><p>The strategy parameter is used to tune the compression algorithm.</p><p>The strategy parameter only affects the compression ratio but not the
 correctness of the compressed output even if it is not set appropriately.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:DefaultStrategy" class="def">DefaultStrategy</a></td><td class="doc"><div class="warning"><p>Deprecated: Use defaultStrategy. CompressionStrategy constructors will be hidden in version 0.7</p></div></td></tr><tr><td class="src"><a id="v:Filtered" class="def">Filtered</a></td><td class="doc"><div class="warning"><p>Deprecated: Use filteredStrategy. CompressionStrategy constructors will be hidden in version 0.7</p></div></td></tr><tr><td class="src"><a id="v:HuffmanOnly" class="def">HuffmanOnly</a></td><td class="doc"><div class="warning"><p>Deprecated: Use huffmanOnlyStrategy. CompressionStrategy constructors will be hidden in version 0.7</p></div></td></tr></table></div><div class="subs instances"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:CompressionStrategy">Instances</h4><details id="i:CompressionStrategy" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:CompressionStrategy:Bounded:1"></span> Bounded <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a></span> <a href="#t:CompressionStrategy" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:CompressionStrategy:Bounded:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:minBound">minBound</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a></p><p class="src"><a href="#v:maxBound">maxBound</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:CompressionStrategy:Enum:2"></span> Enum <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a></span> <a href="#t:CompressionStrategy" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:CompressionStrategy:Enum:2"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:succ">succ</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a></p><p class="src"><a href="#v:pred">pred</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a></p><p class="src"><a href="#v:toEnum">toEnum</a> :: Int -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a></p><p class="src"><a href="#v:fromEnum">fromEnum</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; Int</p><p class="src"><a href="#v:enumFrom">enumFrom</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; [<a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a>]</p><p class="src"><a href="#v:enumFromThen">enumFromThen</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; [<a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a>]</p><p class="src"><a href="#v:enumFromTo">enumFromTo</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; [<a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a>]</p><p class="src"><a href="#v:enumFromThenTo">enumFromThenTo</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; [<a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a>]</p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:CompressionStrategy:Eq:3"></span> Eq <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a></span> <a href="#t:CompressionStrategy" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:CompressionStrategy:Eq:3"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; Bool</p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; Bool</p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:CompressionStrategy:Ord:4"></span> Ord <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a></span> <a href="#t:CompressionStrategy" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:CompressionStrategy:Ord:4"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; Ordering</p><p class="src"><a href="#v:-60-">(&lt;)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; Bool</p><p class="src"><a href="#v:-60--61-">(&lt;=)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; Bool</p><p class="src"><a href="#v:-62-">(&gt;)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; Bool</p><p class="src"><a href="#v:-62--61-">(&gt;=)</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; Bool</p><p class="src"><a href="#v:max">max</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a></p><p class="src"><a href="#v:min">min</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:CompressionStrategy:Show:5"></span> Show <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a></span> <a href="#t:CompressionStrategy" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:CompressionStrategy:Show:5"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: Int -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; ShowS</p><p class="src"><a href="#v:show">show</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; String</p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a>] -&gt; ShowS</p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:CompressionStrategy:Generic:6"></span> Generic <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a></span> <a href="#t:CompressionStrategy" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:CompressionStrategy:Generic:6"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> Rep <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> :: Type -&gt; Type</p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:from">from</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> -&gt; Rep <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> x</p><p class="src"><a href="#v:to">to</a> :: Rep <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> x -&gt; <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a></p></div></details></td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:CompressionStrategy:Rep:7"></span> <span class="keyword">type</span> Rep <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a></span> <a href="#t:CompressionStrategy" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><details id="i:id:CompressionStrategy:Rep:7"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="Codec-Compression-Zlib-Stream.html">Codec.Compression.Zlib.Stream</a></p> <div class="src"><span class="keyword">type</span> Rep <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> = D1 ('MetaData &quot;CompressionStrategy&quot; &quot;Codec.Compression.Zlib.Stream&quot; &quot;zlib-0.6.2.1-GRQpOYeTETk3SIbD26OHMg&quot; 'False) (C1 ('MetaCons &quot;DefaultStrategy&quot; 'PrefixI 'False) (U1 :: Type -&gt; Type) :+: (C1 ('MetaCons &quot;Filtered&quot; 'PrefixI 'False) (U1 :: Type -&gt; Type) :+: C1 ('MetaCons &quot;HuffmanOnly&quot; 'PrefixI 'False) (U1 :: Type -&gt; Type)))</div></details></td></tr></table></details></div></div><div class="top"><p class="src"><a id="v:defaultStrategy" class="def">defaultStrategy</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> <a href="#v:defaultStrategy" class="selflink">#</a></p><div class="doc"><p>Use this default compression strategy for normal data.</p></div></div><div class="top"><p class="src"><a id="v:filteredStrategy" class="def">filteredStrategy</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> <a href="#v:filteredStrategy" class="selflink">#</a></p><div class="doc"><p>Use the filtered compression strategy for data produced by a filter (or
 predictor). Filtered data consists mostly of small values with a somewhat
 random distribution. In this case, the compression algorithm is tuned to
 compress them better. The effect of this strategy is to force more Huffman
 coding and less string matching; it is somewhat intermediate between
 <code>defaultCompressionStrategy</code> and <code>huffmanOnlyCompressionStrategy</code>.</p></div></div><div class="top"><p class="src"><a id="v:huffmanOnlyStrategy" class="def">huffmanOnlyStrategy</a> :: <a href="Codec-Compression-Zlib-Internal.html#t:CompressionStrategy" title="Codec.Compression.Zlib.Internal">CompressionStrategy</a> <a href="#v:huffmanOnlyStrategy" class="selflink">#</a></p><div class="doc"><p>Use the Huffman-only compression strategy to force Huffman encoding only
 (no string match).</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.24.2</p></div></body></html>