úÎz:t÷     (c) 2006-2008 Duncan Coutts BSD-styleduncan.coutts@worc.ox.ac.uk experimentalportable (H98 + FFI)None The € parameter is a number between 0 and 4. 0 is silent, and greater numbers give increasingly verbose monitoring/debugging output.!A specific level between 0 and 4.No output. This is the default.The ÿ™ parameter controls how the compression phase behaves when presented with worst case, highly repetitive, input data. If compression runs into difficulties caused by repetitive data, the library switches from the standard sorting algorithm to a fallback algorithm. The fallback is slower than the standard algorithm by perhaps a factor of three, but always behaves reasonably, no matter how bad the input.Lower values of ÿš reduce the amount of effort the standard algorithm will expend before resorting to the fallback. You should set this parameter carefully; too low, and many inputs will be handled by the fallback algorithm and so compress rather slowly, too high, and your average-to-worst case compression times can become very large. The default value of 30 gives reasonable behaviour over a wide range of circumstances.sNote that the compressed output generated is the same regardless of whether or not the fallback algorithm is used./Allowable values range from 1 to 250 inclusive.The default work factor is 30.ÿ^For files compressed with the default 900k block size, decompression will require about 3700k to decompress. To support decompression of any file in less than 4Mb there is the option to decompress using approximately half this amount of memory, about 2300k. Decompression speed is also halved, so you should use this option only where necessary. uUse minimum memory dusing decompression. This halves the memory needed but also halves the decompression speed. The default.The block size affects both the compression ratio achieved, and the amount of memory needed for compression and decompression. 1 through  9 specify the block size to be 100,000 bytes through 900,000 bytes respectively. The default is to use the maximum block size.ÿZLarger block sizes give rapidly diminishing marginal returns. Most of the compression comes from the first two or three hundred k of block size, a fact worth bearing in mind when using bzip2 on small machines. It is also important to appreciate that the decompression memory requirement is set at compression time by the choice of block size.xIn general, try and use the largest block size memory constraints allow, since that maximises the compression achieved.LCompression and decompression speed are virtually unaffected by block size.ÿ@Another significant point applies to files which fit in a single block - that means most files you'd encounter using a large block size. The amount of real memory touched is proportional to the size of the file, since the file is smaller than a block. For example, compressing a file 20,000 bytes long with the flag  9Ó will cause the compressor to allocate around 7600k of memory, but only touch 400k + 20000 * 8 = 560 kbytes of it. Similarly, the decompressor will allocate 3700k but only touch 100k + 20000 * 4 = 180 kbytes.&A specific block size between 1 and 9.+The default block size is also the maximum.bCompression of data was completed, or the logical stream end was detected during decompression.0The requested action was completed successfully.ÿ#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.T !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcd&"#$%&'012345678=>?IJK^_D !"%$#&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcd(c) 2006-2008 Duncan Coutts BSD-styleduncan@haskell.org provisionalportable (H98 + FFI)None  @The full set of parameters for decompression. The defaults are .The  ÿ 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 32ky. If your 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  W is if you know the exact size of the decompressed data and want to produce a strict 9. The compression and deccompression functions use lazy s but if you set the  ) correctly then you can generate a lazy = with exactly one chunk, which can be converted to a strict  in O(1) time using  . . >The full set of parameters for compression. The defaults are .The ð 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 16ky. If your extimate is wrong it does not matter too much, the default buffer size will be used for the remaining chunks.PThe default set of parameters for compression. This is typically used with the  compressWith. function with specific paramaters overridden.RThe default set of parameters for decompression. This is typically used with the  compressWith. function with specific paramaters overridden.e‰The default chunk sizes for the output of compression and decompression are 16k and 32k respectively (less a small accounting overhead).f‰The default chunk sizes for the output of compression and decompression are 16k and 32k respectively (less a small accounting overhead). ef     ef(c) 2006-2008 Duncan Coutts BSD-styleduncan@haskell.org provisionalportable (H98 + FFI)None 0Decompress a stream of data in the bzip2 format.zThere 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 permaturely)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.Like R but with the ability to specify various decompression parameters. Typical usage: .decompressWith defaultDecompressParams { ... }0Compress a stream of data into the bzip2 format.~This uses the default compression level which uses the largest compression block size for the highest compression level. Use ' to adjust the compression block size.Like H but with the ability to specify compression parameters. Typical usage: *compressWith defaultCompressParams { ... }5In particular you can set the compression block size: FcompressWith defaultCompressParams { compressBlockSize = BlockSize 1 }   g       !""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdef bzlib-0.5.0.5Codec.Compression.BZip.InternalCodec.Compression.BZipCodec.Compression.BZip.StreamData.ByteString ByteStringData.ByteString.LazyconcattoChunks WorkFactorDefaultWorkFactor MemoryLevelMinMemoryLevelDefaultMemoryLevel BlockSizeDefaultBlockSizeDecompressParamsdecompressMemoryLeveldecompressBufferSizeCompressParamscompressBlockSizecompressWorkFactorcompressBufferSizedefaultCompressParamsdefaultDecompressParamscompress decompressdecompressWith compressWith VerbositySilent StreamEndOkfinalise StreamStateActionFinishFlushRunStatusStreamBZunZ bzCompressEnd bzCompressbzCompressInitbzDecompressEnd bzDecompressbzDecompressInitpushInputBufferinputBufferEmptypushOutputBufferpopOutputBufferoutputBufferBytesAvailableoutputBufferSpaceRemainingoutputBufferFullreturnZthenZthenZ_failZrun unsafeLiftIOunsafeInterleavegetStreamStategetInBuf getOutBuf getOutOffset getOutAvailsetInBuf setOutBuf setOutOffset setOutAvailtracedumpconsistencyChecktoStatus failIfErrorgetErrorMessage fromAction fromBlockSizefromMemoryLevelfromWorkFactor fromVerbosity withStreamPtrwithStreamState setInAvail getInAvail setInNext getInNext setOutFree getOutFree setOutNext getOutNextdecompressInit compressInit decompress_ compress_ $fMonadStream$fApplicativeStream$fFunctorStreamdefaultCompressBufferSizedefaultDecompressBufferSize