Îőłh$A÷>ąî      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmNoneÇĺno(c) 2006-2015 Duncan Coutts BSD-styleduncan@community.haskell.orgNone 38vzlibÁThe strategy parameter is used to tune the compression algorithm.The strategy parameter only affects the compression ratio but not the correctness of the compressed output even if it is not set appropriately.zlibThe ű parameter specifies how much memory should be allocated for the internal compression state. It is a tradeoff between memory usage, compression ratio and compression speed. Using more memory allows faster compression and a better compression ratio.?The total amount of memory used for compression depends on the   and the ,. For decompression it depends only on the  (. The totals are given by the functions: ńcompressTotal windowBits memLevel = 4 * 2^windowBits + 512 * 2^memLevel decompressTotal windowBits = 2^windowBits.For example, for compression with the default windowBits = 15 and  memLevel = 8 uses 256KbÔ. So for example a network server with 100 concurrent compressed streams would use 25Mbň. The memory per stream can be halved (at the cost of somewhat degraded and slower compression) by reducing the  windowBits and memLevel by one.-Decompression takes less memory, the default windowBits = 15 corresponds to just 32Kb. zlib˜This specifies the size of the compression window. Larger values of this parameter result in better compression at the expense of higher memory usage.ýThe compression window size is the value of the the window bits raised to the power 2. The window bits must be in the range 9..15ó which corresponds to compression window sizes of 512b to 32Kb. The default is 15 which is also the maximum size.ÄThe total amount of memory used depends on the window bits and the  . See the  for the details. zlib¨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.zlibThe compression methodzlibÎThe format used for compression or decompression. There are three variations.pzlibÓNo progress was possible or there was not enough room in the output buffer when q is used. Note that  BuferError is not fatal, and rĘ can be called again with more input and more output space to continue.szlib•A hash of a custom compression dictionary. These hashes are used by zlib as dictionary identifiers. (The particular hash function used is Adler32.)tzlibUpdate a running s. You can generate a s from one or more us by starting from v, e.g. ÁdictionaryHash zeroDictionaryHash :: ByteString -> DictionaryHashor Ęfoldl' dictionaryHash zeroDictionaryHash :: [ByteString] -> DictionaryHashvzlibA zero s" to use as the initial value with t.zlib‘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 #http://www.ietf.org/rfc/rfc1952.txtzlib¸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 #http://www.ietf.org/rfc/rfc1950.txtzlibŞ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 #http://www.ietf.org/rfc/rfc1951.txtzlib‰This is not a format as such. It enabled zlib or gzip decoding with automatic header detection. This only makes sense for decompression.zlib‡'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.zlibĺThe default compression level is 6 (that is, biased towards higher compression at expense of speed).zlib"No compression, just a block copy. zlib1The fastest compression method (less compression)!zlib2The slowest compression method (best compression)."zlib-A specific compression level between 0 and 9.#zlib The default  & is 15 which is also the maximum size.$zlibĂA specific compression window size, specified in bits in the range 9..15%zlib)The default memory level. (Equivalent to ( 8)&zlibÔUse minimum memory. This is slow and reduces the compression ratio. (Equivalent to ( 1)'zlibÂUse maximum memory for optimal compression speed. (Equivalent to ( 9)(zlibA specific level in the range 1..9)zlib6Use this default compression strategy for normal data.*zlibđ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 defaultCompressionStrategy and huffmanOnlyCompressionStrategy.+zlibÜUse the Huffman-only compression strategy to force Huffman encoding only (no string match).wzlibŁThis never needs to be used as the stream's resources will be released automatically when no longer needed, however this can be used to release them early. Only use this when you can guarantee that the stream will no longer be needed, for example if an error occurs or if the stream ends.×  xyz{q|}~€p‚ƒ„…†‡ˆ‰sŠ‹ŒŽ‘’r“”•tv–—˜™ !"#$%&'()*+š›w(c) 2006-2015 Duncan Coutts BSD-styleduncan@community.haskell.org Trustworthy3ÔŮ/Ú,zlibŒ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.3zlib5The possible error cases when decompressing a stream. This can be œ)n to give a human readable error message.4zlibćThe compressed data stream ended prematurely. This may happen if the input data stream was truncated.5zlibť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.6zlibČIf the stream requires a dictionary and you provide one with the wrong DictionaryHash then you will get this error.7zlibÁ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 successful  StreamEnd.8zlibŽ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.ÍTo indicate the end of the input supply an empty input chunk. Note that for  gzipFormat with the default G TrueŰ you will have to do this, as the decompressor will look for any following members. With G False= the decompressor knows when the data ends and will produce ;Ď without you having to supply an empty chunk to indicate the end of the input.;zlib!Includes any trailing unconsumed input data.<zlib An error codeBzlibŔThe full set of parameters for decompression. The defaults are R.The E€ 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 32ků. If your estimate is wrong it does not matter too much, the default buffer size will be used for the remaining chunks.(One particular use case for setting the E× is if you know the exact size of the decompressed data and want to produce a strict 8. The compression and decompression functions use lazy  s but if you set the E) correctly then you can generate a lazy  = with exactly one chunk, which can be converted to a strict  in O(1) time using   .  .Hzlib>The full set of parameters for compression. The defaults are Q.The Ođ 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 16ků. If your estimate is wrong it does not matter too much, the default buffer size will be used for the remaining chunks.QzlibĐThe default set of parameters for compression. This is typically used with the  compressWith. function with specific parameters overridden.RzlibŇThe default set of parameters for decompression. This is typically used with the  compressWith. function with specific parameters overridden.SzlibA fold over the 8 in the given monad.éOne way to look at this is that it runs the stream, using callback functions for the four stream events.Tzlib A variant on UÚ that is pure rather than operating in a monad and where the input is provided by a lazy ô. So we only have to deal with the output, end and error parts, making it like a foldr on a list of output chunks. For example: 5toChunks = foldDecompressStreamWithInput (:) [] throwUzlibA fold over the , in the given monad.ęOne way to look at this is that it runs the stream, using callback functions for the three stream events.Vzlib A variant on UÚ that is pure rather than operating in a monad and where the input is provided by a lazy ň. So we only have to deal with the output and end parts, making it just like a foldr on a list of output chunks. For example: -toChunks = foldCompressStreamWithInput (:) []Wzlib*Compress a data stream provided as a lazy .î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.XzlibIncremental compression in the ž monad. Using ž" makes it possible to write pure lazy7 functions while making use of incremental compression.YzlibIncremental compression in the Ÿ monad.Zzlib,Decompress a data stream provided as a lazy . 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, [ or \.[zlib!Incremental decompression in the ž monad. Using ž" makes it possible to write pure lazy9 functions while making use of incremental decompression.\zlib!Incremental decompression in the Ÿ monad.Ý   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\ÝWZ,-./012XYUV89:;<=>?@A34567[\STHIJKLMNOPQBCDEFGR   !" #$%&'()*+(c) 2006-2014 Duncan Coutts BSD-styleduncan@community.haskell.org Safe-Inferred0˙8   !"#$%&'()*+BCDEFGHIJKLMNOPQRbcde8dbecHIJKLMNOPQBCDEFGR   !" #$%&'()*+(c) 2006-2014 Duncan Coutts BSD-styleduncan@community.haskell.org Safe-Inferred7žfzlib/Decompress a stream of data in the zlib format.úThere are a number of errors that can occur. In each case an exception will be thrown. The possible error conditions are:5if the stream does not start with a valid gzip header%if the compressed stream is corrupted)if the compressed stream ends prematurely)Note that the decompression is performed lazilyŠ. Errors in the data stream may not be detected until the end of the stream is demanded (since it is only at the end that the final checksum can be checked). If this is important to you, you must make sure to consume the whole decompressed stream before doing any IO action that depends on it.gzlibLike fŇ but with the ability to specify various decompression parameters. Typical usage: ,decompressWith defaultCompressParams { ... }hzlib/Compress a stream of data into the zlib format.ÚThis uses the default compression parameters. In particular it uses the default compression level which favours a higher compression ratio over compression speed, though it does not use the maximum compression level.Use i to adjust the compression level or other compression parameters.izlibLike hĐ but with the ability to specify various compression parameters. Typical usage: *compressWith defaultCompressParams { ... }0In particular you can set the compression level: ĆcompressWith defaultCompressParams { compressLevel = BestCompression }8   !"#$%&'()*+BCDEFGHIJKLMNOPQRfghi8hfigHIJKLMNOPQBCDEFGR   !" #$%&'()*+(c) 2006-2014 Duncan Coutts BSD-styleduncan@community.haskell.org Safe-Inferred>=jzlib/Decompress a stream of data in the gzip format.úThere are a number of errors that can occur. In each case an exception will be thrown. The possible error conditions are:5if the stream does not start with a valid gzip header%if the compressed stream is corrupted)if the compressed stream ends prematurely)Note that the decompression is performed lazilyŠ. Errors in the data stream may not be detected until the end of the stream is demanded (since it is only at the end that the final checksum can be checked). If this is important to you, you must make sure to consume the whole decompressed stream before doing any IO action that depends on it.kzlibLike jŇ but with the ability to specify various decompression parameters. Typical usage: ,decompressWith defaultCompressParams { ... }lzlib/Compress a stream of data into the gzip format.ÚThis uses the default compression parameters. In particular it uses the default compression level which favours a higher compression ratio over compression speed, though it does not use the maximum compression level.Use m to adjust the compression level or other compression parameters.mzlibLike lĐ but with the ability to specify various compression parameters. Typical usage: *compressWith defaultCompressParams { ... }0In particular you can set the compression level: ĆcompressWith defaultCompressParams { compressLevel = BestCompression }8   !"#$%&'()*+BCDEFGHIJKLMNOPQRjklm8ljmkHIJKLMNOPQBCDEFGR   !" #$%&'()*+    !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKKLMNOPPQRSTUVWXYZ[\]^_`abcdefghai^jai^jai^jklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œršžŸ Ą˘Ł#zlib-0.6.3.0-4veMGbwysVJBmpcNTIjMFWCodec.Compression.Zlib.InternalCodec.Compression.Zlib.RawCodec.Compression.ZlibCodec.Compression.GZip'Codec.Compression.Zlib.ByteStringCompatCodec.Compression.Zlib.StreamData.ByteString ByteStringData.ByteString.LazyconcattoChunksCompressionStrategyDefaultStrategyFiltered HuffmanOnly MemoryLevelDefaultMemoryLevelMinMemoryLevelMaxMemoryLevel WindowBitsDefaultWindowBitsCompressionLevelDefaultCompression NoCompression BestSpeedBestCompressionMethodDeflatedFormatGZipZlibRaw GZipOrZlib gzipFormat zlibFormat rawFormatgzipOrZlibFormat deflateMethoddefaultCompression noCompression bestSpeedbestCompressioncompressionLeveldefaultWindowBits windowBitsdefaultMemoryLevelminMemoryLevelmaxMemoryLevel memoryLeveldefaultStrategyfilteredStrategyhuffmanOnlyStrategyCompressStreamCompressInputRequiredCompressOutputAvailableCompressStreamEndcompressSupplyInputcompressOutput compressNextDecompressErrorTruncatedInputDictionaryRequiredDictionaryMismatchDataFormatErrorDecompressStreamDecompressInputRequiredDecompressOutputAvailableDecompressStreamEndDecompressStreamErrordecompressSupplyInputdecompressOutputdecompressNextdecompressUnconsumedInputdecompressStreamErrorDecompressParamsdecompressWindowBitsdecompressBufferSizedecompressDictionarydecompressAllMembersCompressParams compressLevelcompressMethodcompressWindowBitscompressMemoryLevelcompressStrategycompressBufferSizecompressDictionarydefaultCompressParamsdefaultDecompressParamsfoldDecompressStreamfoldDecompressStreamWithInputfoldCompressStreamfoldCompressStreamWithInputcompress compressST compressIO decompress decompressST decompressIO$fExceptionDecompressError$fShowDecompressError$fEqDecompressError$fShowDecompressParams$fShowCompressParamsdecompressWith compressWithmkBSwithBS BufferErrorFinishinflateDictionaryHashdictionaryHashbytestring-0.10.10.0Data.ByteString.InternalzeroDictionaryHashfinaliseFlushNoFlush SyncFlush FullFlush ErrorCodeNeedDict FileError StreamError DataError MemoryError VersionError UnexpectedStatusOk StreamEndErrorStateStreampushInputBufferinputBufferEmptypopRemainingInputBufferpushOutputBufferpopOutputBufferoutputBufferBytesAvailableoutputBufferSpaceRemainingoutputBufferFulldeflate inflateResetdeflateSetDictionaryinflateSetDictionarymkState runStream unsafeLiftIOformatSupportsDictionary inflateInit deflateInitbaseGHC.ShowshowData.ByteString.Lazy.InternalControl.Monad.ST.Lazy.ImpSTghc-prim GHC.TypesIO