úÎTÒP­     portable (H98 + FFI) experimentalduncan.coutts@worc.ox.ac.ukJThe 9 parameter is a number between 0 and 4. 0 is silent, and 5 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 J presented with worst case, highly repetitive, input data. If compression M runs into difficulties caused by repetitive data, the library switches from I the standard sorting algorithm to a fallback algorithm. The fallback is M slower than the standard algorithm by perhaps a factor of three, but always 2 behaves reasonably, no matter how bad the input. Lower values of * reduce the amount of effort the standard M algorithm will expend before resorting to the fallback. You should set this F parameter carefully; too low, and many inputs will be handled by the F fallback algorithm and so compress rather slowly, too high, and your L average-to-worst case compression times can become very large. The default L value of 30 gives reasonable behaviour over a wide range of circumstances. E Note that the compressed output generated is the same regardless of 0 whether or not the fallback algorithm is used. 0Allowable values range from 1 to 250 inclusive. The default work factor is 30. JFor files compressed with the default 900k block size, decompression will L require about 3700k to decompress. To support decompression of any file in J less than 4Mb there is the option to decompress using approximately half I this amount of memory, about 2300k. Decompression speed is also halved, 6 so you should use this option only where necessary. .Use minimum memory dusing decompression. This 0 halves the memory needed but also halves the  decompression speed.  The default. KThe block size affects both the compression ratio achieved, and the amount 5 of memory needed for compression and decompression.   1 through   9& specify the block size to be 100,000 M bytes through 900,000 bytes respectively. The default is to use the maximum  block size. JLarger block sizes give rapidly diminishing marginal returns. Most of the J compression comes from the first two or three hundred k of block size, a K fact worth bearing in mind when using bzip2 on small machines. It is also M important to appreciate that the decompression memory requirement is set at / compression time by the choice of block size. J In general, try and use the largest block size memory constraints allow, 0 since that maximises the compression achieved. G Compression and decompression speed are virtually unaffected by block  size. IAnother significant point applies to files which fit in a single block -  that means most files you'1d encounter using a large block size. The amount K of real memory touched is proportional to the size of the file, since the L 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 M around 7600k of memory, but only touch 400k + 20000 * 8 = 560 kbytes of it. M 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.  9Compression of data was completed, or the logical stream * end was detected during decompression. !1The requested action was completed successfully. "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP)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. &  !"%&'()*+,-234>?@LMP&  ! !"%&'()*+,-234>?@LMPportable (H98 + FFI) provisionalduncan.coutts@worc.ox.ac.uk    portable (H98 + FFI) provisionalduncan.coutts@worc.ox.ac.uk1Decompress a stream of data in the bzip2 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. 1Compress a stream of data into the bzip2 format. KThis uses the default compression level which uses the largest compression 3 block size for the highest compression level. Use  to adjust  the compression block size. Like 7 but with an extra parameter to specify the block size  used for compression.   Q       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNO bzlib-0.4Codec.Compression.BZip.InternalCodec.Compression.BZipCodec.Compression.BZip.Stream VerbositySilent WorkFactorDefaultWorkFactor MemoryLevelMinMemoryLevelDefaultMemoryLevel BlockSizeDefaultBlockSizecompressDefaultdecompressDefault compressFulldecompressFull decompresscompress compressWith bzCompressEnd bzCompressbzCompressInitbzDecompressEnd bzDecompressbzDecompressInit StreamStateActionFinishFlushRunStatus StreamEndOkStreamBZunZpushInputBufferinputBufferEmptypushOutputBufferpopOutputBufferoutputBufferBytesAvailableoutputBufferSpaceRemainingoutputBufferFullreturnZthenZthenZ_failZrun unsafeLiftIOunsafeInterleavegetStreamStategetInBuf getOutBuf getOutOffset getOutAvailsetInBuf setOutBuf setOutOffset setOutAvailtracedumpconsistencyCheck isFatalError throwError withStreamPtr setInAvail getInAvail setInNext getInNext setOutFree getOutFree setOutNext getOutNextdecompressInit compressInit decompress_ compress_finalise