úÎ¥&žj5      !"#$%&'()*+,-./01234portable (H98 + FFI) provisionalduncan@haskell.orgf56789:;<=BThe strategy parameter is used to tune the compression algorithm. FThe strategy parameter only affects the compression ratio but not the K correctness of the compressed output even if it is not set appropriately. Use $ to force Huffman encoding only (no  string match). Use # for data produced by a filter (or 6 predictor). Filtered data consists mostly of small 7 values with a somewhat random distribution. In this 8 case, the compression algorithm is tuned to compress : them better. The effect of Z_FILTERED is to force more 2 Huffman coding and less string matching; it is ! somewhat intermediate between  and  . Use the  for normal data. The 9 parameter specifies how much memory should be allocated K for the internal compression state. It is a tradoff between memory usage, J 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:  I 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 G halved (at the cost of somewhat degraded and slower compressionby) by  reducing the  windowBits and memLevel by one. -Decompression takes less memory, the default windowBits = 15 corresponds  to just 32Kb. "Use a specific level in the range 1..9 2Use maximum memory for optimal compression speed.  (Equivalent to  9) 1Use minimum memory. This is slow and reduces the % compression ratio. (Equivalent to  1) The default. (Equivalent to  8) IThis specifies the size of the compression window. Larger values of this H parameter result in better compression at the expense of higher memory  usage. JThe compression window size is the value of the the window bits raised to 3 the power 2. The window bits must be in the range 8..15 which corresponds N to compression window sizes of 256b to 32Kb. The default is 15 which is also  the maximum size. CThe total amount of memory used depends on the window bits and the   . See the  for the details. IThe compression level parameter controls the amount of compression. This N is a trade-off between the amount of compression and the time required to do  the compression. .A specific compression level between 1 and 9. 3The slowest compression method (best compression). 3The fastest compression method (less compression) #No compression, just a block copy. .The default compression level is 6 (that is, 3 biased towards higher compression at expense of  speed). The compression method 'Deflate'& is the only method supported in this 5 version of zlib. Indeed it is likely to be the only % method that ever will be supported. BThe format used for compression or decompression. There are three  variations. 6This is not a format as such. It enabled zlib or gzip ; decoding with automatic header detection. This only makes  sense for decompression. =The zlib format uses a minimal header with a checksum but no ? other meta-data. It is especially designed for use in network 5 protocols. The format is described in detail in RFC #1950   #http://www.ietf.org/rfc/rfc1950.txt @The gzip format uses a header with a checksum and some optional C meta-data about the compressed file. It is intended primarily for E compressing individual files but is also sometimes used for network B protocols such as HTTP. The format is described in detail in RFC  #1952  #http://www.ietf.org/rfc/rfc1952.txt >?@ABCD9No progress was possible or there was not enough room in  the output buffer when ? is used. Note that   BuferError is not fatal, and E can be called < again with more input and more output space to continue. FGHIJKLMNOPQRSETUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~)This never needs to be used as the stream's resources will be released J automatically when no longer needed, however this can be used to release J them early. Only use this when you can guarantee that the stream will no I longer be needed, for example if an error occurs or if the stream ends. €6 >?@ABCDFGHILMNOPQRSEXYZdefz{~6   >BA@??@ABCHGFDDFGHILMNOPQRSEXYZdefz{~portable (H98 + FFI) provisionalduncan@haskell.org?The full set of parameters for decompression. The defaults are  &. The ) is the size of the first output buffer, M containing the uncompressed data. If you know an exact or approximate upper L 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 M extimate 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  is if you K know the exact size of the decompressed data and want to produce a strict  Data.ByteString.ByteString/. The compression and deccompression functions  use lazy Data.ByteString.Lazy.ByteStrings but if you set the  ( correctly then you can generate a lazy  Data.ByteString.Lazy.ByteString& with exactly one chunk, which can be  converted to a strict Data.ByteString.ByteString in O(1) time using  Data.ByteString.concat . Data.ByteString.Lazy.toChunks. =The full set of parameters for compression. The defaults are  %. The $3 is the size of the first output buffer containing L the compressed data. If you know an approximate upper bound on the size of N the compressed data then setting this parameter can save memory. The default # compression output buffer size is 16k$. If your extimate is wrong it does M not matter too much, the default buffer size will be used for the remaining  chunks.  !"#$%KThe default set of parameters for compression. This is typically used with  the  compressWith/ function with specific paramaters overridden. &MThe default set of parameters for decompression. This is typically used with  the  compressWith/ function with specific paramaters overridden. ‚ƒHThe default chunk sizes for the output of compression and decompression B are 16k and 32k respectively (less a small accounting overhead). '()  !"#$%&'()' !"#$%(&    !"#$ !"#$%&'(portable (H98 + FFI) provisionalduncan@haskell.org)*+,&  !"#$%&)*+,&+),* !"#$%&   )*+,portable (H98 + FFI) provisionalduncan@haskell.org-0Decompress a stream of data in the zlib format. LThere are a number of errors that can occur. In each case an exception will / be thrown. The possible error conditions are: 7 if the stream does not start with a valid gzip header ' if the compressed stream is corrupted + if the compressed stream ends permaturely )Note that the decompression is performed lazily. Errors in the data stream J may not be detected until the end of the stream is demanded (since it is E only at the end that the final checksum can be checked). If this is H important to you, you must make sure to consume the whole decompressed 7 stream before doing any IO action that depends on it. .Like -7 but with the ability to specify various decompression  parameters. Typical usage: . decompressWith defaultCompressParams { ... } /0Compress a stream of data into the zlib format. GThis uses the default compression parameters. In partiular it uses the I default compression level which favours a higher compression ratio over J compression speed, though it does not use the maximum compression level. Use 06 to adjust the compression level or other compression  parameters. 0Like /5 but with the ability to specify various compression  parameters. Typical usage:  , compressWith defaultCompressParams { ... } 1In particular you can set the compression level: H compressWith defaultCompressParams { compressLevel = BestCompression } &  !"#$%&-./0&/-0. !"#$%&   -./0portable (H98 + FFI) provisionalduncan@haskell.org10Decompress a stream of data in the gzip format. LThere are a number of errors that can occur. In each case an exception will / be thrown. The possible error conditions are: 7 if the stream does not start with a valid gzip header ' if the compressed stream is corrupted + if the compressed stream ends permaturely )Note that the decompression is performed lazily. Errors in the data stream J may not be detected until the end of the stream is demanded (since it is E only at the end that the final checksum can be checked). If this is H important to you, you must make sure to consume the whole decompressed 7 stream before doing any IO action that depends on it. 2Like 17 but with the ability to specify various decompression  parameters. Typical usage: . decompressWith defaultCompressParams { ... } 30Compress a stream of data into the gzip format. GThis uses the default compression parameters. In partiular it uses the I default compression level which favours a higher compression ratio over J compression speed, though it does not use the maximum compression level. Use 46 to adjust the compression level or other compression  parameters. 4Like 35 but with the ability to specify various compression  parameters. Typical usage:  , compressWith defaultCompressParams { ... } 1In particular you can set the compression level: H compressWith defaultCompressParams { compressLevel = BestCompression } &  !"#$%&1234&3142 !"#$%&   1234„       !"#$%&'())*(+)*(+)*(+,-./01233456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz zlib-0.5.0.0Codec.Compression.Zlib.InternalCodec.Compression.Zlib.RawCodec.Compression.ZlibCodec.Compression.GZipCodec.Compression.Zlib.StreamCompressionStrategy HuffmanOnlyFilteredDefaultStrategy MemoryLevelMaxMemoryLevelMinMemoryLevelDefaultMemoryLevel WindowBitsDefaultWindowBitsCompressionLevelBestCompression BestSpeed NoCompressionDefaultCompressionMethodDeflatedFormat GZipOrZlibRawZlibGZipDecompressParamsdecompressWindowBitsdecompressBufferSizeCompressParams compressLevelcompressMethodcompressWindowBitscompressMemoryLevelcompressStrategycompressBufferSizedefaultCompressParamsdefaultDecompressParamscompress decompressdecompressWith compressWith c_zlibVersion c_deflateEnd c_deflatec_deflateInit2_ c_inflateEnd c_inflatec_inflateInit2_ StreamStateFlushFinish FullFlush SyncFlushNoFlushStatus BufferErrorinflateNeedDict StreamEndOkStreamZunZpushInputBufferinputBufferEmptypushOutputBufferpopOutputBufferoutputBufferBytesAvailableoutputBufferSpaceRemainingoutputBufferFulldeflatereturnZthenZthenZ_failZrun unsafeLiftIOunsafeInterleavegetStreamStategetInBuf getOutBuf getOutOffset getOutAvailsetInBuf setOutBuf setOutOffset setOutAvailtracedumpconsistencyChecktoStatus failIfErrorgetErrorMessage fromFlush fromMethodfromCompressionLevel windowBitsfromMemoryLevelfromCompressionStrategy withStreamPtrwithStreamState setInAvail getInAvail setInNext getInNext setOutFree getOutFree setOutNext getOutNext inflateInit deflateInitinflate_deflate_finalisecheckFormatSupportedc_inflateInit2c_deflateInit2defaultCompressBufferSizedefaultDecompressBufferSize