]> git.pld-linux.org Git - packages/bzip2.git/blob - bzip2-libtoolizeautoconf.patch
- changed url, add todo
[packages/bzip2.git] / bzip2-libtoolizeautoconf.patch
1 diff -Nru bzip2-1.0.2/AUTHORS bzip2-1.0.2.new/AUTHORS
2 --- bzip2-1.0.2/AUTHORS Thu Jan  1 01:00:00 1970
3 +++ bzip2-1.0.2.new/AUTHORS     Fri Feb  1 04:18:59 2002
4 @@ -0,0 +1 @@
5 +Julian Seward <jseward@acm.org>
6 diff -Nru bzip2-1.0.2/CHANGES bzip2-1.0.2.new/CHANGES
7 --- bzip2-1.0.2/CHANGES Sat Jan 26 01:02:57 2002
8 +++ bzip2-1.0.2.new/CHANGES     Thu Jan  1 01:00:00 1970
9 @@ -1,253 +0,0 @@
10 -
11 -
12 -0.9.0
13 -~~~~~
14 -First version.
15 -
16 -
17 -0.9.0a
18 -~~~~~~
19 -Removed 'ranlib' from Makefile, since most modern Unix-es 
20 -don't need it, or even know about it.
21 -
22 -
23 -0.9.0b
24 -~~~~~~
25 -Fixed a problem with error reporting in bzip2.c.  This does not effect
26 -the library in any way.  Problem is: versions 0.9.0 and 0.9.0a (of the
27 -program proper) compress and decompress correctly, but give misleading
28 -error messages (internal panics) when an I/O error occurs, instead of
29 -reporting the problem correctly.  This shouldn't give any data loss
30 -(as far as I can see), but is confusing.
31 -
32 -Made the inline declarations disappear for non-GCC compilers.
33 -
34 -
35 -0.9.0c
36 -~~~~~~
37 -Fixed some problems in the library pertaining to some boundary cases.
38 -This makes the library behave more correctly in those situations.  The
39 -fixes apply only to features (calls and parameters) not used by
40 -bzip2.c, so the non-fixedness of them in previous versions has no
41 -effect on reliability of bzip2.c.
42 -
43 -In bzlib.c:
44 -   * made zero-length BZ_FLUSH work correctly in bzCompress().
45 -   * fixed bzWrite/bzRead to ignore zero-length requests.
46 -   * fixed bzread to correctly handle read requests after EOF.
47 -   * wrong parameter order in call to bzDecompressInit in
48 -     bzBuffToBuffDecompress.  Fixed.
49 -
50 -In compress.c:
51 -   * changed setting of nGroups in sendMTFValues() so as to 
52 -     do a bit better on small files.  This _does_ effect
53 -     bzip2.c.
54 -
55 -
56 -0.9.5a
57 -~~~~~~
58 -Major change: add a fallback sorting algorithm (blocksort.c)
59 -to give reasonable behaviour even for very repetitive inputs.
60 -Nuked --repetitive-best and --repetitive-fast since they are
61 -no longer useful.
62 -
63 -Minor changes: mostly a whole bunch of small changes/
64 -bugfixes in the driver (bzip2.c).  Changes pertaining to the
65 -user interface are:
66 -
67 -   allow decompression of symlink'd files to stdout
68 -   decompress/test files even without .bz2 extension
69 -   give more accurate error messages for I/O errors
70 -   when compressing/decompressing to stdout, don't catch control-C
71 -   read flags from BZIP2 and BZIP environment variables
72 -   decline to break hard links to a file unless forced with -f
73 -   allow -c flag even with no filenames
74 -   preserve file ownerships as far as possible
75 -   make -s -1 give the expected block size (100k)
76 -   add a flag -q --quiet to suppress nonessential warnings
77 -   stop decoding flags after --, so files beginning in - can be handled
78 -   resolved inconsistent naming: bzcat or bz2cat ?
79 -   bzip2 --help now returns 0
80 -
81 -Programming-level changes are:
82 -
83 -   fixed syntax error in GET_LL4 for Borland C++ 5.02
84 -   let bzBuffToBuffDecompress return BZ_DATA_ERROR{_MAGIC}
85 -   fix overshoot of mode-string end in bzopen_or_bzdopen
86 -   wrapped bzlib.h in #ifdef __cplusplus ... extern "C" { ... }
87 -   close file handles under all error conditions
88 -   added minor mods so it compiles with DJGPP out of the box
89 -   fixed Makefile so it doesn't give problems with BSD make
90 -   fix uninitialised memory reads in dlltest.c
91 -
92 -0.9.5b
93 -~~~~~~
94 -Open stdin/stdout in binary mode for DJGPP.
95 -
96 -0.9.5c
97 -~~~~~~
98 -Changed BZ_N_OVERSHOOT to be ... + 2 instead of ... + 1.  The + 1
99 -version could cause the sorted order to be wrong in some extremely
100 -obscure cases.  Also changed setting of quadrant in blocksort.c.
101 -
102 -0.9.5d
103 -~~~~~~
104 -The only functional change is to make bzlibVersion() in the library
105 -return the correct string.  This has no effect whatsoever on the
106 -functioning of the bzip2 program or library.  Added a couple of casts
107 -so the library compiles without warnings at level 3 in MS Visual
108 -Studio 6.0.  Included a Y2K statement in the file Y2K_INFO.  All other
109 -changes are minor documentation changes.
110 -
111 -1.0
112 -~~~
113 -Several minor bugfixes and enhancements:
114 -
115 -* Large file support.  The library uses 64-bit counters to
116 -  count the volume of data passing through it.  bzip2.c 
117 -  is now compiled with -D_FILE_OFFSET_BITS=64 to get large
118 -  file support from the C library.  -v correctly prints out
119 -  file sizes greater than 4 gigabytes.  All these changes have
120 -  been made without assuming a 64-bit platform or a C compiler
121 -  which supports 64-bit ints, so, except for the C library
122 -  aspect, they are fully portable.
123 -
124 -* Decompression robustness.  The library/program should be
125 -  robust to any corruption of compressed data, detecting and
126 -  handling _all_ corruption, instead of merely relying on
127 -  the CRCs.  What this means is that the program should 
128 -  never crash, given corrupted data, and the library should
129 -  always return BZ_DATA_ERROR.
130 -
131 -* Fixed an obscure race-condition bug only ever observed on
132 -  Solaris, in which, if you were very unlucky and issued
133 -  control-C at exactly the wrong time, both input and output
134 -  files would be deleted.
135 -
136 -* Don't run out of file handles on test/decompression when
137 -  large numbers of files have invalid magic numbers.
138 -
139 -* Avoid library namespace pollution.  Prefix all exported 
140 -  symbols with BZ2_.
141 -
142 -* Minor sorting enhancements from my DCC2000 paper.
143 -
144 -* Advance the version number to 1.0, so as to counteract the
145 -  (false-in-this-case) impression some people have that programs 
146 -  with version numbers less than 1.0 are in some way, experimental,
147 -  pre-release versions.
148 -
149 -* Create an initial Makefile-libbz2_so to build a shared library.
150 -  Yes, I know I should really use libtool et al ...
151 -
152 -* Make the program exit with 2 instead of 0 when decompression
153 -  fails due to a bad magic number (ie, an invalid bzip2 header).
154 -  Also exit with 1 (as the manual claims :-) whenever a diagnostic
155 -  message would have been printed AND the corresponding operation 
156 -  is aborted, for example
157 -     bzip2: Output file xx already exists.
158 -  When a diagnostic message is printed but the operation is not 
159 -  aborted, for example
160 -     bzip2: Can't guess original name for wurble -- using wurble.out
161 -  then the exit value 0 is returned, unless some other problem is
162 -  also detected.
163 -
164 -  I think it corresponds more closely to what the manual claims now.
165 -
166 -
167 -1.0.1
168 -~~~~~
169 -* Modified dlltest.c so it uses the new BZ2_ naming scheme.
170 -* Modified makefile-msc to fix minor build probs on Win2k.
171 -* Updated README.COMPILATION.PROBLEMS.
172 -
173 -There are no functionality changes or bug fixes relative to version
174 -1.0.0.  This is just a documentation update + a fix for minor Win32
175 -build problems.  For almost everyone, upgrading from 1.0.0 to 1.0.1 is
176 -utterly pointless.  Don't bother.
177 -
178 -
179 -1.0.2
180 -~~~~~
181 -A bug fix release, addressing various minor issues which have appeared
182 -in the 18 or so months since 1.0.1 was released.  Most of the fixes
183 -are to do with file-handling or documentation bugs.  To the best of my
184 -knowledge, there have been no data-loss-causing bugs reported in the
185 -compression/decompression engine of 1.0.0 or 1.0.1.
186 -
187 -Note that this release does not improve the rather crude build system
188 -for Unix platforms.  The general plan here is to autoconfiscate/
189 -libtoolise 1.0.2 soon after release, and release the result as 1.1.0
190 -or perhaps 1.2.0.  That, however, is still just a plan at this point.
191 -
192 -Here are the changes in 1.0.2.  Bug-reporters and/or patch-senders in
193 -parentheses.
194 -
195 -* Fix an infinite segfault loop in 1.0.1 when a directory is
196 -  encountered in -f (force) mode.
197 -     (Trond Eivind Glomsrod, Nicholas Nethercote, Volker Schmidt)
198 -
199 -* Avoid double fclose() of output file on certain I/O error paths.
200 -     (Solar Designer)
201 -
202 -* Don't fail with internal error 1007 when fed a long stream (> 48MB)
203 -  of byte 251.  Also print useful message suggesting that 1007s may be
204 -  caused by bad memory.
205 -     (noticed by Juan Pedro Vallejo, fixed by me)
206 -
207 -* Fix uninitialised variable silly bug in demo prog dlltest.c.
208 -     (Jorj Bauer)
209 -
210 -* Remove 512-MB limitation on recovered file size for bzip2recover
211 -  on selected platforms which support 64-bit ints.  At the moment
212 -  all GCC supported platforms, and Win32.
213 -     (me, Alson van der Meulen)
214 -
215 -* Hard-code header byte values, to give correct operation on platforms
216 -  using EBCDIC as their native character set (IBM's OS/390).
217 -     (Leland Lucius)
218 -
219 -* Copy file access times correctly.
220 -     (Marty Leisner)
221 -
222 -* Add distclean and check targets to Makefile.
223 -     (Michael Carmack)
224 -
225 -* Parameterise use of ar and ranlib in Makefile.  Also add $(LDFLAGS).
226 -     (Rich Ireland, Bo Thorsen)
227 -
228 -* Pass -p (create parent dirs as needed) to mkdir during make install.
229 -     (Jeremy Fusco)
230 -
231 -* Dereference symlinks when copying file permissions in -f mode.
232 -     (Volker Schmidt)
233 -
234 -* Majorly simplify implementation of uInt64_qrm10.
235 -     (Bo Lindbergh)
236 -
237 -* Check the input file still exists before deleting the output one,
238 -  when aborting in cleanUpAndFail().
239 -     (Joerg Prante, Robert Linden, Matthias Krings)
240 -
241 -Also a bunch of patches courtesy of Philippe Troin, the Debian maintainer
242 -of bzip2:
243 -
244 -* Wrapper scripts (with manpages): bzdiff, bzgrep, bzmore.
245 -
246 -* Spelling changes and minor enhancements in bzip2.1.
247 -
248 -* Avoid race condition between creating the output file and setting its
249 -  interim permissions safely, by using fopen_output_safely().
250 -  No changes to bzip2recover since there is no issue with file
251 -  permissions there.
252 -
253 -* do not print senseless report with -v when compressing an empty
254 -  file.
255 -
256 -* bzcat -f works on non-bzip2 files.
257 -
258 -* do not try to escape shell meta-characters on unix (the shell takes
259 -  care of these).
260 -
261 -* added --fast and --best aliases for -1 -9 for gzip compatibility.
262 -
263 diff -Nru bzip2-1.0.2/COPYING bzip2-1.0.2.new/COPYING
264 --- bzip2-1.0.2/COPYING Thu Jan  1 01:00:00 1970
265 +++ bzip2-1.0.2.new/COPYING     Wed Jan  2 05:12:07 2002
266 @@ -0,0 +1,39 @@
267 +
268 +This program, "bzip2" and associated library "libbzip2", are
269 +copyright (C) 1996-2002 Julian R Seward.  All rights reserved.
270 +
271 +Redistribution and use in source and binary forms, with or without
272 +modification, are permitted provided that the following conditions
273 +are met:
274 +
275 +1. Redistributions of source code must retain the above copyright
276 +   notice, this list of conditions and the following disclaimer.
277 +
278 +2. The origin of this software must not be misrepresented; you must 
279 +   not claim that you wrote the original software.  If you use this 
280 +   software in a product, an acknowledgment in the product 
281 +   documentation would be appreciated but is not required.
282 +
283 +3. Altered source versions must be plainly marked as such, and must
284 +   not be misrepresented as being the original software.
285 +
286 +4. The name of the author may not be used to endorse or promote 
287 +   products derived from this software without specific prior written 
288 +   permission.
289 +
290 +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
291 +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
292 +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
293 +ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
294 +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
295 +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
296 +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
297 +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
298 +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
299 +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
300 +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
301 +
302 +Julian Seward, Cambridge, UK.
303 +jseward@acm.org
304 +bzip2/libbzip2 version 1.0.2 of 30 December 2001
305 +
306 diff -Nru bzip2-1.0.2/ChangeLog bzip2-1.0.2.new/ChangeLog
307 --- bzip2-1.0.2/ChangeLog       Thu Jan  1 01:00:00 1970
308 +++ bzip2-1.0.2.new/ChangeLog   Fri Feb  1 04:19:04 2002
309 @@ -0,0 +1 @@
310 +
311 diff -Nru bzip2-1.0.2/INSTALL bzip2-1.0.2.new/INSTALL
312 --- bzip2-1.0.2/INSTALL Thu Jan  1 01:00:00 1970
313 +++ bzip2-1.0.2.new/INSTALL     Fri Feb  1 04:19:04 2002
314 @@ -0,0 +1,182 @@
315 +Basic Installation
316 +==================
317 +
318 +   These are generic installation instructions.
319 +
320 +   The `configure' shell script attempts to guess correct values for
321 +various system-dependent variables used during compilation.  It uses
322 +those values to create a `Makefile' in each directory of the package.
323 +It may also create one or more `.h' files containing system-dependent
324 +definitions.  Finally, it creates a shell script `config.status' that
325 +you can run in the future to recreate the current configuration, a file
326 +`config.cache' that saves the results of its tests to speed up
327 +reconfiguring, and a file `config.log' containing compiler output
328 +(useful mainly for debugging `configure').
329 +
330 +   If you need to do unusual things to compile the package, please try
331 +to figure out how `configure' could check whether to do them, and mail
332 +diffs or instructions to the address given in the `README' so they can
333 +be considered for the next release.  If at some point `config.cache'
334 +contains results you don't want to keep, you may remove or edit it.
335 +
336 +   The file `configure.in' is used to create `configure' by a program
337 +called `autoconf'.  You only need `configure.in' if you want to change
338 +it or regenerate `configure' using a newer version of `autoconf'.
339 +
340 +The simplest way to compile this package is:
341 +
342 +  1. `cd' to the directory containing the package's source code and type
343 +     `./configure' to configure the package for your system.  If you're
344 +     using `csh' on an old version of System V, you might need to type
345 +     `sh ./configure' instead to prevent `csh' from trying to execute
346 +     `configure' itself.
347 +
348 +     Running `configure' takes awhile.  While running, it prints some
349 +     messages telling which features it is checking for.
350 +
351 +  2. Type `make' to compile the package.
352 +
353 +  3. Optionally, type `make check' to run any self-tests that come with
354 +     the package.
355 +
356 +  4. Type `make install' to install the programs and any data files and
357 +     documentation.
358 +
359 +  5. You can remove the program binaries and object files from the
360 +     source code directory by typing `make clean'.  To also remove the
361 +     files that `configure' created (so you can compile the package for
362 +     a different kind of computer), type `make distclean'.  There is
363 +     also a `make maintainer-clean' target, but that is intended mainly
364 +     for the package's developers.  If you use it, you may have to get
365 +     all sorts of other programs in order to regenerate files that came
366 +     with the distribution.
367 +
368 +Compilers and Options
369 +=====================
370 +
371 +   Some systems require unusual options for compilation or linking that
372 +the `configure' script does not know about.  You can give `configure'
373 +initial values for variables by setting them in the environment.  Using
374 +a Bourne-compatible shell, you can do that on the command line like
375 +this:
376 +     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
377 +
378 +Or on systems that have the `env' program, you can do it like this:
379 +     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
380 +
381 +Compiling For Multiple Architectures
382 +====================================
383 +
384 +   You can compile the package for more than one kind of computer at the
385 +same time, by placing the object files for each architecture in their
386 +own directory.  To do this, you must use a version of `make' that
387 +supports the `VPATH' variable, such as GNU `make'.  `cd' to the
388 +directory where you want the object files and executables to go and run
389 +the `configure' script.  `configure' automatically checks for the
390 +source code in the directory that `configure' is in and in `..'.
391 +
392 +   If you have to use a `make' that does not supports the `VPATH'
393 +variable, you have to compile the package for one architecture at a time
394 +in the source code directory.  After you have installed the package for
395 +one architecture, use `make distclean' before reconfiguring for another
396 +architecture.
397 +
398 +Installation Names
399 +==================
400 +
401 +   By default, `make install' will install the package's files in
402 +`/usr/local/bin', `/usr/local/man', etc.  You can specify an
403 +installation prefix other than `/usr/local' by giving `configure' the
404 +option `--prefix=PATH'.
405 +
406 +   You can specify separate installation prefixes for
407 +architecture-specific files and architecture-independent files.  If you
408 +give `configure' the option `--exec-prefix=PATH', the package will use
409 +PATH as the prefix for installing programs and libraries.
410 +Documentation and other data files will still use the regular prefix.
411 +
412 +   In addition, if you use an unusual directory layout you can give
413 +options like `--bindir=PATH' to specify different values for particular
414 +kinds of files.  Run `configure --help' for a list of the directories
415 +you can set and what kinds of files go in them.
416 +
417 +   If the package supports it, you can cause programs to be installed
418 +with an extra prefix or suffix on their names by giving `configure' the
419 +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
420 +
421 +Optional Features
422 +=================
423 +
424 +   Some packages pay attention to `--enable-FEATURE' options to
425 +`configure', where FEATURE indicates an optional part of the package.
426 +They may also pay attention to `--with-PACKAGE' options, where PACKAGE
427 +is something like `gnu-as' or `x' (for the X Window System).  The
428 +`README' should mention any `--enable-' and `--with-' options that the
429 +package recognizes.
430 +
431 +   For packages that use the X Window System, `configure' can usually
432 +find the X include and library files automatically, but if it doesn't,
433 +you can use the `configure' options `--x-includes=DIR' and
434 +`--x-libraries=DIR' to specify their locations.
435 +
436 +Specifying the System Type
437 +==========================
438 +
439 +   There may be some features `configure' can not figure out
440 +automatically, but needs to determine by the type of host the package
441 +will run on.  Usually `configure' can figure that out, but if it prints
442 +a message saying it can not guess the host type, give it the
443 +`--host=TYPE' option.  TYPE can either be a short name for the system
444 +type, such as `sun4', or a canonical name with three fields:
445 +     CPU-COMPANY-SYSTEM
446 +
447 +See the file `config.sub' for the possible values of each field.  If
448 +`config.sub' isn't included in this package, then this package doesn't
449 +need to know the host type.
450 +
451 +   If you are building compiler tools for cross-compiling, you can also
452 +use the `--target=TYPE' option to select the type of system they will
453 +produce code for and the `--build=TYPE' option to select the type of
454 +system on which you are compiling the package.
455 +
456 +Sharing Defaults
457 +================
458 +
459 +   If you want to set default values for `configure' scripts to share,
460 +you can create a site shell script called `config.site' that gives
461 +default values for variables like `CC', `cache_file', and `prefix'.
462 +`configure' looks for `PREFIX/share/config.site' if it exists, then
463 +`PREFIX/etc/config.site' if it exists.  Or, you can set the
464 +`CONFIG_SITE' environment variable to the location of the site script.
465 +A warning: not all `configure' scripts look for a site script.
466 +
467 +Operation Controls
468 +==================
469 +
470 +   `configure' recognizes the following options to control how it
471 +operates.
472 +
473 +`--cache-file=FILE'
474 +     Use and save the results of the tests in FILE instead of
475 +     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
476 +     debugging `configure'.
477 +
478 +`--help'
479 +     Print a summary of the options to `configure', and exit.
480 +
481 +`--quiet'
482 +`--silent'
483 +`-q'
484 +     Do not print messages saying which checks are being made.  To
485 +     suppress all normal output, redirect it to `/dev/null' (any error
486 +     messages will still be shown).
487 +
488 +`--srcdir=DIR'
489 +     Look for the package's source code in directory DIR.  Usually
490 +     `configure' can determine that directory automatically.
491 +
492 +`--version'
493 +     Print the version of Autoconf used to generate the `configure'
494 +     script, and exit.
495 +
496 +`configure' also accepts some other, not widely useful, options.
497 diff -Nru bzip2-1.0.2/LICENSE bzip2-1.0.2.new/LICENSE
498 --- bzip2-1.0.2/LICENSE Wed Jan  2 05:12:07 2002
499 +++ bzip2-1.0.2.new/LICENSE     Thu Jan  1 01:00:00 1970
500 @@ -1,39 +0,0 @@
501 -
502 -This program, "bzip2" and associated library "libbzip2", are
503 -copyright (C) 1996-2002 Julian R Seward.  All rights reserved.
504 -
505 -Redistribution and use in source and binary forms, with or without
506 -modification, are permitted provided that the following conditions
507 -are met:
508 -
509 -1. Redistributions of source code must retain the above copyright
510 -   notice, this list of conditions and the following disclaimer.
511 -
512 -2. The origin of this software must not be misrepresented; you must 
513 -   not claim that you wrote the original software.  If you use this 
514 -   software in a product, an acknowledgment in the product 
515 -   documentation would be appreciated but is not required.
516 -
517 -3. Altered source versions must be plainly marked as such, and must
518 -   not be misrepresented as being the original software.
519 -
520 -4. The name of the author may not be used to endorse or promote 
521 -   products derived from this software without specific prior written 
522 -   permission.
523 -
524 -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
525 -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
526 -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
527 -ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
528 -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
529 -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
530 -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
531 -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
532 -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
533 -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
534 -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
535 -
536 -Julian Seward, Cambridge, UK.
537 -jseward@acm.org
538 -bzip2/libbzip2 version 1.0.2 of 30 December 2001
539 -
540 diff -Nru bzip2-1.0.2/Makefile-libbz2_so bzip2-1.0.2.new/Makefile-libbz2_so
541 --- bzip2-1.0.2/Makefile-libbz2_so      Sun Dec 30 03:15:59 2001
542 +++ bzip2-1.0.2.new/Makefile-libbz2_so  Thu Jan  1 01:00:00 1970
543 @@ -1,44 +0,0 @@
544 -
545 -# This Makefile builds a shared version of the library, 
546 -# libbz2.so.1.0.2, with soname libbz2.so.1.0,
547 -# at least on x86-Linux (RedHat 7.2), 
548 -# with gcc-2.96 20000731 (Red Hat Linux 7.1 2.96-98).  
549 -# Please see the README file for some 
550 -# important info about building the library like this.
551 -
552 -SHELL=/bin/sh
553 -CC=gcc
554 -BIGFILES=-D_FILE_OFFSET_BITS=64
555 -CFLAGS=-fpic -fPIC -Wall -Winline -O2 -fomit-frame-pointer -fno-strength-reduce $(BIGFILES)
556 -
557 -OBJS= blocksort.o  \
558 -      huffman.o    \
559 -      crctable.o   \
560 -      randtable.o  \
561 -      compress.o   \
562 -      decompress.o \
563 -      bzlib.o
564 -
565 -all: $(OBJS)
566 -       $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.2 $(OBJS)
567 -       $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.2
568 -       rm -f libbz2.so.1.0
569 -       ln -s libbz2.so.1.0.2 libbz2.so.1.0
570 -
571 -clean: 
572 -       rm -f $(OBJS) bzip2.o libbz2.so.1.0.2 libbz2.so.1.0 bzip2-shared
573 -
574 -blocksort.o: blocksort.c
575 -       $(CC) $(CFLAGS) -c blocksort.c
576 -huffman.o: huffman.c
577 -       $(CC) $(CFLAGS) -c huffman.c
578 -crctable.o: crctable.c
579 -       $(CC) $(CFLAGS) -c crctable.c
580 -randtable.o: randtable.c
581 -       $(CC) $(CFLAGS) -c randtable.c
582 -compress.o: compress.c
583 -       $(CC) $(CFLAGS) -c compress.c
584 -decompress.o: decompress.c
585 -       $(CC) $(CFLAGS) -c decompress.c
586 -bzlib.o: bzlib.c
587 -       $(CC) $(CFLAGS) -c bzlib.c
588 diff -Nru bzip2-1.0.2/Makefile.am bzip2-1.0.2.new/Makefile.am
589 --- bzip2-1.0.2/Makefile.am     Thu Jan  1 01:00:00 1970
590 +++ bzip2-1.0.2.new/Makefile.am Fri Feb  1 04:19:09 2002
591 @@ -0,0 +1,31 @@
592 +SUBDIRS                = doc
593 +
594 +bin_PROGRAMS   = bzip2 bzip2recover 
595 +bzip2_SOURCES  = bzip2.c
596 +
597 +bzip2_LDADD            =  libbz2.la
598 +bzip2recover_SOURCES   = bzip2recover.c
599 +lib_LTLIBRARIES                = libbz2.la
600 +libbz2_la_SOURCES = \
601 +       blocksort.c \
602 +       huffman.c \
603 +       crctable.c \
604 +       randtable.c \
605 +       compress.c \
606 +       decompress.c \
607 +       bzlib.c \
608 +       bzlib.h \
609 +       bzlib_private.h
610 +
611 +libbz2_la_LDFLAGS      = -version-info 1:0:0
612 +include_HEADERS                = bzlib.h bzlib_private.h
613 +
614 +bin_SCRIPTS            = bzless bzgrep
615 +
616 +EXTRA_DIST = README README.COMPILATION.PROBLEMS \
617 +       Y2K_INFO libbz2.def libbz2.dsp \
618 +       sample1.bz2 sample1.ref sample2.bz2 sample2.ref sample3.bz2 sample3.ref
619 +
620 +install-exec-hook:
621 +       $(LN_S) -f bzip2 $(DESTDIR)$(bindir)/bunzip2
622 +       $(LN_S) -f bzip2 $(DESTDIR)$(bindir)/bzcat
623 diff -Nru bzip2-1.0.2/NEWS bzip2-1.0.2.new/NEWS
624 --- bzip2-1.0.2/NEWS    Thu Jan  1 01:00:00 1970
625 +++ bzip2-1.0.2.new/NEWS        Sat Jan 26 01:02:57 2002
626 @@ -0,0 +1,253 @@
627 +
628 +
629 +0.9.0
630 +~~~~~
631 +First version.
632 +
633 +
634 +0.9.0a
635 +~~~~~~
636 +Removed 'ranlib' from Makefile, since most modern Unix-es 
637 +don't need it, or even know about it.
638 +
639 +
640 +0.9.0b
641 +~~~~~~
642 +Fixed a problem with error reporting in bzip2.c.  This does not effect
643 +the library in any way.  Problem is: versions 0.9.0 and 0.9.0a (of the
644 +program proper) compress and decompress correctly, but give misleading
645 +error messages (internal panics) when an I/O error occurs, instead of
646 +reporting the problem correctly.  This shouldn't give any data loss
647 +(as far as I can see), but is confusing.
648 +
649 +Made the inline declarations disappear for non-GCC compilers.
650 +
651 +
652 +0.9.0c
653 +~~~~~~
654 +Fixed some problems in the library pertaining to some boundary cases.
655 +This makes the library behave more correctly in those situations.  The
656 +fixes apply only to features (calls and parameters) not used by
657 +bzip2.c, so the non-fixedness of them in previous versions has no
658 +effect on reliability of bzip2.c.
659 +
660 +In bzlib.c:
661 +   * made zero-length BZ_FLUSH work correctly in bzCompress().
662 +   * fixed bzWrite/bzRead to ignore zero-length requests.
663 +   * fixed bzread to correctly handle read requests after EOF.
664 +   * wrong parameter order in call to bzDecompressInit in
665 +     bzBuffToBuffDecompress.  Fixed.
666 +
667 +In compress.c:
668 +   * changed setting of nGroups in sendMTFValues() so as to 
669 +     do a bit better on small files.  This _does_ effect
670 +     bzip2.c.
671 +
672 +
673 +0.9.5a
674 +~~~~~~
675 +Major change: add a fallback sorting algorithm (blocksort.c)
676 +to give reasonable behaviour even for very repetitive inputs.
677 +Nuked --repetitive-best and --repetitive-fast since they are
678 +no longer useful.
679 +
680 +Minor changes: mostly a whole bunch of small changes/
681 +bugfixes in the driver (bzip2.c).  Changes pertaining to the
682 +user interface are:
683 +
684 +   allow decompression of symlink'd files to stdout
685 +   decompress/test files even without .bz2 extension
686 +   give more accurate error messages for I/O errors
687 +   when compressing/decompressing to stdout, don't catch control-C
688 +   read flags from BZIP2 and BZIP environment variables
689 +   decline to break hard links to a file unless forced with -f
690 +   allow -c flag even with no filenames
691 +   preserve file ownerships as far as possible
692 +   make -s -1 give the expected block size (100k)
693 +   add a flag -q --quiet to suppress nonessential warnings
694 +   stop decoding flags after --, so files beginning in - can be handled
695 +   resolved inconsistent naming: bzcat or bz2cat ?
696 +   bzip2 --help now returns 0
697 +
698 +Programming-level changes are:
699 +
700 +   fixed syntax error in GET_LL4 for Borland C++ 5.02
701 +   let bzBuffToBuffDecompress return BZ_DATA_ERROR{_MAGIC}
702 +   fix overshoot of mode-string end in bzopen_or_bzdopen
703 +   wrapped bzlib.h in #ifdef __cplusplus ... extern "C" { ... }
704 +   close file handles under all error conditions
705 +   added minor mods so it compiles with DJGPP out of the box
706 +   fixed Makefile so it doesn't give problems with BSD make
707 +   fix uninitialised memory reads in dlltest.c
708 +
709 +0.9.5b
710 +~~~~~~
711 +Open stdin/stdout in binary mode for DJGPP.
712 +
713 +0.9.5c
714 +~~~~~~
715 +Changed BZ_N_OVERSHOOT to be ... + 2 instead of ... + 1.  The + 1
716 +version could cause the sorted order to be wrong in some extremely
717 +obscure cases.  Also changed setting of quadrant in blocksort.c.
718 +
719 +0.9.5d
720 +~~~~~~
721 +The only functional change is to make bzlibVersion() in the library
722 +return the correct string.  This has no effect whatsoever on the
723 +functioning of the bzip2 program or library.  Added a couple of casts
724 +so the library compiles without warnings at level 3 in MS Visual
725 +Studio 6.0.  Included a Y2K statement in the file Y2K_INFO.  All other
726 +changes are minor documentation changes.
727 +
728 +1.0
729 +~~~
730 +Several minor bugfixes and enhancements:
731 +
732 +* Large file support.  The library uses 64-bit counters to
733 +  count the volume of data passing through it.  bzip2.c 
734 +  is now compiled with -D_FILE_OFFSET_BITS=64 to get large
735 +  file support from the C library.  -v correctly prints out
736 +  file sizes greater than 4 gigabytes.  All these changes have
737 +  been made without assuming a 64-bit platform or a C compiler
738 +  which supports 64-bit ints, so, except for the C library
739 +  aspect, they are fully portable.
740 +
741 +* Decompression robustness.  The library/program should be
742 +  robust to any corruption of compressed data, detecting and
743 +  handling _all_ corruption, instead of merely relying on
744 +  the CRCs.  What this means is that the program should 
745 +  never crash, given corrupted data, and the library should
746 +  always return BZ_DATA_ERROR.
747 +
748 +* Fixed an obscure race-condition bug only ever observed on
749 +  Solaris, in which, if you were very unlucky and issued
750 +  control-C at exactly the wrong time, both input and output
751 +  files would be deleted.
752 +
753 +* Don't run out of file handles on test/decompression when
754 +  large numbers of files have invalid magic numbers.
755 +
756 +* Avoid library namespace pollution.  Prefix all exported 
757 +  symbols with BZ2_.
758 +
759 +* Minor sorting enhancements from my DCC2000 paper.
760 +
761 +* Advance the version number to 1.0, so as to counteract the
762 +  (false-in-this-case) impression some people have that programs 
763 +  with version numbers less than 1.0 are in some way, experimental,
764 +  pre-release versions.
765 +
766 +* Create an initial Makefile-libbz2_so to build a shared library.
767 +  Yes, I know I should really use libtool et al ...
768 +
769 +* Make the program exit with 2 instead of 0 when decompression
770 +  fails due to a bad magic number (ie, an invalid bzip2 header).
771 +  Also exit with 1 (as the manual claims :-) whenever a diagnostic
772 +  message would have been printed AND the corresponding operation 
773 +  is aborted, for example
774 +     bzip2: Output file xx already exists.
775 +  When a diagnostic message is printed but the operation is not 
776 +  aborted, for example
777 +     bzip2: Can't guess original name for wurble -- using wurble.out
778 +  then the exit value 0 is returned, unless some other problem is
779 +  also detected.
780 +
781 +  I think it corresponds more closely to what the manual claims now.
782 +
783 +
784 +1.0.1
785 +~~~~~
786 +* Modified dlltest.c so it uses the new BZ2_ naming scheme.
787 +* Modified makefile-msc to fix minor build probs on Win2k.
788 +* Updated README.COMPILATION.PROBLEMS.
789 +
790 +There are no functionality changes or bug fixes relative to version
791 +1.0.0.  This is just a documentation update + a fix for minor Win32
792 +build problems.  For almost everyone, upgrading from 1.0.0 to 1.0.1 is
793 +utterly pointless.  Don't bother.
794 +
795 +
796 +1.0.2
797 +~~~~~
798 +A bug fix release, addressing various minor issues which have appeared
799 +in the 18 or so months since 1.0.1 was released.  Most of the fixes
800 +are to do with file-handling or documentation bugs.  To the best of my
801 +knowledge, there have been no data-loss-causing bugs reported in the
802 +compression/decompression engine of 1.0.0 or 1.0.1.
803 +
804 +Note that this release does not improve the rather crude build system
805 +for Unix platforms.  The general plan here is to autoconfiscate/
806 +libtoolise 1.0.2 soon after release, and release the result as 1.1.0
807 +or perhaps 1.2.0.  That, however, is still just a plan at this point.
808 +
809 +Here are the changes in 1.0.2.  Bug-reporters and/or patch-senders in
810 +parentheses.
811 +
812 +* Fix an infinite segfault loop in 1.0.1 when a directory is
813 +  encountered in -f (force) mode.
814 +     (Trond Eivind Glomsrod, Nicholas Nethercote, Volker Schmidt)
815 +
816 +* Avoid double fclose() of output file on certain I/O error paths.
817 +     (Solar Designer)
818 +
819 +* Don't fail with internal error 1007 when fed a long stream (> 48MB)
820 +  of byte 251.  Also print useful message suggesting that 1007s may be
821 +  caused by bad memory.
822 +     (noticed by Juan Pedro Vallejo, fixed by me)
823 +
824 +* Fix uninitialised variable silly bug in demo prog dlltest.c.
825 +     (Jorj Bauer)
826 +
827 +* Remove 512-MB limitation on recovered file size for bzip2recover
828 +  on selected platforms which support 64-bit ints.  At the moment
829 +  all GCC supported platforms, and Win32.
830 +     (me, Alson van der Meulen)
831 +
832 +* Hard-code header byte values, to give correct operation on platforms
833 +  using EBCDIC as their native character set (IBM's OS/390).
834 +     (Leland Lucius)
835 +
836 +* Copy file access times correctly.
837 +     (Marty Leisner)
838 +
839 +* Add distclean and check targets to Makefile.
840 +     (Michael Carmack)
841 +
842 +* Parameterise use of ar and ranlib in Makefile.  Also add $(LDFLAGS).
843 +     (Rich Ireland, Bo Thorsen)
844 +
845 +* Pass -p (create parent dirs as needed) to mkdir during make install.
846 +     (Jeremy Fusco)
847 +
848 +* Dereference symlinks when copying file permissions in -f mode.
849 +     (Volker Schmidt)
850 +
851 +* Majorly simplify implementation of uInt64_qrm10.
852 +     (Bo Lindbergh)
853 +
854 +* Check the input file still exists before deleting the output one,
855 +  when aborting in cleanUpAndFail().
856 +     (Joerg Prante, Robert Linden, Matthias Krings)
857 +
858 +Also a bunch of patches courtesy of Philippe Troin, the Debian maintainer
859 +of bzip2:
860 +
861 +* Wrapper scripts (with manpages): bzdiff, bzgrep, bzmore.
862 +
863 +* Spelling changes and minor enhancements in bzip2.1.
864 +
865 +* Avoid race condition between creating the output file and setting its
866 +  interim permissions safely, by using fopen_output_safely().
867 +  No changes to bzip2recover since there is no issue with file
868 +  permissions there.
869 +
870 +* do not print senseless report with -v when compressing an empty
871 +  file.
872 +
873 +* bzcat -f works on non-bzip2 files.
874 +
875 +* do not try to escape shell meta-characters on unix (the shell takes
876 +  care of these).
877 +
878 +* added --fast and --best aliases for -1 -9 for gzip compatibility.
879 +
880 diff -Nru bzip2-1.0.2/bzdiff.1 bzip2-1.0.2.new/bzdiff.1
881 --- bzip2-1.0.2/bzdiff.1        Sun Dec 30 03:12:35 2001
882 +++ bzip2-1.0.2.new/bzdiff.1    Thu Jan  1 01:00:00 1970
883 @@ -1,47 +0,0 @@
884 -\"Shamelessly copied from zmore.1 by Philippe Troin <phil@fifi.org>
885 -\"for Debian GNU/Linux
886 -.TH BZDIFF 1
887 -.SH NAME
888 -bzcmp, bzdiff \- compare bzip2 compressed files
889 -.SH SYNOPSIS
890 -.B bzcmp
891 -[ cmp_options ] file1
892 -[ file2 ]
893 -.br
894 -.B bzdiff
895 -[ diff_options ] file1
896 -[ file2 ]
897 -.SH DESCRIPTION
898 -.I  Bzcmp
899 -and 
900 -.I bzdiff
901 -are used to invoke the
902 -.I cmp
903 -or the
904 -.I diff
905 -program on bzip2 compressed files.  All options specified are passed
906 -directly to
907 -.I cmp
908 -or
909 -.IR diff "."
910 -If only 1 file is specified, then the files compared are
911 -.I file1
912 -and an uncompressed
913 -.IR file1 ".bz2."
914 -If two files are specified, then they are uncompressed if necessary and fed to
915 -.I cmp
916 -or
917 -.IR diff "."
918 -The exit status from 
919 -.I cmp
920 -or
921 -.I diff
922 -is preserved.
923 -.SH "SEE ALSO"
924 -cmp(1), diff(1), bzmore(1), bzless(1), bzgrep(1), bzip2(1)
925 -.SH BUGS
926 -Messages from the
927 -.I cmp
928 -or
929 -.I diff
930 -programs refer to temporary filenames instead of those specified.
931 diff -Nru bzip2-1.0.2/bzgrep.1 bzip2-1.0.2.new/bzgrep.1
932 --- bzip2-1.0.2/bzgrep.1        Sun Dec 30 03:12:35 2001
933 +++ bzip2-1.0.2.new/bzgrep.1    Thu Jan  1 01:00:00 1970
934 @@ -1,56 +0,0 @@
935 -\"Shamelessly copied from zmore.1 by Philippe Troin <phil@fifi.org>
936 -\"for Debian GNU/Linux
937 -.TH BZGREP 1
938 -.SH NAME
939 -bzgrep, bzfgrep, bzegrep \- search possibly bzip2 compressed files for a regular expression
940 -.SH SYNOPSIS
941 -.B bzgrep
942 -[ grep_options ]
943 -.BI  [\ -e\ ] " pattern"
944 -.IR filename ".\|.\|."
945 -.br
946 -.B bzegrep
947 -[ egrep_options ]
948 -.BI  [\ -e\ ] " pattern"
949 -.IR filename ".\|.\|."
950 -.br
951 -.B bzfgrep
952 -[ fgrep_options ]
953 -.BI  [\ -e\ ] " pattern"
954 -.IR filename ".\|.\|."
955 -.SH DESCRIPTION
956 -.IR  Bzgrep
957 -is used to invoke the
958 -.I grep
959 -on bzip2-compressed files. All options specified are passed directly to
960 -.I grep.
961 -If no file is specified, then the standard input is decompressed
962 -if necessary and fed to grep.
963 -Otherwise the given files are uncompressed if necessary and fed to
964 -.I grep.
965 -.PP
966 -If
967 -.I bzgrep
968 -is invoked as
969 -.I bzegrep
970 -or
971 -.I bzfgrep
972 -then
973 -.I egrep
974 -or
975 -.I fgrep
976 -is used instead of
977 -.I grep.
978 -If the GREP environment variable is set,
979 -.I bzgrep
980 -uses it as the
981 -.I grep
982 -program to be invoked. For example:
983 -
984 -    for sh:  GREP=fgrep  bzgrep string files
985 -    for csh: (setenv GREP fgrep; bzgrep string files)
986 -.SH AUTHOR
987 -Charles Levert (charles@comm.polymtl.ca). Adapted to bzip2 by Philippe
988 -Troin <phil@fifi.org> for Debian GNU/Linux.
989 -.SH "SEE ALSO"
990 -grep(1), egrep(1), fgrep(1), bzdiff(1), bzmore(1), bzless(1), bzip2(1)
991 diff -Nru bzip2-1.0.2/bzip2.1 bzip2-1.0.2.new/bzip2.1
992 --- bzip2-1.0.2/bzip2.1 Thu Jan  3 00:14:36 2002
993 +++ bzip2-1.0.2.new/bzip2.1     Thu Jan  1 01:00:00 1970
994 @@ -1,453 +0,0 @@
995 -.PU
996 -.TH bzip2 1
997 -.SH NAME
998 -bzip2, bunzip2 \- a block-sorting file compressor, v1.0.2
999 -.br
1000 -bzcat \- decompresses files to stdout
1001 -.br
1002 -bzip2recover \- recovers data from damaged bzip2 files
1003 -
1004 -.SH SYNOPSIS
1005 -.ll +8
1006 -.B bzip2
1007 -.RB [ " \-cdfkqstvzVL123456789 " ]
1008 -[
1009 -.I "filenames \&..."
1010 -]
1011 -.ll -8
1012 -.br
1013 -.B bunzip2
1014 -.RB [ " \-fkvsVL " ]
1015 -[ 
1016 -.I "filenames \&..."
1017 -]
1018 -.br
1019 -.B bzcat
1020 -.RB [ " \-s " ]
1021 -[ 
1022 -.I "filenames \&..."
1023 -]
1024 -.br
1025 -.B bzip2recover
1026 -.I "filename"
1027 -
1028 -.SH DESCRIPTION
1029 -.I bzip2
1030 -compresses files using the Burrows-Wheeler block sorting
1031 -text compression algorithm, and Huffman coding.  Compression is
1032 -generally considerably better than that achieved by more conventional
1033 -LZ77/LZ78-based compressors, and approaches the performance of the PPM
1034 -family of statistical compressors.
1035 -
1036 -The command-line options are deliberately very similar to 
1037 -those of 
1038 -.I GNU gzip, 
1039 -but they are not identical.
1040 -
1041 -.I bzip2
1042 -expects a list of file names to accompany the
1043 -command-line flags.  Each file is replaced by a compressed version of
1044 -itself, with the name "original_name.bz2".  
1045 -Each compressed file
1046 -has the same modification date, permissions, and, when possible,
1047 -ownership as the corresponding original, so that these properties can
1048 -be correctly restored at decompression time.  File name handling is
1049 -naive in the sense that there is no mechanism for preserving original
1050 -file names, permissions, ownerships or dates in filesystems which lack
1051 -these concepts, or have serious file name length restrictions, such as
1052 -MS-DOS.
1053 -
1054 -.I bzip2
1055 -and
1056 -.I bunzip2
1057 -will by default not overwrite existing
1058 -files.  If you want this to happen, specify the \-f flag.
1059 -
1060 -If no file names are specified,
1061 -.I bzip2
1062 -compresses from standard
1063 -input to standard output.  In this case,
1064 -.I bzip2
1065 -will decline to
1066 -write compressed output to a terminal, as this would be entirely
1067 -incomprehensible and therefore pointless.
1068 -
1069 -.I bunzip2
1070 -(or
1071 -.I bzip2 \-d) 
1072 -decompresses all
1073 -specified files.  Files which were not created by 
1074 -.I bzip2
1075 -will be detected and ignored, and a warning issued.  
1076 -.I bzip2
1077 -attempts to guess the filename for the decompressed file 
1078 -from that of the compressed file as follows:
1079 -
1080 -       filename.bz2    becomes   filename
1081 -       filename.bz     becomes   filename
1082 -       filename.tbz2   becomes   filename.tar
1083 -       filename.tbz    becomes   filename.tar
1084 -       anyothername    becomes   anyothername.out
1085 -
1086 -If the file does not end in one of the recognised endings, 
1087 -.I .bz2, 
1088 -.I .bz, 
1089 -.I .tbz2
1090 -or
1091 -.I .tbz, 
1092 -.I bzip2 
1093 -complains that it cannot
1094 -guess the name of the original file, and uses the original name
1095 -with
1096 -.I .out
1097 -appended.
1098 -
1099 -As with compression, supplying no
1100 -filenames causes decompression from 
1101 -standard input to standard output.
1102 -
1103 -.I bunzip2 
1104 -will correctly decompress a file which is the
1105 -concatenation of two or more compressed files.  The result is the
1106 -concatenation of the corresponding uncompressed files.  Integrity
1107 -testing (\-t) 
1108 -of concatenated 
1109 -compressed files is also supported.
1110 -
1111 -You can also compress or decompress files to the standard output by
1112 -giving the \-c flag.  Multiple files may be compressed and
1113 -decompressed like this.  The resulting outputs are fed sequentially to
1114 -stdout.  Compression of multiple files 
1115 -in this manner generates a stream
1116 -containing multiple compressed file representations.  Such a stream
1117 -can be decompressed correctly only by
1118 -.I bzip2 
1119 -version 0.9.0 or
1120 -later.  Earlier versions of
1121 -.I bzip2
1122 -will stop after decompressing
1123 -the first file in the stream.
1124 -
1125 -.I bzcat
1126 -(or
1127 -.I bzip2 -dc) 
1128 -decompresses all specified files to
1129 -the standard output.
1130 -
1131 -.I bzip2
1132 -will read arguments from the environment variables
1133 -.I BZIP2
1134 -and
1135 -.I BZIP,
1136 -in that order, and will process them
1137 -before any arguments read from the command line.  This gives a 
1138 -convenient way to supply default arguments.
1139 -
1140 -Compression is always performed, even if the compressed 
1141 -file is slightly
1142 -larger than the original.  Files of less than about one hundred bytes
1143 -tend to get larger, since the compression mechanism has a constant
1144 -overhead in the region of 50 bytes.  Random data (including the output
1145 -of most file compressors) is coded at about 8.05 bits per byte, giving
1146 -an expansion of around 0.5%.
1147 -
1148 -As a self-check for your protection, 
1149 -.I 
1150 -bzip2
1151 -uses 32-bit CRCs to
1152 -make sure that the decompressed version of a file is identical to the
1153 -original.  This guards against corruption of the compressed data, and
1154 -against undetected bugs in
1155 -.I bzip2
1156 -(hopefully very unlikely).  The
1157 -chances of data corruption going undetected is microscopic, about one
1158 -chance in four billion for each file processed.  Be aware, though, that
1159 -the check occurs upon decompression, so it can only tell you that
1160 -something is wrong.  It can't help you 
1161 -recover the original uncompressed
1162 -data.  You can use 
1163 -.I bzip2recover
1164 -to try to recover data from
1165 -damaged files.
1166 -
1167 -Return values: 0 for a normal exit, 1 for environmental problems (file
1168 -not found, invalid flags, I/O errors, &c), 2 to indicate a corrupt
1169 -compressed file, 3 for an internal consistency error (eg, bug) which
1170 -caused
1171 -.I bzip2
1172 -to panic.
1173 -
1174 -.SH OPTIONS
1175 -.TP
1176 -.B \-c --stdout
1177 -Compress or decompress to standard output.
1178 -.TP
1179 -.B \-d --decompress
1180 -Force decompression.  
1181 -.I bzip2, 
1182 -.I bunzip2 
1183 -and
1184 -.I bzcat 
1185 -are
1186 -really the same program, and the decision about what actions to take is
1187 -done on the basis of which name is used.  This flag overrides that
1188 -mechanism, and forces 
1189 -.I bzip2
1190 -to decompress.
1191 -.TP
1192 -.B \-z --compress
1193 -The complement to \-d: forces compression, regardless of the
1194 -invocation name.
1195 -.TP
1196 -.B \-t --test
1197 -Check integrity of the specified file(s), but don't decompress them.
1198 -This really performs a trial decompression and throws away the result.
1199 -.TP
1200 -.B \-f --force
1201 -Force overwrite of output files.  Normally,
1202 -.I bzip2 
1203 -will not overwrite
1204 -existing output files.  Also forces 
1205 -.I bzip2 
1206 -to break hard links
1207 -to files, which it otherwise wouldn't do.
1208 -
1209 -bzip2 normally declines to decompress files which don't have the
1210 -correct magic header bytes.  If forced (-f), however, it will pass
1211 -such files through unmodified.  This is how GNU gzip behaves.
1212 -.TP
1213 -.B \-k --keep
1214 -Keep (don't delete) input files during compression
1215 -or decompression.
1216 -.TP
1217 -.B \-s --small
1218 -Reduce memory usage, for compression, decompression and testing.  Files
1219 -are decompressed and tested using a modified algorithm which only
1220 -requires 2.5 bytes per block byte.  This means any file can be
1221 -decompressed in 2300k of memory, albeit at about half the normal speed.
1222 -
1223 -During compression, \-s selects a block size of 200k, which limits
1224 -memory use to around the same figure, at the expense of your compression
1225 -ratio.  In short, if your machine is low on memory (8 megabytes or
1226 -less), use \-s for everything.  See MEMORY MANAGEMENT below.
1227 -.TP
1228 -.B \-q --quiet
1229 -Suppress non-essential warning messages.  Messages pertaining to
1230 -I/O errors and other critical events will not be suppressed.
1231 -.TP
1232 -.B \-v --verbose
1233 -Verbose mode -- show the compression ratio for each file processed.
1234 -Further \-v's increase the verbosity level, spewing out lots of
1235 -information which is primarily of interest for diagnostic purposes.
1236 -.TP
1237 -.B \-L --license -V --version
1238 -Display the software version, license terms and conditions.
1239 -.TP
1240 -.B \-1 (or \-\-fast) to \-9 (or \-\-best)
1241 -Set the block size to 100 k, 200 k ..  900 k when compressing.  Has no
1242 -effect when decompressing.  See MEMORY MANAGEMENT below.
1243 -The \-\-fast and \-\-best aliases are primarily for GNU gzip 
1244 -compatibility.  In particular, \-\-fast doesn't make things
1245 -significantly faster.  
1246 -And \-\-best merely selects the default behaviour.
1247 -.TP
1248 -.B \--
1249 -Treats all subsequent arguments as file names, even if they start
1250 -with a dash.  This is so you can handle files with names beginning
1251 -with a dash, for example: bzip2 \-- \-myfilename.
1252 -.TP
1253 -.B \--repetitive-fast --repetitive-best
1254 -These flags are redundant in versions 0.9.5 and above.  They provided
1255 -some coarse control over the behaviour of the sorting algorithm in
1256 -earlier versions, which was sometimes useful.  0.9.5 and above have an
1257 -improved algorithm which renders these flags irrelevant.
1258 -
1259 -.SH MEMORY MANAGEMENT
1260 -.I bzip2 
1261 -compresses large files in blocks.  The block size affects
1262 -both the compression ratio achieved, and the amount of memory needed for
1263 -compression and decompression.  The flags \-1 through \-9
1264 -specify the block size to be 100,000 bytes through 900,000 bytes (the
1265 -default) respectively.  At decompression time, the block size used for
1266 -compression is read from the header of the compressed file, and
1267 -.I bunzip2
1268 -then allocates itself just enough memory to decompress
1269 -the file.  Since block sizes are stored in compressed files, it follows
1270 -that the flags \-1 to \-9 are irrelevant to and so ignored
1271 -during decompression.
1272 -
1273 -Compression and decompression requirements, 
1274 -in bytes, can be estimated as:
1275 -
1276 -       Compression:   400k + ( 8 x block size )
1277 -
1278 -       Decompression: 100k + ( 4 x block size ), or
1279 -                      100k + ( 2.5 x block size )
1280 -
1281 -Larger block sizes give rapidly diminishing marginal returns.  Most of
1282 -the compression comes from the first two or three hundred k of block
1283 -size, a fact worth bearing in mind when using
1284 -.I bzip2
1285 -on small machines.
1286 -It is also important to appreciate that the decompression memory
1287 -requirement is set at compression time by the choice of block size.
1288 -
1289 -For files compressed with the default 900k block size,
1290 -.I bunzip2
1291 -will require about 3700 kbytes to decompress.  To support decompression
1292 -of any file on a 4 megabyte machine, 
1293 -.I bunzip2
1294 -has an option to
1295 -decompress using approximately half this amount of memory, about 2300
1296 -kbytes.  Decompression speed is also halved, so you should use this
1297 -option only where necessary.  The relevant flag is -s.
1298 -
1299 -In general, try and use the largest block size memory constraints allow,
1300 -since that maximises the compression achieved.  Compression and
1301 -decompression speed are virtually unaffected by block size.
1302 -
1303 -Another significant point applies to files which fit in a single block
1304 --- that means most files you'd encounter using a large block size.  The
1305 -amount of real memory touched is proportional to the size of the file,
1306 -since the file is smaller than a block.  For example, compressing a file
1307 -20,000 bytes long with the flag -9 will cause the compressor to
1308 -allocate around 7600k of memory, but only touch 400k + 20000 * 8 = 560
1309 -kbytes of it.  Similarly, the decompressor will allocate 3700k but only
1310 -touch 100k + 20000 * 4 = 180 kbytes.
1311 -
1312 -Here is a table which summarises the maximum memory usage for different
1313 -block sizes.  Also recorded is the total compressed size for 14 files of
1314 -the Calgary Text Compression Corpus totalling 3,141,622 bytes.  This
1315 -column gives some feel for how compression varies with block size.
1316 -These figures tend to understate the advantage of larger block sizes for
1317 -larger files, since the Corpus is dominated by smaller files.
1318 -
1319 -           Compress   Decompress   Decompress   Corpus
1320 -    Flag     usage      usage       -s usage     Size
1321 -
1322 -     -1      1200k       500k         350k      914704
1323 -     -2      2000k       900k         600k      877703
1324 -     -3      2800k      1300k         850k      860338
1325 -     -4      3600k      1700k        1100k      846899
1326 -     -5      4400k      2100k        1350k      845160
1327 -     -6      5200k      2500k        1600k      838626
1328 -     -7      6100k      2900k        1850k      834096
1329 -     -8      6800k      3300k        2100k      828642
1330 -     -9      7600k      3700k        2350k      828642
1331 -
1332 -.SH RECOVERING DATA FROM DAMAGED FILES
1333 -.I bzip2
1334 -compresses files in blocks, usually 900kbytes long.  Each
1335 -block is handled independently.  If a media or transmission error causes
1336 -a multi-block .bz2
1337 -file to become damaged, it may be possible to
1338 -recover data from the undamaged blocks in the file.
1339 -
1340 -The compressed representation of each block is delimited by a 48-bit
1341 -pattern, which makes it possible to find the block boundaries with
1342 -reasonable certainty.  Each block also carries its own 32-bit CRC, so
1343 -damaged blocks can be distinguished from undamaged ones.
1344 -
1345 -.I bzip2recover
1346 -is a simple program whose purpose is to search for
1347 -blocks in .bz2 files, and write each block out into its own .bz2 
1348 -file.  You can then use
1349 -.I bzip2 
1350 -\-t
1351 -to test the
1352 -integrity of the resulting files, and decompress those which are
1353 -undamaged.
1354 -
1355 -.I bzip2recover
1356 -takes a single argument, the name of the damaged file, 
1357 -and writes a number of files "rec00001file.bz2",
1358 -"rec00002file.bz2", etc, containing the  extracted  blocks.
1359 -The  output  filenames  are  designed  so  that the use of
1360 -wildcards in subsequent processing -- for example,  
1361 -"bzip2 -dc  rec*file.bz2 > recovered_data" -- processes the files in
1362 -the correct order.
1363 -
1364 -.I bzip2recover
1365 -should be of most use dealing with large .bz2
1366 -files,  as  these will contain many blocks.  It is clearly
1367 -futile to use it on damaged single-block  files,  since  a
1368 -damaged  block  cannot  be recovered.  If you wish to minimise 
1369 -any potential data loss through media  or  transmission errors, 
1370 -you might consider compressing with a smaller
1371 -block size.
1372 -
1373 -.SH PERFORMANCE NOTES
1374 -The sorting phase of compression gathers together similar strings in the
1375 -file.  Because of this, files containing very long runs of repeated
1376 -symbols, like "aabaabaabaab ..."  (repeated several hundred times) may
1377 -compress more slowly than normal.  Versions 0.9.5 and above fare much
1378 -better than previous versions in this respect.  The ratio between
1379 -worst-case and average-case compression time is in the region of 10:1.
1380 -For previous versions, this figure was more like 100:1.  You can use the
1381 -\-vvvv option to monitor progress in great detail, if you want.
1382 -
1383 -Decompression speed is unaffected by these phenomena.
1384 -
1385 -.I bzip2
1386 -usually allocates several megabytes of memory to operate
1387 -in, and then charges all over it in a fairly random fashion.  This means
1388 -that performance, both for compressing and decompressing, is largely
1389 -determined by the speed at which your machine can service cache misses.
1390 -Because of this, small changes to the code to reduce the miss rate have
1391 -been observed to give disproportionately large performance improvements.
1392 -I imagine 
1393 -.I bzip2
1394 -will perform best on machines with very large caches.
1395 -
1396 -.SH CAVEATS
1397 -I/O error messages are not as helpful as they could be.
1398 -.I bzip2
1399 -tries hard to detect I/O errors and exit cleanly, but the details of
1400 -what the problem is sometimes seem rather misleading.
1401 -
1402 -This manual page pertains to version 1.0.2 of
1403 -.I bzip2.  
1404 -Compressed data created by this version is entirely forwards and
1405 -backwards compatible with the previous public releases, versions
1406 -0.1pl2, 0.9.0, 0.9.5, 1.0.0 and 1.0.1, but with the following
1407 -exception: 0.9.0 and above can correctly decompress multiple
1408 -concatenated compressed files.  0.1pl2 cannot do this; it will stop
1409 -after decompressing just the first file in the stream.
1410 -
1411 -.I bzip2recover
1412 -versions prior to this one, 1.0.2, used 32-bit integers to represent
1413 -bit positions in compressed files, so it could not handle compressed
1414 -files more than 512 megabytes long.  Version 1.0.2 and above uses
1415 -64-bit ints on some platforms which support them (GNU supported
1416 -targets, and Windows).  To establish whether or not bzip2recover was
1417 -built with such a limitation, run it without arguments.  In any event
1418 -you can build yourself an unlimited version if you can recompile it
1419 -with MaybeUInt64 set to be an unsigned 64-bit integer.
1420 -
1421 -
1422 -
1423 -.SH AUTHOR
1424 -Julian Seward, jseward@acm.org.
1425 -
1426 -http://sources.redhat.com/bzip2
1427 -
1428 -The ideas embodied in
1429 -.I bzip2
1430 -are due to (at least) the following
1431 -people: Michael Burrows and David Wheeler (for the block sorting
1432 -transformation), David Wheeler (again, for the Huffman coder), Peter
1433 -Fenwick (for the structured coding model in the original
1434 -.I bzip,
1435 -and many refinements), and Alistair Moffat, Radford Neal and Ian Witten
1436 -(for the arithmetic coder in the original
1437 -.I bzip).  
1438 -I am much
1439 -indebted for their help, support and advice.  See the manual in the
1440 -source distribution for pointers to sources of documentation.  Christian
1441 -von Roques encouraged me to look for faster sorting algorithms, so as to
1442 -speed up compression.  Bela Lubkin encouraged me to improve the
1443 -worst-case compression performance.  
1444 -The bz* scripts are derived from those of GNU gzip.
1445 -Many people sent patches, helped
1446 -with portability problems, lent machines, gave advice and were generally
1447 -helpful.
1448 diff -Nru bzip2-1.0.2/bzip2.1.preformatted bzip2-1.0.2.new/bzip2.1.preformatted
1449 --- bzip2-1.0.2/bzip2.1.preformatted    Thu Jan  3 00:15:56 2002
1450 +++ bzip2-1.0.2.new/bzip2.1.preformatted        Thu Jan  1 01:00:00 1970
1451 @@ -1,398 +0,0 @@
1452 -bzip2(1)                                                 bzip2(1)
1453 -
1454 -
1455 -
1456 -N\bNA\bAM\bME\bE
1457 -       bzip2, bunzip2 - a block-sorting file compressor, v1.0.2
1458 -       bzcat - decompresses files to stdout
1459 -       bzip2recover - recovers data from damaged bzip2 files
1460 -
1461 -
1462 -S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
1463 -       b\bbz\bzi\bip\bp2\b2 [ -\b-c\bcd\bdf\bfk\bkq\bqs\bst\btv\bvz\bzV\bVL\bL1\b12\b23\b34\b45\b56\b67\b78\b89\b9 ] [ _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be_\bs _\b._\b._\b.  ]
1464 -       b\bbu\bun\bnz\bzi\bip\bp2\b2 [ -\b-f\bfk\bkv\bvs\bsV\bVL\bL ] [ _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be_\bs _\b._\b._\b.  ]
1465 -       b\bbz\bzc\bca\bat\bt [ -\b-s\bs ] [ _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be_\bs _\b._\b._\b.  ]
1466 -       b\bbz\bzi\bip\bp2\b2r\bre\bec\bco\bov\bve\ber\br _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
1467 -
1468 -
1469 -D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
1470 -       _\bb_\bz_\bi_\bp_\b2  compresses  files  using  the Burrows-Wheeler block
1471 -       sorting text compression algorithm,  and  Huffman  coding.
1472 -       Compression  is  generally  considerably  better than that
1473 -       achieved by more conventional LZ77/LZ78-based compressors,
1474 -       and  approaches  the performance of the PPM family of sta­
1475 -       tistical compressors.
1476 -
1477 -       The command-line options are deliberately very similar  to
1478 -       those of _\bG_\bN_\bU _\bg_\bz_\bi_\bp_\b, but they are not identical.
1479 -
1480 -       _\bb_\bz_\bi_\bp_\b2  expects  a list of file names to accompany the com­
1481 -       mand-line flags.  Each file is replaced  by  a  compressed
1482 -       version  of  itself,  with  the  name "original_name.bz2".
1483 -       Each compressed file has the same modification date,  per­
1484 -       missions, and, when possible, ownership as the correspond­
1485 -       ing original, so that these properties  can  be  correctly
1486 -       restored  at  decompression  time.   File name handling is
1487 -       naive in the sense that there is no mechanism for preserv­
1488 -       ing  original file names, permissions, ownerships or dates
1489 -       in filesystems which lack these concepts, or have  serious
1490 -       file name length restrictions, such as MS-DOS.
1491 -
1492 -       _\bb_\bz_\bi_\bp_\b2  and  _\bb_\bu_\bn_\bz_\bi_\bp_\b2 will by default not overwrite existing
1493 -       files.  If you want this to happen, specify the -f flag.
1494 -
1495 -       If no file names  are  specified,  _\bb_\bz_\bi_\bp_\b2  compresses  from
1496 -       standard  input  to  standard output.  In this case, _\bb_\bz_\bi_\bp_\b2
1497 -       will decline to write compressed output to a terminal,  as
1498 -       this  would  be  entirely  incomprehensible  and therefore
1499 -       pointless.
1500 -
1501 -       _\bb_\bu_\bn_\bz_\bi_\bp_\b2 (or _\bb_\bz_\bi_\bp_\b2 _\b-_\bd_\b) decompresses  all  specified  files.
1502 -       Files which were not created by _\bb_\bz_\bi_\bp_\b2 will be detected and
1503 -       ignored, and a warning issued.  _\bb_\bz_\bi_\bp_\b2  attempts  to  guess
1504 -       the  filename  for  the decompressed file from that of the
1505 -       compressed file as follows:
1506 -
1507 -              filename.bz2    becomes   filename
1508 -              filename.bz     becomes   filename
1509 -              filename.tbz2   becomes   filename.tar
1510 -              filename.tbz    becomes   filename.tar
1511 -              anyothername    becomes   anyothername.out
1512 -
1513 -       If the file does not end in one of the recognised endings,
1514 -       _\b._\bb_\bz_\b2_\b,  _\b._\bb_\bz_\b,  _\b._\bt_\bb_\bz_\b2 or _\b._\bt_\bb_\bz_\b, _\bb_\bz_\bi_\bp_\b2 complains that it cannot
1515 -       guess the name of the original file, and uses the original
1516 -       name with _\b._\bo_\bu_\bt appended.
1517 -
1518 -       As  with compression, supplying no filenames causes decom­
1519 -       pression from standard input to standard output.
1520 -
1521 -       _\bb_\bu_\bn_\bz_\bi_\bp_\b2 will correctly decompress a file which is the con­
1522 -       catenation of two or more compressed files.  The result is
1523 -       the concatenation of the corresponding uncompressed files.
1524 -       Integrity testing (-t) of concatenated compressed files is
1525 -       also supported.
1526 -
1527 -       You can also compress or decompress files to the  standard
1528 -       output  by giving the -c flag.  Multiple files may be com­
1529 -       pressed and decompressed like this.  The resulting outputs
1530 -       are  fed  sequentially to stdout.  Compression of multiple
1531 -       files in this manner generates a stream containing  multi­
1532 -       ple compressed file representations.  Such a stream can be
1533 -       decompressed correctly only  by  _\bb_\bz_\bi_\bp_\b2  version  0.9.0  or
1534 -       later.   Earlier  versions of _\bb_\bz_\bi_\bp_\b2 will stop after decom­
1535 -       pressing the first file in the stream.
1536 -
1537 -       _\bb_\bz_\bc_\ba_\bt (or _\bb_\bz_\bi_\bp_\b2 _\b-_\bd_\bc_\b) decompresses all specified  files  to
1538 -       the standard output.
1539 -
1540 -       _\bb_\bz_\bi_\bp_\b2  will  read arguments from the environment variables
1541 -       _\bB_\bZ_\bI_\bP_\b2 and _\bB_\bZ_\bI_\bP_\b, in  that  order,  and  will  process  them
1542 -       before  any  arguments  read  from the command line.  This
1543 -       gives a convenient way to supply default arguments.
1544 -
1545 -       Compression is always performed, even  if  the  compressed
1546 -       file  is slightly larger than the original.  Files of less
1547 -       than about one hundred bytes tend to get larger, since the
1548 -       compression  mechanism  has  a  constant  overhead  in the
1549 -       region of 50 bytes.  Random data (including the output  of
1550 -       most  file  compressors)  is  coded at about 8.05 bits per
1551 -       byte, giving an expansion of around 0.5%.
1552 -
1553 -       As a self-check for your  protection,  _\bb_\bz_\bi_\bp_\b2  uses  32-bit
1554 -       CRCs  to make sure that the decompressed version of a file
1555 -       is identical to the original.  This guards against corrup­
1556 -       tion  of  the compressed data, and against undetected bugs
1557 -       in _\bb_\bz_\bi_\bp_\b2 (hopefully very unlikely).  The chances  of  data
1558 -       corruption  going  undetected  is  microscopic,  about one
1559 -       chance in four billion for each file processed.  Be aware,
1560 -       though,  that  the  check occurs upon decompression, so it
1561 -       can only tell you that something is wrong.  It can't  help
1562 -       you  recover  the original uncompressed data.  You can use
1563 -       _\bb_\bz_\bi_\bp_\b2_\br_\be_\bc_\bo_\bv_\be_\br to try to recover data from damaged files.
1564 -
1565 -       Return values: 0 for a normal exit,  1  for  environmental
1566 -       problems  (file not found, invalid flags, I/O errors, &c),
1567 -       2 to indicate a corrupt compressed file, 3 for an internal
1568 -       consistency error (eg, bug) which caused _\bb_\bz_\bi_\bp_\b2 to panic.
1569 -
1570 -
1571 -O\bOP\bPT\bTI\bIO\bON\bNS\bS
1572 -       -\b-c\bc -\b--\b-s\bst\btd\bdo\bou\but\bt
1573 -              Compress or decompress to standard output.
1574 -
1575 -       -\b-d\bd -\b--\b-d\bde\bec\bco\bom\bmp\bpr\bre\bes\bss\bs
1576 -              Force  decompression.  _\bb_\bz_\bi_\bp_\b2_\b, _\bb_\bu_\bn_\bz_\bi_\bp_\b2 and _\bb_\bz_\bc_\ba_\bt are
1577 -              really the same program,  and  the  decision  about
1578 -              what  actions to take is done on the basis of which
1579 -              name is used.  This flag overrides that  mechanism,
1580 -              and forces _\bb_\bz_\bi_\bp_\b2 to decompress.
1581 -
1582 -       -\b-z\bz -\b--\b-c\bco\bom\bmp\bpr\bre\bes\bss\bs
1583 -              The   complement   to   -d:   forces   compression,
1584 -              regardless of the invocation name.
1585 -
1586 -       -\b-t\bt -\b--\b-t\bte\bes\bst\bt
1587 -              Check integrity of the specified file(s), but don't
1588 -              decompress  them.   This  really  performs  a trial
1589 -              decompression and throws away the result.
1590 -
1591 -       -\b-f\bf -\b--\b-f\bfo\bor\brc\bce\be
1592 -              Force overwrite of output files.   Normally,  _\bb_\bz_\bi_\bp_\b2
1593 -              will  not  overwrite  existing  output files.  Also
1594 -              forces _\bb_\bz_\bi_\bp_\b2 to break hard links to files, which it
1595 -              otherwise wouldn't do.
1596 -
1597 -              bzip2  normally  declines to decompress files which
1598 -              don't have the  correct  magic  header  bytes.   If
1599 -              forced  (-f),  however,  it  will  pass  such files
1600 -              through unmodified.  This is how GNU gzip  behaves.
1601 -
1602 -       -\b-k\bk -\b--\b-k\bke\bee\bep\bp
1603 -              Keep  (don't delete) input files during compression
1604 -              or decompression.
1605 -
1606 -       -\b-s\bs -\b--\b-s\bsm\bma\bal\bll\bl
1607 -              Reduce memory usage, for compression, decompression
1608 -              and  testing.   Files  are  decompressed and tested
1609 -              using a modified algorithm which only requires  2.5
1610 -              bytes  per  block byte.  This means any file can be
1611 -              decompressed in 2300k of memory,  albeit  at  about
1612 -              half the normal speed.
1613 -
1614 -              During  compression,  -s  selects  a  block size of
1615 -              200k, which limits memory use to  around  the  same
1616 -              figure,  at  the expense of your compression ratio.
1617 -              In short, if your  machine  is  low  on  memory  (8
1618 -              megabytes  or  less),  use  -s for everything.  See
1619 -              MEMORY MANAGEMENT below.
1620 -
1621 -       -\b-q\bq -\b--\b-q\bqu\bui\bie\bet\bt
1622 -              Suppress non-essential warning messages.   Messages
1623 -              pertaining  to I/O errors and other critical events
1624 -              will not be suppressed.
1625 -
1626 -       -\b-v\bv -\b--\b-v\bve\ber\brb\bbo\bos\bse\be
1627 -              Verbose mode -- show the compression ratio for each
1628 -              file  processed.   Further  -v's  increase the ver­
1629 -              bosity level, spewing out lots of information which
1630 -              is primarily of interest for diagnostic purposes.
1631 -
1632 -       -\b-L\bL -\b--\b-l\bli\bic\bce\ben\bns\bse\be -\b-V\bV -\b--\b-v\bve\ber\brs\bsi\bio\bon\bn
1633 -              Display  the  software  version,  license terms and
1634 -              conditions.
1635 -
1636 -       -\b-1\b1 (\b(o\bor\br -\b--\b-f\bfa\bas\bst\bt)\b) t\bto\bo -\b-9\b9 (\b(o\bor\br -\b--\b-b\bbe\bes\bst\bt)\b)
1637 -              Set the block size to 100 k, 200 k ..  900  k  when
1638 -              compressing.   Has  no  effect  when decompressing.
1639 -              See MEMORY MANAGEMENT below.  The --fast and --best
1640 -              aliases  are  primarily for GNU gzip compatibility.
1641 -              In particular, --fast doesn't make things  signifi­
1642 -              cantly  faster.   And  --best  merely  selects  the
1643 -              default behaviour.
1644 -
1645 -       -\b--\b-     Treats all subsequent arguments as file names, even
1646 -              if they start with a dash.  This is so you can han­
1647 -              dle files with names beginning  with  a  dash,  for
1648 -              example: bzip2 -- -myfilename.
1649 -
1650 -       -\b--\b-r\bre\bep\bpe\bet\bti\bit\bti\biv\bve\be-\b-f\bfa\bas\bst\bt -\b--\b-r\bre\bep\bpe\bet\bti\bit\bti\biv\bve\be-\b-b\bbe\bes\bst\bt
1651 -              These  flags  are  redundant  in versions 0.9.5 and
1652 -              above.  They provided some coarse control over  the
1653 -              behaviour  of the sorting algorithm in earlier ver­
1654 -              sions, which was sometimes useful.  0.9.5 and above
1655 -              have  an  improved  algorithm  which  renders these
1656 -              flags irrelevant.
1657 -
1658 -
1659 -M\bME\bEM\bMO\bOR\bRY\bY M\bMA\bAN\bNA\bAG\bGE\bEM\bME\bEN\bNT\bT
1660 -       _\bb_\bz_\bi_\bp_\b2 compresses large files in blocks.   The  block  size
1661 -       affects  both  the  compression  ratio  achieved,  and the
1662 -       amount of memory needed for compression and decompression.
1663 -       The  flags  -1  through  -9  specify  the block size to be
1664 -       100,000 bytes through 900,000 bytes (the default)  respec­
1665 -       tively.   At  decompression  time, the block size used for
1666 -       compression is read from  the  header  of  the  compressed
1667 -       file, and _\bb_\bu_\bn_\bz_\bi_\bp_\b2 then allocates itself just enough memory
1668 -       to decompress the file.  Since block sizes are  stored  in
1669 -       compressed  files,  it follows that the flags -1 to -9 are
1670 -       irrelevant to and so ignored during decompression.
1671 -
1672 -       Compression and decompression requirements, in bytes,  can
1673 -       be estimated as:
1674 -
1675 -              Compression:   400k + ( 8 x block size )
1676 -
1677 -              Decompression: 100k + ( 4 x block size ), or
1678 -                             100k + ( 2.5 x block size )
1679 -
1680 -       Larger  block  sizes  give  rapidly  diminishing  marginal
1681 -       returns.  Most of the compression comes from the first two
1682 -       or  three hundred k of block size, a fact worth bearing in
1683 -       mind when using _\bb_\bz_\bi_\bp_\b2  on  small  machines.   It  is  also
1684 -       important  to  appreciate  that  the  decompression memory
1685 -       requirement is set at compression time by  the  choice  of
1686 -       block size.
1687 -
1688 -       For  files  compressed  with  the default 900k block size,
1689 -       _\bb_\bu_\bn_\bz_\bi_\bp_\b2 will require about 3700 kbytes to decompress.   To
1690 -       support decompression of any file on a 4 megabyte machine,
1691 -       _\bb_\bu_\bn_\bz_\bi_\bp_\b2 has an option to  decompress  using  approximately
1692 -       half this amount of memory, about 2300 kbytes.  Decompres­
1693 -       sion speed is also halved, so you should use  this  option
1694 -       only where necessary.  The relevant flag is -s.
1695 -
1696 -       In general, try and use the largest block size memory con­
1697 -       straints  allow,  since  that  maximises  the  compression
1698 -       achieved.   Compression and decompression speed are virtu­
1699 -       ally unaffected by block size.
1700 -
1701 -       Another significant point applies to files which fit in  a
1702 -       single  block  --  that  means  most files you'd encounter
1703 -       using a large block  size.   The  amount  of  real  memory
1704 -       touched is proportional to the size of the file, since the
1705 -       file is smaller than a block.  For example, compressing  a
1706 -       file  20,000  bytes  long  with the flag -9 will cause the
1707 -       compressor to allocate around 7600k of  memory,  but  only
1708 -       touch 400k + 20000 * 8 = 560 kbytes of it.  Similarly, the
1709 -       decompressor will allocate 3700k but  only  touch  100k  +
1710 -       20000 * 4 = 180 kbytes.
1711 -
1712 -       Here  is a table which summarises the maximum memory usage
1713 -       for different block sizes.  Also  recorded  is  the  total
1714 -       compressed  size for 14 files of the Calgary Text Compres­
1715 -       sion Corpus totalling 3,141,622 bytes.  This column  gives
1716 -       some  feel  for  how  compression  varies with block size.
1717 -       These figures tend to understate the advantage  of  larger
1718 -       block  sizes  for  larger files, since the Corpus is domi­
1719 -       nated by smaller files.
1720 -
1721 -                  Compress   Decompress   Decompress   Corpus
1722 -           Flag     usage      usage       -s usage     Size
1723 -
1724 -            -1      1200k       500k         350k      914704
1725 -            -2      2000k       900k         600k      877703
1726 -            -3      2800k      1300k         850k      860338
1727 -            -4      3600k      1700k        1100k      846899
1728 -            -5      4400k      2100k        1350k      845160
1729 -            -6      5200k      2500k        1600k      838626
1730 -            -7      6100k      2900k        1850k      834096
1731 -            -8      6800k      3300k        2100k      828642
1732 -            -9      7600k      3700k        2350k      828642
1733 -
1734 -
1735 -R\bRE\bEC\bCO\bOV\bVE\bER\bRI\bIN\bNG\bG D\bDA\bAT\bTA\bA F\bFR\bRO\bOM\bM D\bDA\bAM\bMA\bAG\bGE\bED\bD F\bFI\bIL\bLE\bES\bS
1736 -       _\bb_\bz_\bi_\bp_\b2 compresses files in blocks, usually 900kbytes  long.
1737 -       Each block is handled independently.  If a media or trans­
1738 -       mission error causes a multi-block  .bz2  file  to  become
1739 -       damaged,  it  may  be  possible  to  recover data from the
1740 -       undamaged blocks in the file.
1741 -
1742 -       The compressed representation of each block  is  delimited
1743 -       by  a  48-bit pattern, which makes it possible to find the
1744 -       block boundaries with reasonable  certainty.   Each  block
1745 -       also  carries its own 32-bit CRC, so damaged blocks can be
1746 -       distinguished from undamaged ones.
1747 -
1748 -       _\bb_\bz_\bi_\bp_\b2_\br_\be_\bc_\bo_\bv_\be_\br is a  simple  program  whose  purpose  is  to
1749 -       search  for blocks in .bz2 files, and write each block out
1750 -       into its own .bz2 file.  You can then use _\bb_\bz_\bi_\bp_\b2 -t to test
1751 -       the integrity of the resulting files, and decompress those
1752 -       which are undamaged.
1753 -
1754 -       _\bb_\bz_\bi_\bp_\b2_\br_\be_\bc_\bo_\bv_\be_\br takes a single argument, the name of the dam­
1755 -       aged    file,    and    writes    a    number   of   files
1756 -       "rec00001file.bz2",  "rec00002file.bz2",  etc,  containing
1757 -       the   extracted   blocks.   The   output   filenames   are
1758 -       designed  so  that the use of wildcards in subsequent pro­
1759 -       cessing  -- for example, "bzip2 -dc  rec*file.bz2 > recov­
1760 -       ered_data" -- processes the files in the correct order.
1761 -
1762 -       _\bb_\bz_\bi_\bp_\b2_\br_\be_\bc_\bo_\bv_\be_\br should be of most use dealing with large .bz2
1763 -       files,  as  these will contain many blocks.  It is clearly
1764 -       futile to use it on damaged single-block  files,  since  a
1765 -       damaged  block  cannot  be recovered.  If you wish to min­
1766 -       imise any potential data loss through media  or  transmis­
1767 -       sion errors, you might consider compressing with a smaller
1768 -       block size.
1769 -
1770 -
1771 -P\bPE\bER\bRF\bFO\bOR\bRM\bMA\bAN\bNC\bCE\bE N\bNO\bOT\bTE\bES\bS
1772 -       The sorting phase of compression gathers together  similar
1773 -       strings  in  the  file.  Because of this, files containing
1774 -       very long runs of  repeated  symbols,  like  "aabaabaabaab
1775 -       ..."   (repeated  several hundred times) may compress more
1776 -       slowly than normal.  Versions 0.9.5 and  above  fare  much
1777 -       better  than previous versions in this respect.  The ratio
1778 -       between worst-case and average-case compression time is in
1779 -       the  region  of  10:1.  For previous versions, this figure
1780 -       was more like 100:1.  You can use the -vvvv option to mon­
1781 -       itor progress in great detail, if you want.
1782 -
1783 -       Decompression speed is unaffected by these phenomena.
1784 -
1785 -       _\bb_\bz_\bi_\bp_\b2  usually  allocates  several  megabytes of memory to
1786 -       operate in, and then charges all over it in a fairly  ran­
1787 -       dom  fashion.   This means that performance, both for com­
1788 -       pressing and decompressing, is largely determined  by  the
1789 -       speed  at  which  your  machine  can service cache misses.
1790 -       Because of this, small changes to the code to  reduce  the
1791 -       miss  rate  have  been observed to give disproportionately
1792 -       large performance improvements.  I imagine _\bb_\bz_\bi_\bp_\b2 will per­
1793 -       form best on machines with very large caches.
1794 -
1795 -
1796 -C\bCA\bAV\bVE\bEA\bAT\bTS\bS
1797 -       I/O  error  messages  are not as helpful as they could be.
1798 -       _\bb_\bz_\bi_\bp_\b2 tries hard to detect I/O errors  and  exit  cleanly,
1799 -       but  the  details  of  what  the problem is sometimes seem
1800 -       rather misleading.
1801 -
1802 -       This manual page pertains to version 1.0.2 of _\bb_\bz_\bi_\bp_\b2_\b.  Com­
1803 -       pressed  data created by this version is entirely forwards
1804 -       and  backwards  compatible  with   the   previous   public
1805 -       releases,  versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0 and 1.0.1,
1806 -       but with the following exception: 0.9.0 and above can cor­
1807 -       rectly  decompress multiple concatenated compressed files.
1808 -       0.1pl2 cannot do this; it will  stop  after  decompressing
1809 -       just the first file in the stream.
1810 -
1811 -       _\bb_\bz_\bi_\bp_\b2_\br_\be_\bc_\bo_\bv_\be_\br  versions  prior  to  this  one,  1.0.2, used
1812 -       32-bit integers to represent bit positions  in  compressed
1813 -       files,  so  it could not handle compressed files more than
1814 -       512 megabytes long.  Version 1.0.2 and above  uses  64-bit
1815 -       ints  on  some platforms which support them (GNU supported
1816 -       targets,  and  Windows).   To  establish  whether  or  not
1817 -       bzip2recover  was  built  with  such  a limitation, run it
1818 -       without arguments.  In any event you can build yourself an
1819 -       unlimited version if you can recompile it with MaybeUInt64
1820 -       set to be an unsigned 64-bit integer.
1821 -
1822 -
1823 -
1824 -
1825 -A\bAU\bUT\bTH\bHO\bOR\bR
1826 -       Julian Seward, jseward@acm.org.
1827 -
1828 -       http://sources.redhat.com/bzip2
1829 -
1830 -       The ideas embodied in _\bb_\bz_\bi_\bp_\b2 are due to (at least) the fol­
1831 -       lowing  people: Michael Burrows and David Wheeler (for the
1832 -       block sorting transformation), David Wheeler  (again,  for
1833 -       the Huffman coder), Peter Fenwick (for the structured cod­
1834 -       ing model in the original _\bb_\bz_\bi_\bp_\b, and many refinements), and
1835 -       Alistair  Moffat,  Radford  Neal  and  Ian Witten (for the
1836 -       arithmetic  coder  in  the  original  _\bb_\bz_\bi_\bp_\b)_\b.   I  am  much
1837 -       indebted for their help, support and advice.  See the man­
1838 -       ual in the source distribution for pointers to sources  of
1839 -       documentation.  Christian von Roques encouraged me to look
1840 -       for faster sorting algorithms, so as to speed up  compres­
1841 -       sion.  Bela Lubkin encouraged me to improve the worst-case
1842 -       compression performance.  The bz* scripts are derived from
1843 -       those  of GNU gzip.  Many people sent patches, helped with
1844 -       portability problems, lent machines, gave advice and  were
1845 -       generally helpful.
1846 -
1847 -
1848 -
1849 -                                                         bzip2(1)
1850 diff -Nru bzip2-1.0.2/bzless bzip2-1.0.2.new/bzless
1851 --- bzip2-1.0.2/bzless  Thu Jan  1 01:00:00 1970
1852 +++ bzip2-1.0.2.new/bzless      Fri Feb  1 04:19:11 2002
1853 @@ -0,0 +1,2 @@
1854 +#!/bin/sh
1855 +%{_bindir}/bunzip2 -c "$@" | %{_bindir}/less
1856 diff -Nru bzip2-1.0.2/bzmore.1 bzip2-1.0.2.new/bzmore.1
1857 --- bzip2-1.0.2/bzmore.1        Sun Dec 30 03:12:35 2001
1858 +++ bzip2-1.0.2.new/bzmore.1    Thu Jan  1 01:00:00 1970
1859 @@ -1,152 +0,0 @@
1860 -.\"Shamelessly copied from zmore.1 by Philippe Troin <phil@fifi.org>
1861 -.\"for Debian GNU/Linux
1862 -.TH BZMORE 1
1863 -.SH NAME
1864 -bzmore, bzless \- file perusal filter for crt viewing of bzip2 compressed text
1865 -.SH SYNOPSIS
1866 -.B bzmore
1867 -[ name ...  ]
1868 -.br
1869 -.B bzless
1870 -[ name ...  ]
1871 -.SH NOTE
1872 -In the following description,
1873 -.I bzless
1874 -and
1875 -.I less
1876 -can be used interchangeably with
1877 -.I bzmore
1878 -and
1879 -.I more.
1880 -.SH DESCRIPTION
1881 -.I  Bzmore
1882 -is a filter which allows examination of compressed or plain text files
1883 -one screenful at a time on a soft-copy terminal.
1884 -.I bzmore
1885 -works on files compressed with
1886 -.I bzip2
1887 -and also on uncompressed files.
1888 -If a file does not exist,
1889 -.I bzmore
1890 -looks for a file of the same name with the addition of a .bz2 suffix.
1891 -.PP
1892 -.I Bzmore
1893 -normally pauses after each screenful, printing --More--
1894 -at the bottom of the screen.
1895 -If the user then types a carriage return, one more line is displayed.
1896 -If the user hits a space,
1897 -another screenful is displayed.  Other possibilities are enumerated later.
1898 -.PP
1899 -.I Bzmore
1900 -looks in the file
1901 -.I /etc/termcap
1902 -to determine terminal characteristics,
1903 -and to determine the default window size.
1904 -On a terminal capable of displaying 24 lines,
1905 -the default window size is 22 lines.
1906 -Other sequences which may be typed when
1907 -.I bzmore
1908 -pauses, and their effects, are as follows (\fIi\fP is an optional integer
1909 -argument, defaulting to 1) :
1910 -.PP
1911 -.IP \fIi\|\fP<space>
1912 -display
1913 -.I i
1914 -more lines, (or another screenful if no argument is given)
1915 -.PP
1916 -.IP ^D
1917 -display 11 more lines (a ``scroll'').
1918 -If
1919 -.I i
1920 -is given, then the scroll size is set to \fIi\|\fP.
1921 -.PP
1922 -.IP d
1923 -same as ^D (control-D)
1924 -.PP
1925 -.IP \fIi\|\fPz
1926 -same as typing a space except that \fIi\|\fP, if present, becomes the new
1927 -window size.  Note that the window size reverts back to the default at the
1928 -end of the current file.
1929 -.PP
1930 -.IP \fIi\|\fPs
1931 -skip \fIi\|\fP lines and print a screenful of lines
1932 -.PP
1933 -.IP \fIi\|\fPf
1934 -skip \fIi\fP screenfuls and print a screenful of lines
1935 -.PP
1936 -.IP "q or Q"
1937 -quit reading the current file; go on to the next (if any)
1938 -.PP
1939 -.IP "e or q"
1940 -When the prompt --More--(Next file: 
1941 -.IR file )
1942 -is printed, this command causes bzmore to exit.
1943 -.PP
1944 -.IP s
1945 -When the prompt --More--(Next file: 
1946 -.IR file )
1947 -is printed, this command causes bzmore to skip the next file and continue.
1948 -.PP 
1949 -.IP =
1950 -Display the current line number.
1951 -.PP
1952 -.IP \fIi\|\fP/expr
1953 -search for the \fIi\|\fP-th occurrence of the regular expression \fIexpr.\fP
1954 -If the pattern is not found,
1955 -.I bzmore
1956 -goes on to the next file (if any).
1957 -Otherwise, a screenful is displayed, starting two lines before the place
1958 -where the expression was found.
1959 -The user's erase and kill characters may be used to edit the regular
1960 -expression.
1961 -Erasing back past the first column cancels the search command.
1962 -.PP
1963 -.IP \fIi\|\fPn
1964 -search for the \fIi\|\fP-th occurrence of the last regular expression entered.
1965 -.PP
1966 -.IP !command
1967 -invoke a shell with \fIcommand\|\fP. 
1968 -The character `!' in "command" are replaced with the
1969 -previous shell command.  The sequence "\\!" is replaced by "!".
1970 -.PP
1971 -.IP ":q or :Q"
1972 -quit reading the current file; go on to the next (if any)
1973 -(same as q or Q).
1974 -.PP
1975 -.IP .
1976 -(dot) repeat the previous command.
1977 -.PP
1978 -The commands take effect immediately, i.e., it is not necessary to
1979 -type a carriage return.
1980 -Up to the time when the command character itself is given,
1981 -the user may hit the line kill character to cancel the numerical
1982 -argument being formed.
1983 -In addition, the user may hit the erase character to redisplay the
1984 ---More-- message.
1985 -.PP
1986 -At any time when output is being sent to the terminal, the user can
1987 -hit the quit key (normally control\-\\).
1988 -.I Bzmore
1989 -will stop sending output, and will display the usual --More--
1990 -prompt.
1991 -The user may then enter one of the above commands in the normal manner.
1992 -Unfortunately, some output is lost when this is done, due to the
1993 -fact that any characters waiting in the terminal's output queue
1994 -are flushed when the quit signal occurs.
1995 -.PP
1996 -The terminal is set to
1997 -.I noecho
1998 -mode by this program so that the output can be continuous.
1999 -What you type will thus not show on your terminal, except for the / and !
2000 -commands.
2001 -.PP
2002 -If the standard output is not a teletype, then
2003 -.I bzmore
2004 -acts just like
2005 -.I bzcat,
2006 -except that a header is printed before each file.
2007 -.SH FILES
2008 -.DT
2009 -/etc/termcap           Terminal data base
2010 -.SH "SEE ALSO"
2011 -more(1), less(1), bzip2(1), bzdiff(1), bzgrep(1)
2012 diff -Nru bzip2-1.0.2/config.h.in bzip2-1.0.2.new/config.h.in
2013 --- bzip2-1.0.2/config.h.in     Thu Jan  1 01:00:00 1970
2014 +++ bzip2-1.0.2.new/config.h.in Fri Feb  1 04:19:11 2002
2015 @@ -0,0 +1,17 @@
2016 +/* config.h.in.  Generated automatically from configure.in by autoheader.  */
2017 +
2018 +/* Name of package */
2019 +#undef PACKAGE
2020 +
2021 +/* Version number of package */
2022 +#undef VERSION
2023 +
2024 +/* Number of bits in a file offset, on hosts where this is settable. */
2025 +#undef _FILE_OFFSET_BITS
2026 +
2027 +/* Define to make fseeko etc. visible, on some hosts. */
2028 +#undef _LARGEFILE_SOURCE
2029 +
2030 +/* Define for large files, on AIX-style hosts. */
2031 +#undef _LARGE_FILES
2032 +
2033 diff -Nru bzip2-1.0.2/configure.in bzip2-1.0.2.new/configure.in
2034 --- bzip2-1.0.2/configure.in    Thu Jan  1 01:00:00 1970
2035 +++ bzip2-1.0.2.new/configure.in        Fri Feb  1 04:19:11 2002
2036 @@ -0,0 +1,10 @@
2037 +AC_INIT(bzip2.c)
2038 +AM_INIT_AUTOMAKE(bzip2,1.0.1)
2039 +AM_CONFIG_HEADER(config.h)
2040 +AC_PROG_CC
2041 +AM_PROG_LIBTOOL
2042 +AC_PROG_LN_S
2043 +AC_SYS_LARGEFILE
2044 +AC_OUTPUT(Makefile
2045 +       doc/Makefile
2046 +       doc/pl/Makefile)
2047 diff -Nru bzip2-1.0.2/crctable.c bzip2-1.0.2.new/crctable.c
2048 --- bzip2-1.0.2/crctable.c      Sun Dec 30 03:19:28 2001
2049 +++ bzip2-1.0.2.new/crctable.c  Fri Feb  1 04:19:11 2002
2050 @@ -58,6 +58,10 @@
2051    For more information on these sources, see the manual.
2052  --*/
2053  
2054 +#ifdef HAVE_CONFIG_H
2055 +#include <config.h>
2056 +#endif
2057 +
2058  
2059  #include "bzlib_private.h"
2060  
2061 diff -Nru bzip2-1.0.2/decompress.c bzip2-1.0.2.new/decompress.c
2062 --- bzip2-1.0.2/decompress.c    Sun Dec 30 21:45:53 2001
2063 +++ bzip2-1.0.2.new/decompress.c        Fri Feb  1 04:19:11 2002
2064 @@ -58,6 +58,10 @@
2065    For more information on these sources, see the manual.
2066  --*/
2067  
2068 +#ifdef HAVE_CONFIG_H
2069 +#include <config.h>
2070 +#endif
2071 +
2072  
2073  #include "bzlib_private.h"
2074  
2075 diff -Nru bzip2-1.0.2/dlltest.c bzip2-1.0.2.new/dlltest.c
2076 --- bzip2-1.0.2/dlltest.c       Sun Dec 30 20:44:07 2001
2077 +++ bzip2-1.0.2.new/dlltest.c   Fri Feb  1 04:19:11 2002
2078 @@ -8,6 +8,10 @@
2079     usage: minibz2 [-d] [-{1,2,..9}] [[srcfilename] destfilename]\r
2080  */\r
2081  \r
2082 +#ifdef HAVE_CONFIG_H
2083 +#include <config.h>
2084 +#endif
2085 +
2086  #define BZ_IMPORT\r
2087  #include <stdio.h>\r
2088  #include <stdlib.h>\r
2089 diff -Nru bzip2-1.0.2/doc/Makefile.am bzip2-1.0.2.new/doc/Makefile.am
2090 --- bzip2-1.0.2/doc/Makefile.am Thu Jan  1 01:00:00 1970
2091 +++ bzip2-1.0.2.new/doc/Makefile.am     Fri Feb  1 04:27:21 2002
2092 @@ -0,0 +1,6 @@
2093 +
2094 +SUBDIRS                = pl
2095 +
2096 +man_MANS       = bunzip2.1 bzcat.1 bzdiff.1 bzgrep.1 bzip2.1 \
2097 +                 bzip2recover.1 bzmore.1
2098 +#info_TEXINFOS = bzip2.texi
2099 diff -Nru bzip2-1.0.2/doc/bunzip2.1 bzip2-1.0.2.new/doc/bunzip2.1
2100 --- bzip2-1.0.2/doc/bunzip2.1   Thu Jan  1 01:00:00 1970
2101 +++ bzip2-1.0.2.new/doc/bunzip2.1       Fri Feb  1 04:19:11 2002
2102 @@ -0,0 +1 @@
2103 +.so bzip2.1
2104 \ No newline at end of file
2105 diff -Nru bzip2-1.0.2/doc/bzcat.1 bzip2-1.0.2.new/doc/bzcat.1
2106 --- bzip2-1.0.2/doc/bzcat.1     Thu Jan  1 01:00:00 1970
2107 +++ bzip2-1.0.2.new/doc/bzcat.1 Fri Feb  1 04:19:11 2002
2108 @@ -0,0 +1 @@
2109 +.so bzip2.1
2110 \ No newline at end of file
2111 diff -Nru bzip2-1.0.2/doc/bzdiff.1 bzip2-1.0.2.new/doc/bzdiff.1
2112 --- bzip2-1.0.2/doc/bzdiff.1    Thu Jan  1 01:00:00 1970
2113 +++ bzip2-1.0.2.new/doc/bzdiff.1        Sun Dec 30 03:12:35 2001
2114 @@ -0,0 +1,47 @@
2115 +\"Shamelessly copied from zmore.1 by Philippe Troin <phil@fifi.org>
2116 +\"for Debian GNU/Linux
2117 +.TH BZDIFF 1
2118 +.SH NAME
2119 +bzcmp, bzdiff \- compare bzip2 compressed files
2120 +.SH SYNOPSIS
2121 +.B bzcmp
2122 +[ cmp_options ] file1
2123 +[ file2 ]
2124 +.br
2125 +.B bzdiff
2126 +[ diff_options ] file1
2127 +[ file2 ]
2128 +.SH DESCRIPTION
2129 +.I  Bzcmp
2130 +and 
2131 +.I bzdiff
2132 +are used to invoke the
2133 +.I cmp
2134 +or the
2135 +.I diff
2136 +program on bzip2 compressed files.  All options specified are passed
2137 +directly to
2138 +.I cmp
2139 +or
2140 +.IR diff "."
2141 +If only 1 file is specified, then the files compared are
2142 +.I file1
2143 +and an uncompressed
2144 +.IR file1 ".bz2."
2145 +If two files are specified, then they are uncompressed if necessary and fed to
2146 +.I cmp
2147 +or
2148 +.IR diff "."
2149 +The exit status from 
2150 +.I cmp
2151 +or
2152 +.I diff
2153 +is preserved.
2154 +.SH "SEE ALSO"
2155 +cmp(1), diff(1), bzmore(1), bzless(1), bzgrep(1), bzip2(1)
2156 +.SH BUGS
2157 +Messages from the
2158 +.I cmp
2159 +or
2160 +.I diff
2161 +programs refer to temporary filenames instead of those specified.
2162 diff -Nru bzip2-1.0.2/doc/bzgrep.1 bzip2-1.0.2.new/doc/bzgrep.1
2163 --- bzip2-1.0.2/doc/bzgrep.1    Thu Jan  1 01:00:00 1970
2164 +++ bzip2-1.0.2.new/doc/bzgrep.1        Sun Dec 30 03:12:35 2001
2165 @@ -0,0 +1,56 @@
2166 +\"Shamelessly copied from zmore.1 by Philippe Troin <phil@fifi.org>
2167 +\"for Debian GNU/Linux
2168 +.TH BZGREP 1
2169 +.SH NAME
2170 +bzgrep, bzfgrep, bzegrep \- search possibly bzip2 compressed files for a regular expression
2171 +.SH SYNOPSIS
2172 +.B bzgrep
2173 +[ grep_options ]
2174 +.BI  [\ -e\ ] " pattern"
2175 +.IR filename ".\|.\|."
2176 +.br
2177 +.B bzegrep
2178 +[ egrep_options ]
2179 +.BI  [\ -e\ ] " pattern"
2180 +.IR filename ".\|.\|."
2181 +.br
2182 +.B bzfgrep
2183 +[ fgrep_options ]
2184 +.BI  [\ -e\ ] " pattern"
2185 +.IR filename ".\|.\|."
2186 +.SH DESCRIPTION
2187 +.IR  Bzgrep
2188 +is used to invoke the
2189 +.I grep
2190 +on bzip2-compressed files. All options specified are passed directly to
2191 +.I grep.
2192 +If no file is specified, then the standard input is decompressed
2193 +if necessary and fed to grep.
2194 +Otherwise the given files are uncompressed if necessary and fed to
2195 +.I grep.
2196 +.PP
2197 +If
2198 +.I bzgrep
2199 +is invoked as
2200 +.I bzegrep
2201 +or
2202 +.I bzfgrep
2203 +then
2204 +.I egrep
2205 +or
2206 +.I fgrep
2207 +is used instead of
2208 +.I grep.
2209 +If the GREP environment variable is set,
2210 +.I bzgrep
2211 +uses it as the
2212 +.I grep
2213 +program to be invoked. For example:
2214 +
2215 +    for sh:  GREP=fgrep  bzgrep string files
2216 +    for csh: (setenv GREP fgrep; bzgrep string files)
2217 +.SH AUTHOR
2218 +Charles Levert (charles@comm.polymtl.ca). Adapted to bzip2 by Philippe
2219 +Troin <phil@fifi.org> for Debian GNU/Linux.
2220 +.SH "SEE ALSO"
2221 +grep(1), egrep(1), fgrep(1), bzdiff(1), bzmore(1), bzless(1), bzip2(1)
2222 diff -Nru bzip2-1.0.2/doc/bzip2.1 bzip2-1.0.2.new/doc/bzip2.1
2223 --- bzip2-1.0.2/doc/bzip2.1     Thu Jan  1 01:00:00 1970
2224 +++ bzip2-1.0.2.new/doc/bzip2.1 Thu Jan  3 00:14:36 2002
2225 @@ -0,0 +1,453 @@
2226 +.PU
2227 +.TH bzip2 1
2228 +.SH NAME
2229 +bzip2, bunzip2 \- a block-sorting file compressor, v1.0.2
2230 +.br
2231 +bzcat \- decompresses files to stdout
2232 +.br
2233 +bzip2recover \- recovers data from damaged bzip2 files
2234 +
2235 +.SH SYNOPSIS
2236 +.ll +8
2237 +.B bzip2
2238 +.RB [ " \-cdfkqstvzVL123456789 " ]
2239 +[
2240 +.I "filenames \&..."
2241 +]
2242 +.ll -8
2243 +.br
2244 +.B bunzip2
2245 +.RB [ " \-fkvsVL " ]
2246 +[ 
2247 +.I "filenames \&..."
2248 +]
2249 +.br
2250 +.B bzcat
2251 +.RB [ " \-s " ]
2252 +[ 
2253 +.I "filenames \&..."
2254 +]
2255 +.br
2256 +.B bzip2recover
2257 +.I "filename"
2258 +
2259 +.SH DESCRIPTION
2260 +.I bzip2
2261 +compresses files using the Burrows-Wheeler block sorting
2262 +text compression algorithm, and Huffman coding.  Compression is
2263 +generally considerably better than that achieved by more conventional
2264 +LZ77/LZ78-based compressors, and approaches the performance of the PPM
2265 +family of statistical compressors.
2266 +
2267 +The command-line options are deliberately very similar to 
2268 +those of 
2269 +.I GNU gzip, 
2270 +but they are not identical.
2271 +
2272 +.I bzip2
2273 +expects a list of file names to accompany the
2274 +command-line flags.  Each file is replaced by a compressed version of
2275 +itself, with the name "original_name.bz2".  
2276 +Each compressed file
2277 +has the same modification date, permissions, and, when possible,
2278 +ownership as the corresponding original, so that these properties can
2279 +be correctly restored at decompression time.  File name handling is
2280 +naive in the sense that there is no mechanism for preserving original
2281 +file names, permissions, ownerships or dates in filesystems which lack
2282 +these concepts, or have serious file name length restrictions, such as
2283 +MS-DOS.
2284 +
2285 +.I bzip2
2286 +and
2287 +.I bunzip2
2288 +will by default not overwrite existing
2289 +files.  If you want this to happen, specify the \-f flag.
2290 +
2291 +If no file names are specified,
2292 +.I bzip2
2293 +compresses from standard
2294 +input to standard output.  In this case,
2295 +.I bzip2
2296 +will decline to
2297 +write compressed output to a terminal, as this would be entirely
2298 +incomprehensible and therefore pointless.
2299 +
2300 +.I bunzip2
2301 +(or
2302 +.I bzip2 \-d) 
2303 +decompresses all
2304 +specified files.  Files which were not created by 
2305 +.I bzip2
2306 +will be detected and ignored, and a warning issued.  
2307 +.I bzip2
2308 +attempts to guess the filename for the decompressed file 
2309 +from that of the compressed file as follows:
2310 +
2311 +       filename.bz2    becomes   filename
2312 +       filename.bz     becomes   filename
2313 +       filename.tbz2   becomes   filename.tar
2314 +       filename.tbz    becomes   filename.tar
2315 +       anyothername    becomes   anyothername.out
2316 +
2317 +If the file does not end in one of the recognised endings, 
2318 +.I .bz2, 
2319 +.I .bz, 
2320 +.I .tbz2
2321 +or
2322 +.I .tbz, 
2323 +.I bzip2 
2324 +complains that it cannot
2325 +guess the name of the original file, and uses the original name
2326 +with
2327 +.I .out
2328 +appended.
2329 +
2330 +As with compression, supplying no
2331 +filenames causes decompression from 
2332 +standard input to standard output.
2333 +
2334 +.I bunzip2 
2335 +will correctly decompress a file which is the
2336 +concatenation of two or more compressed files.  The result is the
2337 +concatenation of the corresponding uncompressed files.  Integrity
2338 +testing (\-t) 
2339 +of concatenated 
2340 +compressed files is also supported.
2341 +
2342 +You can also compress or decompress files to the standard output by
2343 +giving the \-c flag.  Multiple files may be compressed and
2344 +decompressed like this.  The resulting outputs are fed sequentially to
2345 +stdout.  Compression of multiple files 
2346 +in this manner generates a stream
2347 +containing multiple compressed file representations.  Such a stream
2348 +can be decompressed correctly only by
2349 +.I bzip2 
2350 +version 0.9.0 or
2351 +later.  Earlier versions of
2352 +.I bzip2
2353 +will stop after decompressing
2354 +the first file in the stream.
2355 +
2356 +.I bzcat
2357 +(or
2358 +.I bzip2 -dc) 
2359 +decompresses all specified files to
2360 +the standard output.
2361 +
2362 +.I bzip2
2363 +will read arguments from the environment variables
2364 +.I BZIP2
2365 +and
2366 +.I BZIP,
2367 +in that order, and will process them
2368 +before any arguments read from the command line.  This gives a 
2369 +convenient way to supply default arguments.
2370 +
2371 +Compression is always performed, even if the compressed 
2372 +file is slightly
2373 +larger than the original.  Files of less than about one hundred bytes
2374 +tend to get larger, since the compression mechanism has a constant
2375 +overhead in the region of 50 bytes.  Random data (including the output
2376 +of most file compressors) is coded at about 8.05 bits per byte, giving
2377 +an expansion of around 0.5%.
2378 +
2379 +As a self-check for your protection, 
2380 +.I 
2381 +bzip2
2382 +uses 32-bit CRCs to
2383 +make sure that the decompressed version of a file is identical to the
2384 +original.  This guards against corruption of the compressed data, and
2385 +against undetected bugs in
2386 +.I bzip2
2387 +(hopefully very unlikely).  The
2388 +chances of data corruption going undetected is microscopic, about one
2389 +chance in four billion for each file processed.  Be aware, though, that
2390 +the check occurs upon decompression, so it can only tell you that
2391 +something is wrong.  It can't help you 
2392 +recover the original uncompressed
2393 +data.  You can use 
2394 +.I bzip2recover
2395 +to try to recover data from
2396 +damaged files.
2397 +
2398 +Return values: 0 for a normal exit, 1 for environmental problems (file
2399 +not found, invalid flags, I/O errors, &c), 2 to indicate a corrupt
2400 +compressed file, 3 for an internal consistency error (eg, bug) which
2401 +caused
2402 +.I bzip2
2403 +to panic.
2404 +
2405 +.SH OPTIONS
2406 +.TP
2407 +.B \-c --stdout
2408 +Compress or decompress to standard output.
2409 +.TP
2410 +.B \-d --decompress
2411 +Force decompression.  
2412 +.I bzip2, 
2413 +.I bunzip2 
2414 +and
2415 +.I bzcat 
2416 +are
2417 +really the same program, and the decision about what actions to take is
2418 +done on the basis of which name is used.  This flag overrides that
2419 +mechanism, and forces 
2420 +.I bzip2
2421 +to decompress.
2422 +.TP
2423 +.B \-z --compress
2424 +The complement to \-d: forces compression, regardless of the
2425 +invocation name.
2426 +.TP
2427 +.B \-t --test
2428 +Check integrity of the specified file(s), but don't decompress them.
2429 +This really performs a trial decompression and throws away the result.
2430 +.TP
2431 +.B \-f --force
2432 +Force overwrite of output files.  Normally,
2433 +.I bzip2 
2434 +will not overwrite
2435 +existing output files.  Also forces 
2436 +.I bzip2 
2437 +to break hard links
2438 +to files, which it otherwise wouldn't do.
2439 +
2440 +bzip2 normally declines to decompress files which don't have the
2441 +correct magic header bytes.  If forced (-f), however, it will pass
2442 +such files through unmodified.  This is how GNU gzip behaves.
2443 +.TP
2444 +.B \-k --keep
2445 +Keep (don't delete) input files during compression
2446 +or decompression.
2447 +.TP
2448 +.B \-s --small
2449 +Reduce memory usage, for compression, decompression and testing.  Files
2450 +are decompressed and tested using a modified algorithm which only
2451 +requires 2.5 bytes per block byte.  This means any file can be
2452 +decompressed in 2300k of memory, albeit at about half the normal speed.
2453 +
2454 +During compression, \-s selects a block size of 200k, which limits
2455 +memory use to around the same figure, at the expense of your compression
2456 +ratio.  In short, if your machine is low on memory (8 megabytes or
2457 +less), use \-s for everything.  See MEMORY MANAGEMENT below.
2458 +.TP
2459 +.B \-q --quiet
2460 +Suppress non-essential warning messages.  Messages pertaining to
2461 +I/O errors and other critical events will not be suppressed.
2462 +.TP
2463 +.B \-v --verbose
2464 +Verbose mode -- show the compression ratio for each file processed.
2465 +Further \-v's increase the verbosity level, spewing out lots of
2466 +information which is primarily of interest for diagnostic purposes.
2467 +.TP
2468 +.B \-L --license -V --version
2469 +Display the software version, license terms and conditions.
2470 +.TP
2471 +.B \-1 (or \-\-fast) to \-9 (or \-\-best)
2472 +Set the block size to 100 k, 200 k ..  900 k when compressing.  Has no
2473 +effect when decompressing.  See MEMORY MANAGEMENT below.
2474 +The \-\-fast and \-\-best aliases are primarily for GNU gzip 
2475 +compatibility.  In particular, \-\-fast doesn't make things
2476 +significantly faster.  
2477 +And \-\-best merely selects the default behaviour.
2478 +.TP
2479 +.B \--
2480 +Treats all subsequent arguments as file names, even if they start
2481 +with a dash.  This is so you can handle files with names beginning
2482 +with a dash, for example: bzip2 \-- \-myfilename.
2483 +.TP
2484 +.B \--repetitive-fast --repetitive-best
2485 +These flags are redundant in versions 0.9.5 and above.  They provided
2486 +some coarse control over the behaviour of the sorting algorithm in
2487 +earlier versions, which was sometimes useful.  0.9.5 and above have an
2488 +improved algorithm which renders these flags irrelevant.
2489 +
2490 +.SH MEMORY MANAGEMENT
2491 +.I bzip2 
2492 +compresses large files in blocks.  The block size affects
2493 +both the compression ratio achieved, and the amount of memory needed for
2494 +compression and decompression.  The flags \-1 through \-9
2495 +specify the block size to be 100,000 bytes through 900,000 bytes (the
2496 +default) respectively.  At decompression time, the block size used for
2497 +compression is read from the header of the compressed file, and
2498 +.I bunzip2
2499 +then allocates itself just enough memory to decompress
2500 +the file.  Since block sizes are stored in compressed files, it follows
2501 +that the flags \-1 to \-9 are irrelevant to and so ignored
2502 +during decompression.
2503 +
2504 +Compression and decompression requirements, 
2505 +in bytes, can be estimated as:
2506 +
2507 +       Compression:   400k + ( 8 x block size )
2508 +
2509 +       Decompression: 100k + ( 4 x block size ), or
2510 +                      100k + ( 2.5 x block size )
2511 +
2512 +Larger block sizes give rapidly diminishing marginal returns.  Most of
2513 +the compression comes from the first two or three hundred k of block
2514 +size, a fact worth bearing in mind when using
2515 +.I bzip2
2516 +on small machines.
2517 +It is also important to appreciate that the decompression memory
2518 +requirement is set at compression time by the choice of block size.
2519 +
2520 +For files compressed with the default 900k block size,
2521 +.I bunzip2
2522 +will require about 3700 kbytes to decompress.  To support decompression
2523 +of any file on a 4 megabyte machine, 
2524 +.I bunzip2
2525 +has an option to
2526 +decompress using approximately half this amount of memory, about 2300
2527 +kbytes.  Decompression speed is also halved, so you should use this
2528 +option only where necessary.  The relevant flag is -s.
2529 +
2530 +In general, try and use the largest block size memory constraints allow,
2531 +since that maximises the compression achieved.  Compression and
2532 +decompression speed are virtually unaffected by block size.
2533 +
2534 +Another significant point applies to files which fit in a single block
2535 +-- that means most files you'd encounter using a large block size.  The
2536 +amount of real memory touched is proportional to the size of the file,
2537 +since the file is smaller than a block.  For example, compressing a file
2538 +20,000 bytes long with the flag -9 will cause the compressor to
2539 +allocate around 7600k of memory, but only touch 400k + 20000 * 8 = 560
2540 +kbytes of it.  Similarly, the decompressor will allocate 3700k but only
2541 +touch 100k + 20000 * 4 = 180 kbytes.
2542 +
2543 +Here is a table which summarises the maximum memory usage for different
2544 +block sizes.  Also recorded is the total compressed size for 14 files of
2545 +the Calgary Text Compression Corpus totalling 3,141,622 bytes.  This
2546 +column gives some feel for how compression varies with block size.
2547 +These figures tend to understate the advantage of larger block sizes for
2548 +larger files, since the Corpus is dominated by smaller files.
2549 +
2550 +           Compress   Decompress   Decompress   Corpus
2551 +    Flag     usage      usage       -s usage     Size
2552 +
2553 +     -1      1200k       500k         350k      914704
2554 +     -2      2000k       900k         600k      877703
2555 +     -3      2800k      1300k         850k      860338
2556 +     -4      3600k      1700k        1100k      846899
2557 +     -5      4400k      2100k        1350k      845160
2558 +     -6      5200k      2500k        1600k      838626
2559 +     -7      6100k      2900k        1850k      834096
2560 +     -8      6800k      3300k        2100k      828642
2561 +     -9      7600k      3700k        2350k      828642
2562 +
2563 +.SH RECOVERING DATA FROM DAMAGED FILES
2564 +.I bzip2
2565 +compresses files in blocks, usually 900kbytes long.  Each
2566 +block is handled independently.  If a media or transmission error causes
2567 +a multi-block .bz2
2568 +file to become damaged, it may be possible to
2569 +recover data from the undamaged blocks in the file.
2570 +
2571 +The compressed representation of each block is delimited by a 48-bit
2572 +pattern, which makes it possible to find the block boundaries with
2573 +reasonable certainty.  Each block also carries its own 32-bit CRC, so
2574 +damaged blocks can be distinguished from undamaged ones.
2575 +
2576 +.I bzip2recover
2577 +is a simple program whose purpose is to search for
2578 +blocks in .bz2 files, and write each block out into its own .bz2 
2579 +file.  You can then use
2580 +.I bzip2 
2581 +\-t
2582 +to test the
2583 +integrity of the resulting files, and decompress those which are
2584 +undamaged.
2585 +
2586 +.I bzip2recover
2587 +takes a single argument, the name of the damaged file, 
2588 +and writes a number of files "rec00001file.bz2",
2589 +"rec00002file.bz2", etc, containing the  extracted  blocks.
2590 +The  output  filenames  are  designed  so  that the use of
2591 +wildcards in subsequent processing -- for example,  
2592 +"bzip2 -dc  rec*file.bz2 > recovered_data" -- processes the files in
2593 +the correct order.
2594 +
2595 +.I bzip2recover
2596 +should be of most use dealing with large .bz2
2597 +files,  as  these will contain many blocks.  It is clearly
2598 +futile to use it on damaged single-block  files,  since  a
2599 +damaged  block  cannot  be recovered.  If you wish to minimise 
2600 +any potential data loss through media  or  transmission errors, 
2601 +you might consider compressing with a smaller
2602 +block size.
2603 +
2604 +.SH PERFORMANCE NOTES
2605 +The sorting phase of compression gathers together similar strings in the
2606 +file.  Because of this, files containing very long runs of repeated
2607 +symbols, like "aabaabaabaab ..."  (repeated several hundred times) may
2608 +compress more slowly than normal.  Versions 0.9.5 and above fare much
2609 +better than previous versions in this respect.  The ratio between
2610 +worst-case and average-case compression time is in the region of 10:1.
2611 +For previous versions, this figure was more like 100:1.  You can use the
2612 +\-vvvv option to monitor progress in great detail, if you want.
2613 +
2614 +Decompression speed is unaffected by these phenomena.
2615 +
2616 +.I bzip2
2617 +usually allocates several megabytes of memory to operate
2618 +in, and then charges all over it in a fairly random fashion.  This means
2619 +that performance, both for compressing and decompressing, is largely
2620 +determined by the speed at which your machine can service cache misses.
2621 +Because of this, small changes to the code to reduce the miss rate have
2622 +been observed to give disproportionately large performance improvements.
2623 +I imagine 
2624 +.I bzip2
2625 +will perform best on machines with very large caches.
2626 +
2627 +.SH CAVEATS
2628 +I/O error messages are not as helpful as they could be.
2629 +.I bzip2
2630 +tries hard to detect I/O errors and exit cleanly, but the details of
2631 +what the problem is sometimes seem rather misleading.
2632 +
2633 +This manual page pertains to version 1.0.2 of
2634 +.I bzip2.  
2635 +Compressed data created by this version is entirely forwards and
2636 +backwards compatible with the previous public releases, versions
2637 +0.1pl2, 0.9.0, 0.9.5, 1.0.0 and 1.0.1, but with the following
2638 +exception: 0.9.0 and above can correctly decompress multiple
2639 +concatenated compressed files.  0.1pl2 cannot do this; it will stop
2640 +after decompressing just the first file in the stream.
2641 +
2642 +.I bzip2recover
2643 +versions prior to this one, 1.0.2, used 32-bit integers to represent
2644 +bit positions in compressed files, so it could not handle compressed
2645 +files more than 512 megabytes long.  Version 1.0.2 and above uses
2646 +64-bit ints on some platforms which support them (GNU supported
2647 +targets, and Windows).  To establish whether or not bzip2recover was
2648 +built with such a limitation, run it without arguments.  In any event
2649 +you can build yourself an unlimited version if you can recompile it
2650 +with MaybeUInt64 set to be an unsigned 64-bit integer.
2651 +
2652 +
2653 +
2654 +.SH AUTHOR
2655 +Julian Seward, jseward@acm.org.
2656 +
2657 +http://sources.redhat.com/bzip2
2658 +
2659 +The ideas embodied in
2660 +.I bzip2
2661 +are due to (at least) the following
2662 +people: Michael Burrows and David Wheeler (for the block sorting
2663 +transformation), David Wheeler (again, for the Huffman coder), Peter
2664 +Fenwick (for the structured coding model in the original
2665 +.I bzip,
2666 +and many refinements), and Alistair Moffat, Radford Neal and Ian Witten
2667 +(for the arithmetic coder in the original
2668 +.I bzip).  
2669 +I am much
2670 +indebted for their help, support and advice.  See the manual in the
2671 +source distribution for pointers to sources of documentation.  Christian
2672 +von Roques encouraged me to look for faster sorting algorithms, so as to
2673 +speed up compression.  Bela Lubkin encouraged me to improve the
2674 +worst-case compression performance.  
2675 +The bz* scripts are derived from those of GNU gzip.
2676 +Many people sent patches, helped
2677 +with portability problems, lent machines, gave advice and were generally
2678 +helpful.
2679 diff -Nru bzip2-1.0.2/doc/bzip2.texi bzip2-1.0.2.new/doc/bzip2.texi
2680 --- bzip2-1.0.2/doc/bzip2.texi  Thu Jan  1 01:00:00 1970
2681 +++ bzip2-1.0.2.new/doc/bzip2.texi      Fri Feb  1 04:26:21 2002
2682 @@ -0,0 +1,2234 @@
2683 +\input texinfo  @c                                  -*- Texinfo -*-
2684 +@setfilename bzip2.info
2685 +
2686 +@ignore
2687 +This file documents bzip2 version 1.0.2, and associated library
2688 +libbzip2, written by Julian Seward (jseward@acm.org).
2689 +
2690 +Copyright (C) 1996-2002 Julian R Seward
2691 +
2692 +Permission is granted to make and distribute verbatim copies of
2693 +this manual provided the copyright notice and this permission notice
2694 +are preserved on all copies.
2695 +
2696 +Permission is granted to copy and distribute translations of this manual
2697 +into another language, under the above conditions for verbatim copies.
2698 +@end ignore
2699 +
2700 +@iftex
2701 +@c @finalout
2702 +@settitle bzip2 and libbzip2
2703 +@titlepage
2704 +@title bzip2 and libbzip2
2705 +@subtitle a program and library for data compression
2706 +@subtitle copyright (C) 1996-2002 Julian Seward
2707 +@subtitle version 1.0.2 of 30 December 2001
2708 +@author Julian Seward
2709 +
2710 +@end titlepage
2711 +
2712 +@parindent 0mm
2713 +@parskip 2mm
2714 +
2715 +@end iftex
2716 +@node Top,,, (dir)
2717 +
2718 +The following text is the License for this software.  You should
2719 +find it identical to that contained in the file LICENSE in the 
2720 +source distribution.
2721 +
2722 +------------------ START OF THE LICENSE ------------------
2723 +
2724 +This program, @code{bzip2}, 
2725 +and associated library @code{libbzip2}, are
2726 +Copyright (C) 1996-2002 Julian R Seward.  All rights reserved.
2727 +
2728 +Redistribution and use in source and binary forms, with or without
2729 +modification, are permitted provided that the following conditions
2730 +are met:
2731 +@itemize @bullet
2732 +@item
2733 +   Redistributions of source code must retain the above copyright
2734 +   notice, this list of conditions and the following disclaimer.
2735 +@item
2736 +   The origin of this software must not be misrepresented; you must 
2737 +   not claim that you wrote the original software.  If you use this 
2738 +   software in a product, an acknowledgment in the product 
2739 +   documentation would be appreciated but is not required.
2740 +@item
2741 +   Altered source versions must be plainly marked as such, and must
2742 +   not be misrepresented as being the original software.
2743 +@item
2744 +   The name of the author may not be used to endorse or promote 
2745 +   products derived from this software without specific prior written 
2746 +   permission.
2747 +@end itemize
2748 +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
2749 +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2750 +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2751 +ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
2752 +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2753 +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
2754 +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2755 +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
2756 +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
2757 +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2758 +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2759 +
2760 +Julian Seward, Cambridge, UK.
2761 +
2762 +@code{jseward@@acm.org}
2763 +
2764 +@code{bzip2}/@code{libbzip2} version 1.0.2 of 30 December 2001.
2765 +
2766 +------------------ END OF THE LICENSE ------------------
2767 +
2768 +Web sites:
2769 +
2770 +@code{http://sources.redhat.com/bzip2}
2771 +
2772 +@code{http://www.cacheprof.org}
2773 +
2774 +PATENTS: To the best of my knowledge, @code{bzip2} does not use any patented
2775 +algorithms.  However, I do not have the resources available to carry out
2776 +a full patent search.  Therefore I cannot give any guarantee of the
2777 +above statement.
2778 +
2779 +
2780 +
2781 +
2782 +
2783 +
2784 +
2785 +@chapter Introduction
2786 +
2787 +@code{bzip2}  compresses  files  using the Burrows-Wheeler 
2788 +block-sorting text compression algorithm,  and  Huffman  coding.
2789 +Compression  is  generally  considerably  better than that
2790 +achieved by more conventional LZ77/LZ78-based compressors,
2791 +and  approaches  the performance of the PPM family of statistical compressors.
2792 +
2793 +@code{bzip2} is built on top of @code{libbzip2}, a flexible library
2794 +for handling compressed data in the @code{bzip2} format.  This manual
2795 +describes both how to use the program and 
2796 +how to work with the library interface.  Most of the
2797 +manual is devoted to this library, not the program, 
2798 +which is good news if your interest is only in the program.
2799 +
2800 +Chapter 2 describes how to use @code{bzip2}; this is the only part 
2801 +you need to read if you just want to know how to operate the program.
2802 +Chapter 3 describes the programming interfaces in detail, and
2803 +Chapter 4 records some miscellaneous notes which I thought
2804 +ought to be recorded somewhere.
2805 +
2806 +
2807 +@chapter How to use @code{bzip2}
2808 +
2809 +This chapter contains a copy of the @code{bzip2} man page,
2810 +and nothing else.
2811 +
2812 +@quotation
2813 +
2814 +@unnumberedsubsubsec NAME
2815 +@itemize
2816 +@item @code{bzip2}, @code{bunzip2}
2817 +- a block-sorting file compressor, v1.0.2
2818 +@item @code{bzcat} 
2819 +- decompresses files to stdout
2820 +@item @code{bzip2recover}
2821 +- recovers data from damaged bzip2 files
2822 +@end itemize
2823 +
2824 +@unnumberedsubsubsec SYNOPSIS
2825 +@itemize
2826 +@item @code{bzip2} [ -cdfkqstvzVL123456789 ] [ filenames ...  ]
2827 +@item @code{bunzip2} [ -fkvsVL ] [ filenames ...  ]
2828 +@item @code{bzcat} [ -s ] [ filenames ...  ]
2829 +@item @code{bzip2recover} filename
2830 +@end itemize
2831 +
2832 +@unnumberedsubsubsec DESCRIPTION
2833 +
2834 +@code{bzip2} compresses files using the Burrows-Wheeler block sorting
2835 +text compression algorithm, and Huffman coding.  Compression is
2836 +generally considerably better than that achieved by more conventional
2837 +LZ77/LZ78-based compressors, and approaches the performance of the PPM
2838 +family of statistical compressors.
2839 +
2840 +The command-line options are deliberately very similar to those of GNU
2841 +@code{gzip}, but they are not identical.
2842 +
2843 +@code{bzip2} expects a list of file names to accompany the command-line
2844 +flags.  Each file is replaced by a compressed version of itself, with
2845 +the name @code{original_name.bz2}.  Each compressed file has the same
2846 +modification date, permissions, and, when possible, ownership as the
2847 +corresponding original, so that these properties can be correctly
2848 +restored at decompression time.  File name handling is naive in the
2849 +sense that there is no mechanism for preserving original file names,
2850 +permissions, ownerships or dates in filesystems which lack these
2851 +concepts, or have serious file name length restrictions, such as MS-DOS.
2852 +
2853 +@code{bzip2} and @code{bunzip2} will by default not overwrite existing
2854 +files.  If you want this to happen, specify the @code{-f} flag.
2855 +
2856 +If no file names are specified, @code{bzip2} compresses from standard
2857 +input to standard output.  In this case, @code{bzip2} will decline to
2858 +write compressed output to a terminal, as this would be entirely
2859 +incomprehensible and therefore pointless.
2860 +
2861 +@code{bunzip2} (or @code{bzip2 -d}) decompresses all
2862 +specified files.  Files which were not created by @code{bzip2}
2863 +will be detected and ignored, and a warning issued.  
2864 +@code{bzip2} attempts to guess the filename for the decompressed file 
2865 +from that of the compressed file as follows:
2866 +@itemize
2867 +@item @code{filename.bz2 } becomes @code{filename}
2868 +@item @code{filename.bz  } becomes @code{filename}
2869 +@item @code{filename.tbz2} becomes @code{filename.tar}
2870 +@item @code{filename.tbz } becomes @code{filename.tar}
2871 +@item @code{anyothername } becomes @code{anyothername.out}
2872 +@end itemize
2873 +If the file does not end in one of the recognised endings, 
2874 +@code{.bz2}, @code{.bz}, 
2875 +@code{.tbz2} or @code{.tbz}, @code{bzip2} complains that it cannot
2876 +guess the name of the original file, and uses the original name
2877 +with @code{.out} appended.
2878 +
2879 +As with compression, supplying no
2880 +filenames causes decompression from standard input to standard output.
2881 +
2882 +@code{bunzip2} will correctly decompress a file which is the
2883 +concatenation of two or more compressed files.  The result is the
2884 +concatenation of the corresponding uncompressed files.  Integrity
2885 +testing (@code{-t}) of concatenated compressed files is also supported.
2886 +
2887 +You can also compress or decompress files to the standard output by
2888 +giving the @code{-c} flag.  Multiple files may be compressed and
2889 +decompressed like this.  The resulting outputs are fed sequentially to
2890 +stdout.  Compression of multiple files in this manner generates a stream
2891 +containing multiple compressed file representations.  Such a stream
2892 +can be decompressed correctly only by @code{bzip2} version 0.9.0 or
2893 +later.  Earlier versions of @code{bzip2} will stop after decompressing
2894 +the first file in the stream.
2895 +
2896 +@code{bzcat} (or @code{bzip2 -dc}) decompresses all specified files to
2897 +the standard output.
2898 +
2899 +@code{bzip2} will read arguments from the environment variables
2900 +@code{BZIP2} and @code{BZIP}, in that order, and will process them
2901 +before any arguments read from the command line.  This gives a 
2902 +convenient way to supply default arguments.
2903 +
2904 +Compression is always performed, even if the compressed file is slightly
2905 +larger than the original.  Files of less than about one hundred bytes
2906 +tend to get larger, since the compression mechanism has a constant
2907 +overhead in the region of 50 bytes.  Random data (including the output
2908 +of most file compressors) is coded at about 8.05 bits per byte, giving
2909 +an expansion of around 0.5%.
2910 +
2911 +As a self-check for your protection, @code{bzip2} uses 32-bit CRCs to
2912 +make sure that the decompressed version of a file is identical to the
2913 +original.  This guards against corruption of the compressed data, and
2914 +against undetected bugs in @code{bzip2} (hopefully very unlikely).  The
2915 +chances of data corruption going undetected is microscopic, about one
2916 +chance in four billion for each file processed.  Be aware, though, that
2917 +the check occurs upon decompression, so it can only tell you that
2918 +something is wrong.  It can't help you recover the original uncompressed
2919 +data.  You can use @code{bzip2recover} to try to recover data from
2920 +damaged files.
2921 +
2922 +Return values: 0 for a normal exit, 1 for environmental problems (file
2923 +not found, invalid flags, I/O errors, &c), 2 to indicate a corrupt
2924 +compressed file, 3 for an internal consistency error (eg, bug) which
2925 +caused @code{bzip2} to panic.
2926 +
2927 +
2928 +@unnumberedsubsubsec OPTIONS
2929 +@table @code
2930 +@item -c  --stdout
2931 +Compress or decompress to standard output.
2932 +@item -d  --decompress
2933 +Force decompression.  @code{bzip2}, @code{bunzip2} and @code{bzcat} are
2934 +really the same program, and the decision about what actions to take is
2935 +done on the basis of which name is used.  This flag overrides that
2936 +mechanism, and forces bzip2 to decompress.
2937 +@item -z --compress
2938 +The complement to @code{-d}: forces compression, regardless of the
2939 +invokation name.
2940 +@item -t --test
2941 +Check integrity of the specified file(s), but don't decompress them.
2942 +This really performs a trial decompression and throws away the result.
2943 +@item -f --force
2944 +Force overwrite of output files.  Normally, @code{bzip2} will not overwrite
2945 +existing output files.  Also forces @code{bzip2} to break hard links
2946 +to files, which it otherwise wouldn't do.
2947 +
2948 +@code{bzip2} normally declines to decompress files which don't have the
2949 +correct magic header bytes.  If forced (@code{-f}), however, it will
2950 +pass such files through unmodified.  This is how GNU @code{gzip}
2951 +behaves.
2952 +@item -k --keep
2953 +Keep (don't delete) input files during compression
2954 +or decompression.
2955 +@item -s --small
2956 +Reduce memory usage, for compression, decompression and testing.  Files
2957 +are decompressed and tested using a modified algorithm which only
2958 +requires 2.5 bytes per block byte.  This means any file can be
2959 +decompressed in 2300k of memory, albeit at about half the normal speed.
2960 +
2961 +During compression, @code{-s} selects a block size of 200k, which limits
2962 +memory use to around the same figure, at the expense of your compression
2963 +ratio.  In short, if your machine is low on memory (8 megabytes or
2964 +less), use -s for everything.  See MEMORY MANAGEMENT below.
2965 +@item -q --quiet
2966 +Suppress non-essential warning messages.  Messages pertaining to
2967 +I/O errors and other critical events will not be suppressed.
2968 +@item -v --verbose
2969 +Verbose mode -- show the compression ratio for each file processed.
2970 +Further @code{-v}'s increase the verbosity level, spewing out lots of
2971 +information which is primarily of interest for diagnostic purposes.
2972 +@item -L --license -V --version
2973 +Display the software version, license terms and conditions.
2974 +@item -1 (or --fast) to -9 (or --best)
2975 +Set the block size to 100 k, 200 k ..  900 k when compressing.  Has no
2976 +effect when decompressing.  See MEMORY MANAGEMENT below.
2977 +The @code{--fast} and @code{--best} aliases are primarily for GNU
2978 +@code{gzip} compatibility.  In particular, @code{--fast} doesn't make
2979 +things significantly faster.  And @code{--best} merely selects the
2980 +default behaviour.
2981 +@item --
2982 +Treats all subsequent arguments as file names, even if they start
2983 +with a dash.  This is so you can handle files with names beginning
2984 +with a dash, for example: @code{bzip2 -- -myfilename}.
2985 +@item --repetitive-fast 
2986 +@item --repetitive-best
2987 +These flags are redundant in versions 0.9.5 and above.  They provided
2988 +some coarse control over the behaviour of the sorting algorithm in
2989 +earlier versions, which was sometimes useful.  0.9.5 and above have an
2990 +improved algorithm which renders these flags irrelevant.
2991 +@end table
2992 +
2993 +
2994 +@unnumberedsubsubsec MEMORY MANAGEMENT
2995 +
2996 +@code{bzip2} compresses large files in blocks.  The block size affects
2997 +both the compression ratio achieved, and the amount of memory needed for
2998 +compression and decompression.  The flags @code{-1} through @code{-9}
2999 +specify the block size to be 100,000 bytes through 900,000 bytes (the
3000 +default) respectively.  At decompression time, the block size used for
3001 +compression is read from the header of the compressed file, and
3002 +@code{bunzip2} then allocates itself just enough memory to decompress
3003 +the file.  Since block sizes are stored in compressed files, it follows
3004 +that the flags @code{-1} to @code{-9} are irrelevant to and so ignored
3005 +during decompression.
3006 +
3007 +Compression and decompression requirements, in bytes, can be estimated
3008 +as:
3009 +@example
3010 +     Compression:   400k + ( 8 x block size )
3011 +
3012 +     Decompression: 100k + ( 4 x block size ), or
3013 +                    100k + ( 2.5 x block size )
3014 +@end example
3015 +Larger block sizes give rapidly diminishing marginal returns.  Most of
3016 +the compression comes from the first two or three hundred k of block
3017 +size, a fact worth bearing in mind when using @code{bzip2} on small machines.
3018 +It is also important to appreciate that the decompression memory
3019 +requirement is set at compression time by the choice of block size.
3020 +
3021 +For files compressed with the default 900k block size, @code{bunzip2}
3022 +will require about 3700 kbytes to decompress.  To support decompression
3023 +of any file on a 4 megabyte machine, @code{bunzip2} has an option to
3024 +decompress using approximately half this amount of memory, about 2300
3025 +kbytes.  Decompression speed is also halved, so you should use this
3026 +option only where necessary.  The relevant flag is @code{-s}.
3027 +
3028 +In general, try and use the largest block size memory constraints allow,
3029 +since that maximises the compression achieved.  Compression and
3030 +decompression speed are virtually unaffected by block size.
3031 +
3032 +Another significant point applies to files which fit in a single block
3033 +-- that means most files you'd encounter using a large block size.  The
3034 +amount of real memory touched is proportional to the size of the file,
3035 +since the file is smaller than a block.  For example, compressing a file
3036 +20,000 bytes long with the flag @code{-9} will cause the compressor to
3037 +allocate around 7600k of memory, but only touch 400k + 20000 * 8 = 560
3038 +kbytes of it.  Similarly, the decompressor will allocate 3700k but only
3039 +touch 100k + 20000 * 4 = 180 kbytes.
3040 +
3041 +Here is a table which summarises the maximum memory usage for different
3042 +block sizes.  Also recorded is the total compressed size for 14 files of
3043 +the Calgary Text Compression Corpus totalling 3,141,622 bytes.  This
3044 +column gives some feel for how compression varies with block size.
3045 +These figures tend to understate the advantage of larger block sizes for
3046 +larger files, since the Corpus is dominated by smaller files.
3047 +@example
3048 +          Compress   Decompress   Decompress   Corpus
3049 +   Flag     usage      usage       -s usage     Size
3050 +
3051 +    -1      1200k       500k         350k      914704
3052 +    -2      2000k       900k         600k      877703
3053 +    -3      2800k      1300k         850k      860338
3054 +    -4      3600k      1700k        1100k      846899
3055 +    -5      4400k      2100k        1350k      845160
3056 +    -6      5200k      2500k        1600k      838626
3057 +    -7      6100k      2900k        1850k      834096
3058 +    -8      6800k      3300k        2100k      828642
3059 +    -9      7600k      3700k        2350k      828642
3060 +@end example
3061 +
3062 +@unnumberedsubsubsec RECOVERING DATA FROM DAMAGED FILES
3063 +
3064 +@code{bzip2} compresses files in blocks, usually 900kbytes long.  Each
3065 +block is handled independently.  If a media or transmission error causes
3066 +a multi-block @code{.bz2} file to become damaged, it may be possible to
3067 +recover data from the undamaged blocks in the file.
3068 +
3069 +The compressed representation of each block is delimited by a 48-bit
3070 +pattern, which makes it possible to find the block boundaries with
3071 +reasonable certainty.  Each block also carries its own 32-bit CRC, so
3072 +damaged blocks can be distinguished from undamaged ones.
3073 +
3074 +@code{bzip2recover} is a simple program whose purpose is to search for
3075 +blocks in @code{.bz2} files, and write each block out into its own
3076 +@code{.bz2} file.  You can then use @code{bzip2 -t} to test the
3077 +integrity of the resulting files, and decompress those which are
3078 +undamaged.
3079 +
3080 +@code{bzip2recover} 
3081 +takes a single argument, the name of the damaged file, and writes a
3082 +number of files @code{rec00001file.bz2}, @code{rec00002file.bz2}, etc,
3083 +containing the extracted blocks.  The output filenames are designed so
3084 +that the use of wildcards in subsequent processing -- for example,
3085 +@code{bzip2 -dc rec*file.bz2 > recovered_data} -- processes the files in
3086 +the correct order.
3087 +
3088 +@code{bzip2recover} should be of most use dealing with large @code{.bz2}
3089 +files, as these will contain many blocks.  It is clearly futile to use
3090 +it on damaged single-block files, since a damaged block cannot be
3091 +recovered.  If you wish to minimise any potential data loss through
3092 +media or transmission errors, you might consider compressing with a
3093 +smaller block size.
3094 +
3095 +
3096 +@unnumberedsubsubsec PERFORMANCE NOTES
3097 +
3098 +The sorting phase of compression gathers together similar strings in the
3099 +file.  Because of this, files containing very long runs of repeated
3100 +symbols, like "aabaabaabaab ..."  (repeated several hundred times) may
3101 +compress more slowly than normal.  Versions 0.9.5 and above fare much
3102 +better than previous versions in this respect.  The ratio between
3103 +worst-case and average-case compression time is in the region of 10:1.
3104 +For previous versions, this figure was more like 100:1.  You can use the
3105 +@code{-vvvv} option to monitor progress in great detail, if you want.
3106 +
3107 +Decompression speed is unaffected by these phenomena.
3108 +
3109 +@code{bzip2} usually allocates several megabytes of memory to operate
3110 +in, and then charges all over it in a fairly random fashion.  This means
3111 +that performance, both for compressing and decompressing, is largely
3112 +determined by the speed at which your machine can service cache misses.
3113 +Because of this, small changes to the code to reduce the miss rate have
3114 +been observed to give disproportionately large performance improvements.
3115 +I imagine @code{bzip2} will perform best on machines with very large
3116 +caches.
3117 +
3118 +
3119 +@unnumberedsubsubsec CAVEATS
3120 +
3121 +I/O error messages are not as helpful as they could be.  @code{bzip2}
3122 +tries hard to detect I/O errors and exit cleanly, but the details of
3123 +what the problem is sometimes seem rather misleading.
3124 +
3125 +This manual page pertains to version 1.0.2 of @code{bzip2}.  Compressed
3126 +data created by this version is entirely forwards and backwards
3127 +compatible with the previous public releases, versions 0.1pl2, 0.9.0,
3128 +0.9.5, 1.0.0 and 1.0.1, but with the following exception: 0.9.0 and
3129 +above can correctly decompress multiple concatenated compressed files.
3130 +0.1pl2 cannot do this; it will stop after decompressing just the first
3131 +file in the stream.
3132 +
3133 +@code{bzip2recover} versions prior to this one, 1.0.2, used 32-bit
3134 +integers to represent bit positions in compressed files, so it could not
3135 +handle compressed files more than 512 megabytes long.  Version 1.0.2 and
3136 +above uses 64-bit ints on some platforms which support them (GNU
3137 +supported targets, and Windows).  To establish whether or not
3138 +@code{bzip2recover} was built with such a limitation, run it without
3139 +arguments.  In any event you can build yourself an unlimited version if
3140 +you can recompile it with @code{MaybeUInt64} set to be an unsigned
3141 +64-bit integer.
3142 +
3143 +
3144 +
3145 +@unnumberedsubsubsec AUTHOR
3146 +Julian Seward, @code{jseward@@acm.org}.
3147 +
3148 +@code{http://sources.redhat.com/bzip2}
3149 +
3150 +The ideas embodied in @code{bzip2} are due to (at least) the following
3151 +people: Michael Burrows and David Wheeler (for the block sorting
3152 +transformation), David Wheeler (again, for the Huffman coder), Peter
3153 +Fenwick (for the structured coding model in the original @code{bzip},
3154 +and many refinements), and Alistair Moffat, Radford Neal and Ian Witten
3155 +(for the arithmetic coder in the original @code{bzip}).  I am much
3156 +indebted for their help, support and advice.  See the manual in the
3157 +source distribution for pointers to sources of documentation.  Christian
3158 +von Roques encouraged me to look for faster sorting algorithms, so as to
3159 +speed up compression.  Bela Lubkin encouraged me to improve the
3160 +worst-case compression performance.  The @code{bz*} scripts are derived
3161 +from those of GNU @code{gzip}.  Many people sent patches, helped with
3162 +portability problems, lent machines, gave advice and were generally
3163 +helpful.
3164 +
3165 +@end quotation
3166 +
3167 +
3168 +
3169 +
3170 +@chapter Programming with @code{libbzip2}
3171 +
3172 +This chapter describes the programming interface to @code{libbzip2}.
3173 +
3174 +For general background information, particularly about memory
3175 +use and performance aspects, you'd be well advised to read Chapter 2
3176 +as well.
3177 +
3178 +@section Top-level structure
3179 +
3180 +@code{libbzip2} is a flexible library for compressing and decompressing
3181 +data in the @code{bzip2} data format.  Although packaged as a single
3182 +entity, it helps to regard the library as three separate parts: the low
3183 +level interface, and the high level interface, and some utility
3184 +functions.
3185 +
3186 +The structure of @code{libbzip2}'s interfaces is similar to
3187 +that of Jean-loup Gailly's and Mark Adler's excellent @code{zlib} 
3188 +library.
3189 +
3190 +All externally visible symbols have names beginning @code{BZ2_}.
3191 +This is new in version 1.0.  The intention is to minimise pollution
3192 +of the namespaces of library clients.
3193 +
3194 +@subsection Low-level summary
3195 +
3196 +This interface provides services for compressing and decompressing
3197 +data in memory.  There's no provision for dealing with files, streams
3198 +or any other I/O mechanisms, just straight memory-to-memory work.
3199 +In fact, this part of the library can be compiled without inclusion
3200 +of @code{stdio.h}, which may be helpful for embedded applications.
3201 +
3202 +The low-level part of the library has no global variables and
3203 +is therefore thread-safe.
3204 +
3205 +Six routines make up the low level interface: 
3206 +@code{BZ2_bzCompressInit}, @code{BZ2_bzCompress}, and @* @code{BZ2_bzCompressEnd}
3207 +for compression,
3208 +and a corresponding trio @code{BZ2_bzDecompressInit}, @* @code{BZ2_bzDecompress}
3209 +and @code{BZ2_bzDecompressEnd} for decompression.  
3210 +The @code{*Init} functions allocate
3211 +memory for compression/decompression and do other
3212 +initialisations, whilst the @code{*End} functions close down operations
3213 +and release memory.
3214 +
3215 +The real work is done by @code{BZ2_bzCompress} and @code{BZ2_bzDecompress}.  
3216 +These compress and decompress data from a user-supplied input buffer
3217 +to a user-supplied output buffer.  These buffers can be any size;
3218 +arbitrary quantities of data are handled by making repeated calls
3219 +to these functions.  This is a flexible mechanism allowing a 
3220 +consumer-pull style of activity, or producer-push, or a mixture of
3221 +both.
3222 +
3223 +
3224 +
3225 +@subsection High-level summary
3226 +
3227 +This interface provides some handy wrappers around the low-level
3228 +interface to facilitate reading and writing @code{bzip2} format
3229 +files (@code{.bz2} files).  The routines provide hooks to facilitate
3230 +reading files in which the @code{bzip2} data stream is embedded 
3231 +within some larger-scale file structure, or where there are
3232 +multiple @code{bzip2} data streams concatenated end-to-end.
3233 +
3234 +For reading files, @code{BZ2_bzReadOpen}, @code{BZ2_bzRead},
3235 +@code{BZ2_bzReadClose} and @* @code{BZ2_bzReadGetUnused} are supplied.  For
3236 +writing files, @code{BZ2_bzWriteOpen}, @code{BZ2_bzWrite} and
3237 +@code{BZ2_bzWriteFinish} are available.
3238 +
3239 +As with the low-level library, no global variables are used
3240 +so the library is per se thread-safe.  However, if I/O errors
3241 +occur whilst reading or writing the underlying compressed files,
3242 +you may have to consult @code{errno} to determine the cause of
3243 +the error.  In that case, you'd need a C library which correctly
3244 +supports @code{errno} in a multithreaded environment.
3245 +
3246 +To make the library a little simpler and more portable,
3247 +@code{BZ2_bzReadOpen} and @code{BZ2_bzWriteOpen} require you to pass them file
3248 +handles (@code{FILE*}s) which have previously been opened for reading or
3249 +writing respectively.  That avoids portability problems associated with
3250 +file operations and file attributes, whilst not being much of an
3251 +imposition on the programmer.
3252 +
3253 +
3254 +
3255 +@subsection Utility functions summary
3256 +For very simple needs, @code{BZ2_bzBuffToBuffCompress} and
3257 +@code{BZ2_bzBuffToBuffDecompress} are provided.  These compress
3258 +data in memory from one buffer to another buffer in a single
3259 +function call.  You should assess whether these functions
3260 +fulfill your memory-to-memory compression/decompression
3261 +requirements before investing effort in understanding the more
3262 +general but more complex low-level interface.
3263 +
3264 +Yoshioka Tsuneo (@code{QWF00133@@niftyserve.or.jp} /
3265 +@code{tsuneo-y@@is.aist-nara.ac.jp}) has contributed some functions to
3266 +give better @code{zlib} compatibility.  These functions are
3267 +@code{BZ2_bzopen}, @code{BZ2_bzread}, @code{BZ2_bzwrite}, @code{BZ2_bzflush},
3268 +@code{BZ2_bzclose},
3269 +@code{BZ2_bzerror} and @code{BZ2_bzlibVersion}.  You may find these functions
3270 +more convenient for simple file reading and writing, than those in the
3271 +high-level interface.  These functions are not (yet) officially part of
3272 +the library, and are minimally documented here.  If they break, you
3273 +get to keep all the pieces.  I hope to document them properly when time
3274 +permits.
3275 +
3276 +Yoshioka also contributed modifications to allow the library to be
3277 +built as a Windows DLL.
3278 +
3279 +
3280 +@section Error handling
3281 +
3282 +The library is designed to recover cleanly in all situations, including
3283 +the worst-case situation of decompressing random data.  I'm not 
3284 +100% sure that it can always do this, so you might want to add
3285 +a signal handler to catch segmentation violations during decompression
3286 +if you are feeling especially paranoid.  I would be interested in
3287 +hearing more about the robustness of the library to corrupted
3288 +compressed data.
3289 +
3290 +Version 1.0 is much more robust in this respect than
3291 +0.9.0 or 0.9.5.  Investigations with Checker (a tool for 
3292 +detecting problems with memory management, similar to Purify)
3293 +indicate that, at least for the few files I tested, all single-bit
3294 +errors in the decompressed data are caught properly, with no
3295 +segmentation faults, no reads of uninitialised data and no 
3296 +out of range reads or writes.  So it's certainly much improved,
3297 +although I wouldn't claim it to be totally bombproof.
3298 +
3299 +The file @code{bzlib.h} contains all definitions needed to use
3300 +the library.  In particular, you should definitely not include
3301 +@code{bzlib_private.h}.
3302 +
3303 +In @code{bzlib.h}, the various return values are defined.  The following
3304 +list is not intended as an exhaustive description of the circumstances 
3305 +in which a given value may be returned -- those descriptions are given
3306 +later.  Rather, it is intended to convey the rough meaning of each
3307 +return value.  The first five actions are normal and not intended to 
3308 +denote an error situation.
3309 +@table @code
3310 +@item BZ_OK
3311 +The requested action was completed successfully.
3312 +@item BZ_RUN_OK
3313 +@itemx BZ_FLUSH_OK
3314 +@itemx BZ_FINISH_OK
3315 +In @code{BZ2_bzCompress}, the requested flush/finish/nothing-special action
3316 +was completed successfully.
3317 +@item BZ_STREAM_END
3318 +Compression of data was completed, or the logical stream end was
3319 +detected during decompression.
3320 +@end table
3321 +
3322 +The following return values indicate an error of some kind.
3323 +@table @code
3324 +@item BZ_CONFIG_ERROR
3325 +Indicates that the library has been improperly compiled on your
3326 +platform -- a major configuration error.  Specifically, it means
3327 +that @code{sizeof(char)}, @code{sizeof(short)} and @code{sizeof(int)}
3328 +are not 1, 2 and 4 respectively, as they should be.  Note that the 
3329 +library should still work properly on 64-bit platforms which follow
3330 +the LP64 programming model -- that is, where @code{sizeof(long)}
3331 +and @code{sizeof(void*)} are 8.  Under LP64, @code{sizeof(int)} is
3332 +still 4, so @code{libbzip2}, which doesn't use the @code{long} type,
3333 +is OK.
3334 +@item BZ_SEQUENCE_ERROR
3335 +When using the library, it is important to call the functions in the
3336 +correct sequence and with data structures (buffers etc) in the correct
3337 +states.  @code{libbzip2} checks as much as it can to ensure this is
3338 +happening, and returns @code{BZ_SEQUENCE_ERROR} if not.  Code which
3339 +complies precisely with the function semantics, as detailed below,
3340 +should never receive this value; such an event denotes buggy code
3341 +which you should investigate.
3342 +@item BZ_PARAM_ERROR
3343 +Returned when a parameter to a function call is out of range 
3344 +or otherwise manifestly incorrect.  As with @code{BZ_SEQUENCE_ERROR},
3345 +this denotes a bug in the client code.  The distinction between
3346 +@code{BZ_PARAM_ERROR} and @code{BZ_SEQUENCE_ERROR} is a bit hazy, but still worth
3347 +making.
3348 +@item BZ_MEM_ERROR
3349 +Returned when a request to allocate memory failed.  Note that the
3350 +quantity of memory needed to decompress a stream cannot be determined
3351 +until the stream's header has been read.  So @code{BZ2_bzDecompress} and
3352 +@code{BZ2_bzRead} may return @code{BZ_MEM_ERROR} even though some of
3353 +the compressed data has been read.  The same is not true for
3354 +compression; once @code{BZ2_bzCompressInit} or @code{BZ2_bzWriteOpen} have
3355 +successfully completed, @code{BZ_MEM_ERROR} cannot occur.
3356 +@item BZ_DATA_ERROR
3357 +Returned when a data integrity error is detected during decompression.
3358 +Most importantly, this means when stored and computed CRCs for the
3359 +data do not match.  This value is also returned upon detection of any
3360 +other anomaly in the compressed data.
3361 +@item BZ_DATA_ERROR_MAGIC
3362 +As a special case of @code{BZ_DATA_ERROR}, it is sometimes useful to
3363 +know when the compressed stream does not start with the correct
3364 +magic bytes (@code{'B' 'Z' 'h'}).  
3365 +@item BZ_IO_ERROR
3366 +Returned by @code{BZ2_bzRead} and @code{BZ2_bzWrite} when there is an error
3367 +reading or writing in the compressed file, and by @code{BZ2_bzReadOpen}
3368 +and @code{BZ2_bzWriteOpen} for attempts to use a file for which the
3369 +error indicator (viz, @code{ferror(f)}) is set.
3370 +On receipt of @code{BZ_IO_ERROR}, the caller should consult
3371 +@code{errno} and/or @code{perror} to acquire operating-system
3372 +specific information about the problem.
3373 +@item BZ_UNEXPECTED_EOF
3374 +Returned by @code{BZ2_bzRead} when the compressed file finishes
3375 +before the logical end of stream is detected.
3376 +@item BZ_OUTBUFF_FULL
3377 +Returned by @code{BZ2_bzBuffToBuffCompress} and
3378 +@code{BZ2_bzBuffToBuffDecompress} to indicate that the output data
3379 +will not fit into the output buffer provided.
3380 +@end table
3381 +
3382 +
3383 +
3384 +@section Low-level interface
3385 +
3386 +@subsection @code{BZ2_bzCompressInit}
3387 +@example
3388 +typedef 
3389 +   struct @{
3390 +      char *next_in;
3391 +      unsigned int avail_in;
3392 +      unsigned int total_in_lo32;
3393 +      unsigned int total_in_hi32;
3394 +
3395 +      char *next_out;
3396 +      unsigned int avail_out;
3397 +      unsigned int total_out_lo32;
3398 +      unsigned int total_out_hi32;
3399 +
3400 +      void *state;
3401 +
3402 +      void *(*bzalloc)(void *,int,int);
3403 +      void (*bzfree)(void *,void *);
3404 +      void *opaque;
3405 +   @} 
3406 +   bz_stream;
3407 +
3408 +int BZ2_bzCompressInit ( bz_stream *strm, 
3409 +                         int blockSize100k, 
3410 +                         int verbosity,
3411 +                         int workFactor );
3412 +
3413 +@end example
3414 +
3415 +Prepares for compression.  The @code{bz_stream} structure
3416 +holds all data pertaining to the compression activity.  
3417 +A @code{bz_stream} structure should be allocated and initialised
3418 +prior to the call.
3419 +The fields of @code{bz_stream}
3420 +comprise the entirety of the user-visible data.  @code{state}
3421 +is a pointer to the private data structures required for compression.
3422 +
3423 +Custom memory allocators are supported, via fields @code{bzalloc}, 
3424 +@code{bzfree},
3425 +and @code{opaque}.  The value 
3426 +@code{opaque} is passed to as the first argument to
3427 +all calls to @code{bzalloc} and @code{bzfree}, but is 
3428 +otherwise ignored by the library.
3429 +The call @code{bzalloc ( opaque, n, m )} is expected to return a 
3430 +pointer @code{p} to
3431 +@code{n * m} bytes of memory, and @code{bzfree ( opaque, p )} 
3432 +should free
3433 +that memory.
3434 +
3435 +If you don't want to use a custom memory allocator, set @code{bzalloc}, 
3436 +@code{bzfree} and
3437 +@code{opaque} to @code{NULL}, 
3438 +and the library will then use the standard @code{malloc}/@code{free}
3439 +routines.
3440 +
3441 +Before calling @code{BZ2_bzCompressInit}, fields @code{bzalloc}, 
3442 +@code{bzfree} and @code{opaque} should
3443 +be filled appropriately, as just described.  Upon return, the internal
3444 +state will have been allocated and initialised, and @code{total_in_lo32}, 
3445 +@code{total_in_hi32}, @code{total_out_lo32} and 
3446 +@code{total_out_hi32} will have been set to zero.  
3447 +These four fields are used by the library
3448 +to inform the caller of the total amount of data passed into and out of
3449 +the library, respectively.  You should not try to change them.
3450 +As of version 1.0, 64-bit counts are maintained, even on 32-bit
3451 +platforms, using the @code{_hi32} fields to store the upper 32 bits
3452 +of the count.  So, for example, the total amount of data in
3453 +is @code{(total_in_hi32 << 32) + total_in_lo32}.
3454 +
3455 +Parameter @code{blockSize100k} specifies the block size to be used for
3456 +compression.  It should be a value between 1 and 9 inclusive, and the
3457 +actual block size used is 100000 x this figure.  9 gives the best
3458 +compression but takes most memory.
3459 +
3460 +Parameter @code{verbosity} should be set to a number between 0 and 4
3461 +inclusive.  0 is silent, and greater numbers give increasingly verbose
3462 +monitoring/debugging output.  If the library has been compiled with
3463 +@code{-DBZ_NO_STDIO}, no such output will appear for any verbosity
3464 +setting.
3465 +
3466 +Parameter @code{workFactor} controls how the compression phase behaves
3467 +when presented with worst case, highly repetitive, input data.  If
3468 +compression runs into difficulties caused by repetitive data, the
3469 +library switches from the standard sorting algorithm to a fallback
3470 +algorithm.  The fallback is slower than the standard algorithm by
3471 +perhaps a factor of three, but always behaves reasonably, no matter how
3472 +bad the input.
3473 +
3474 +Lower values of @code{workFactor} reduce the amount of effort the
3475 +standard algorithm will expend before resorting to the fallback.  You
3476 +should set this parameter carefully; too low, and many inputs will be
3477 +handled by the fallback algorithm and so compress rather slowly, too
3478 +high, and your average-to-worst case compression times can become very
3479 +large.  The default value of 30 gives reasonable behaviour over a wide
3480 +range of circumstances.
3481 +
3482 +Allowable values range from 0 to 250 inclusive.  0 is a special case,
3483 +equivalent to using the default value of 30.
3484 +
3485 +Note that the compressed output generated is the same regardless of
3486 +whether or not the fallback algorithm is used.
3487 +
3488 +Be aware also that this parameter may disappear entirely in future
3489 +versions of the library.  In principle it should be possible to devise a
3490 +good way to automatically choose which algorithm to use.  Such a
3491 +mechanism would render the parameter obsolete.
3492 +
3493 +Possible return values:
3494 +@display
3495 +      @code{BZ_CONFIG_ERROR}
3496 +         if the library has been mis-compiled
3497 +      @code{BZ_PARAM_ERROR} 
3498 +         if @code{strm} is @code{NULL} 
3499 +         or @code{blockSize} < 1 or @code{blockSize} > 9
3500 +         or @code{verbosity} < 0 or @code{verbosity} > 4
3501 +         or @code{workFactor} < 0 or @code{workFactor} > 250
3502 +      @code{BZ_MEM_ERROR} 
3503 +         if not enough memory is available
3504 +      @code{BZ_OK} 
3505 +         otherwise
3506 +@end display
3507 +Allowable next actions:
3508 +@display
3509 +      @code{BZ2_bzCompress} 
3510 +         if @code{BZ_OK} is returned
3511 +      no specific action needed in case of error
3512 +@end display
3513 +
3514 +@subsection @code{BZ2_bzCompress}
3515 +@example
3516 +   int BZ2_bzCompress ( bz_stream *strm, int action );
3517 +@end example
3518 +Provides more input and/or output buffer space for the library.  The
3519 +caller maintains input and output buffers, and calls @code{BZ2_bzCompress} to
3520 +transfer data between them.
3521 +
3522 +Before each call to @code{BZ2_bzCompress}, @code{next_in} should point at
3523 +the data to be compressed, and @code{avail_in} should indicate how many
3524 +bytes the library may read.  @code{BZ2_bzCompress} updates @code{next_in},
3525 +@code{avail_in} and @code{total_in} to reflect the number of bytes it
3526 +has read.
3527 +
3528 +Similarly, @code{next_out} should point to a buffer in which the
3529 +compressed data is to be placed, with @code{avail_out} indicating how
3530 +much output space is available.  @code{BZ2_bzCompress} updates
3531 +@code{next_out}, @code{avail_out} and @code{total_out} to reflect the
3532 +number of bytes output.
3533 +
3534 +You may provide and remove as little or as much data as you like on each
3535 +call of @code{BZ2_bzCompress}.  In the limit, it is acceptable to supply and
3536 +remove data one byte at a time, although this would be terribly
3537 +inefficient.  You should always ensure that at least one byte of output
3538 +space is available at each call.
3539 +
3540 +A second purpose of @code{BZ2_bzCompress} is to request a change of mode of the
3541 +compressed stream.  
3542 +
3543 +Conceptually, a compressed stream can be in one of four states: IDLE,
3544 +RUNNING, FLUSHING and FINISHING.  Before initialisation
3545 +(@code{BZ2_bzCompressInit}) and after termination (@code{BZ2_bzCompressEnd}), a
3546 +stream is regarded as IDLE.
3547 +
3548 +Upon initialisation (@code{BZ2_bzCompressInit}), the stream is placed in the
3549 +RUNNING state.  Subsequent calls to @code{BZ2_bzCompress} should pass
3550 +@code{BZ_RUN} as the requested action; other actions are illegal and
3551 +will result in @code{BZ_SEQUENCE_ERROR}.
3552 +
3553 +At some point, the calling program will have provided all the input data
3554 +it wants to.  It will then want to finish up -- in effect, asking the
3555 +library to process any data it might have buffered internally.  In this
3556 +state, @code{BZ2_bzCompress} will no longer attempt to read data from
3557 +@code{next_in}, but it will want to write data to @code{next_out}.
3558 +Because the output buffer supplied by the user can be arbitrarily small,
3559 +the finishing-up operation cannot necessarily be done with a single call
3560 +of @code{BZ2_bzCompress}.
3561 +
3562 +Instead, the calling program passes @code{BZ_FINISH} as an action to
3563 +@code{BZ2_bzCompress}.  This changes the stream's state to FINISHING.  Any
3564 +remaining input (ie, @code{next_in[0 .. avail_in-1]}) is compressed and
3565 +transferred to the output buffer.  To do this, @code{BZ2_bzCompress} must be
3566 +called repeatedly until all the output has been consumed.  At that
3567 +point, @code{BZ2_bzCompress} returns @code{BZ_STREAM_END}, and the stream's
3568 +state is set back to IDLE.  @code{BZ2_bzCompressEnd} should then be
3569 +called.
3570 +
3571 +Just to make sure the calling program does not cheat, the library makes
3572 +a note of @code{avail_in} at the time of the first call to
3573 +@code{BZ2_bzCompress} which has @code{BZ_FINISH} as an action (ie, at the
3574 +time the program has announced its intention to not supply any more
3575 +input).  By comparing this value with that of @code{avail_in} over
3576 +subsequent calls to @code{BZ2_bzCompress}, the library can detect any
3577 +attempts to slip in more data to compress.  Any calls for which this is
3578 +detected will return @code{BZ_SEQUENCE_ERROR}.  This indicates a
3579 +programming mistake which should be corrected.
3580 +
3581 +Instead of asking to finish, the calling program may ask
3582 +@code{BZ2_bzCompress} to take all the remaining input, compress it and
3583 +terminate the current (Burrows-Wheeler) compression block.  This could
3584 +be useful for error control purposes.  The mechanism is analogous to
3585 +that for finishing: call @code{BZ2_bzCompress} with an action of
3586 +@code{BZ_FLUSH}, remove output data, and persist with the
3587 +@code{BZ_FLUSH} action until the value @code{BZ_RUN} is returned.  As
3588 +with finishing, @code{BZ2_bzCompress} detects any attempt to provide more
3589 +input data once the flush has begun.
3590 +
3591 +Once the flush is complete, the stream returns to the normal RUNNING
3592 +state.
3593 +
3594 +This all sounds pretty complex, but isn't really.  Here's a table
3595 +which shows which actions are allowable in each state, what action
3596 +will be taken, what the next state is, and what the non-error return
3597 +values are.  Note that you can't explicitly ask what state the
3598 +stream is in, but nor do you need to -- it can be inferred from the
3599 +values returned by @code{BZ2_bzCompress}.
3600 +@display
3601 +IDLE/@code{any}           
3602 +      Illegal.  IDLE state only exists after @code{BZ2_bzCompressEnd} or
3603 +      before @code{BZ2_bzCompressInit}.
3604 +      Return value = @code{BZ_SEQUENCE_ERROR}
3605 +
3606 +RUNNING/@code{BZ_RUN}     
3607 +      Compress from @code{next_in} to @code{next_out} as much as possible.
3608 +      Next state = RUNNING
3609 +      Return value = @code{BZ_RUN_OK}
3610 +
3611 +RUNNING/@code{BZ_FLUSH}   
3612 +      Remember current value of @code{next_in}.  Compress from @code{next_in}
3613 +      to @code{next_out} as much as possible, but do not accept any more input.  
3614 +      Next state = FLUSHING
3615 +      Return value = @code{BZ_FLUSH_OK}
3616 +
3617 +RUNNING/@code{BZ_FINISH}  
3618 +      Remember current value of @code{next_in}.  Compress from @code{next_in}
3619 +      to @code{next_out} as much as possible, but do not accept any more input.
3620 +      Next state = FINISHING
3621 +      Return value = @code{BZ_FINISH_OK}
3622 +
3623 +FLUSHING/@code{BZ_FLUSH}  
3624 +      Compress from @code{next_in} to @code{next_out} as much as possible, 
3625 +      but do not accept any more input.  
3626 +      If all the existing input has been used up and all compressed
3627 +      output has been removed
3628 +         Next state = RUNNING; Return value = @code{BZ_RUN_OK}
3629 +      else
3630 +         Next state = FLUSHING; Return value = @code{BZ_FLUSH_OK}
3631 +
3632 +FLUSHING/other     
3633 +      Illegal.
3634 +      Return value = @code{BZ_SEQUENCE_ERROR}
3635 +
3636 +FINISHING/@code{BZ_FINISH}  
3637 +      Compress from @code{next_in} to @code{next_out} as much as possible,
3638 +      but to not accept any more input.  
3639 +      If all the existing input has been used up and all compressed
3640 +      output has been removed
3641 +         Next state = IDLE; Return value = @code{BZ_STREAM_END}
3642 +      else
3643 +         Next state = FINISHING; Return value = @code{BZ_FINISHING}
3644 +
3645 +FINISHING/other
3646 +      Illegal.
3647 +      Return value = @code{BZ_SEQUENCE_ERROR}
3648 +@end display
3649 +
3650 +That still looks complicated?  Well, fair enough.  The usual sequence
3651 +of calls for compressing a load of data is:
3652 +@itemize @bullet
3653 +@item Get started with @code{BZ2_bzCompressInit}.
3654 +@item Shovel data in and shlurp out its compressed form using zero or more
3655 +calls of @code{BZ2_bzCompress} with action = @code{BZ_RUN}.
3656 +@item Finish up.  
3657 +Repeatedly call @code{BZ2_bzCompress} with action = @code{BZ_FINISH}, 
3658 +copying out the compressed output, until @code{BZ_STREAM_END} is returned.
3659 +@item Close up and go home.  Call @code{BZ2_bzCompressEnd}.
3660 +@end itemize
3661 +If the data you want to compress fits into your input buffer all
3662 +at once, you can skip the calls of @code{BZ2_bzCompress ( ..., BZ_RUN )} and 
3663 +just do the @code{BZ2_bzCompress ( ..., BZ_FINISH )} calls.
3664 +
3665 +All required memory is allocated by @code{BZ2_bzCompressInit}.  The
3666 +compression library can accept any data at all (obviously).  So you
3667 +shouldn't get any error return values from the @code{BZ2_bzCompress} calls.
3668 +If you do, they will be @code{BZ_SEQUENCE_ERROR}, and indicate a bug in
3669 +your programming.
3670 +
3671 +Trivial other possible return values:
3672 +@display
3673 +      @code{BZ_PARAM_ERROR}   
3674 +         if @code{strm} is @code{NULL}, or @code{strm->s} is @code{NULL}
3675 +@end display
3676 +
3677 +@subsection @code{BZ2_bzCompressEnd}
3678 +@example
3679 +int BZ2_bzCompressEnd ( bz_stream *strm );
3680 +@end example
3681 +Releases all memory associated with a compression stream.
3682 +
3683 +Possible return values:
3684 +@display
3685 +   @code{BZ_PARAM_ERROR}    if @code{strm} is @code{NULL} or @code{strm->s} is @code{NULL}
3686 +   @code{BZ_OK}    otherwise
3687 +@end display
3688 +
3689 +
3690 +@subsection @code{BZ2_bzDecompressInit}
3691 +@example
3692 +int BZ2_bzDecompressInit ( bz_stream *strm, int verbosity, int small );
3693 +@end example
3694 +Prepares for decompression.  As with @code{BZ2_bzCompressInit}, a
3695 +@code{bz_stream} record should be allocated and initialised before the
3696 +call.  Fields @code{bzalloc}, @code{bzfree} and @code{opaque} should be
3697 +set if a custom memory allocator is required, or made @code{NULL} for
3698 +the normal @code{malloc}/@code{free} routines.  Upon return, the internal
3699 +state will have been initialised, and @code{total_in} and
3700 +@code{total_out} will be zero.
3701 +
3702 +For the meaning of parameter @code{verbosity}, see @code{BZ2_bzCompressInit}.
3703 +
3704 +If @code{small} is nonzero, the library will use an alternative
3705 +decompression algorithm which uses less memory but at the cost of
3706 +decompressing more slowly (roughly speaking, half the speed, but the
3707 +maximum memory requirement drops to around 2300k).  See Chapter 2 for
3708 +more information on memory management.
3709 +
3710 +Note that the amount of memory needed to decompress
3711 +a stream cannot be determined until the stream's header has been read,
3712 +so even if @code{BZ2_bzDecompressInit} succeeds, a subsequent
3713 +@code{BZ2_bzDecompress} could fail with @code{BZ_MEM_ERROR}.
3714 +
3715 +Possible return values:
3716 +@display
3717 +      @code{BZ_CONFIG_ERROR}
3718 +         if the library has been mis-compiled
3719 +      @code{BZ_PARAM_ERROR}
3720 +         if @code{(small != 0 && small != 1)}
3721 +         or @code{(verbosity < 0 || verbosity > 4)}
3722 +      @code{BZ_MEM_ERROR}
3723 +         if insufficient memory is available
3724 +@end display
3725 +
3726 +Allowable next actions:
3727 +@display
3728 +      @code{BZ2_bzDecompress}
3729 +         if @code{BZ_OK} was returned
3730 +      no specific action required in case of error
3731 +@end display
3732 +
3733
3734 +
3735 +@subsection @code{BZ2_bzDecompress}
3736 +@example
3737 +int BZ2_bzDecompress ( bz_stream *strm );
3738 +@end example
3739 +Provides more input and/out output buffer space for the library.  The
3740 +caller maintains input and output buffers, and uses @code{BZ2_bzDecompress}
3741 +to transfer data between them.
3742 +
3743 +Before each call to @code{BZ2_bzDecompress}, @code{next_in} 
3744 +should point at the compressed data,
3745 +and @code{avail_in} should indicate how many bytes the library
3746 +may read.  @code{BZ2_bzDecompress} updates @code{next_in}, @code{avail_in} 
3747 +and @code{total_in}
3748 +to reflect the number of bytes it has read.
3749 +
3750 +Similarly, @code{next_out} should point to a buffer in which the uncompressed
3751 +output is to be placed, with @code{avail_out} indicating how much output space
3752 +is available.  @code{BZ2_bzCompress} updates @code{next_out},
3753 +@code{avail_out} and @code{total_out} to reflect
3754 +the number of bytes output.
3755 +
3756 +You may provide and remove as little or as much data as you like on
3757 +each call of @code{BZ2_bzDecompress}.  
3758 +In the limit, it is acceptable to
3759 +supply and remove data one byte at a time, although this would be
3760 +terribly inefficient.  You should always ensure that at least one
3761 +byte of output space is available at each call.
3762 +
3763 +Use of @code{BZ2_bzDecompress} is simpler than @code{BZ2_bzCompress}.
3764 +
3765 +You should provide input and remove output as described above, and
3766 +repeatedly call @code{BZ2_bzDecompress} until @code{BZ_STREAM_END} is
3767 +returned.  Appearance of @code{BZ_STREAM_END} denotes that
3768 +@code{BZ2_bzDecompress} has detected the logical end of the compressed
3769 +stream.  @code{BZ2_bzDecompress} will not produce @code{BZ_STREAM_END} until
3770 +all output data has been placed into the output buffer, so once
3771 +@code{BZ_STREAM_END} appears, you are guaranteed to have available all
3772 +the decompressed output, and @code{BZ2_bzDecompressEnd} can safely be
3773 +called.
3774 +
3775 +If case of an error return value, you should call @code{BZ2_bzDecompressEnd}
3776 +to clean up and release memory.
3777 +
3778 +Possible return values:
3779 +@display
3780 +      @code{BZ_PARAM_ERROR}
3781 +         if @code{strm} is @code{NULL} or @code{strm->s} is @code{NULL}
3782 +         or @code{strm->avail_out < 1}
3783 +      @code{BZ_DATA_ERROR}
3784 +         if a data integrity error is detected in the compressed stream
3785 +      @code{BZ_DATA_ERROR_MAGIC}
3786 +         if the compressed stream doesn't begin with the right magic bytes
3787 +      @code{BZ_MEM_ERROR}
3788 +         if there wasn't enough memory available
3789 +      @code{BZ_STREAM_END}
3790 +         if the logical end of the data stream was detected and all
3791 +         output in has been consumed, eg @code{s->avail_out > 0}
3792 +      @code{BZ_OK}
3793 +         otherwise
3794 +@end display
3795 +Allowable next actions:
3796 +@display
3797 +      @code{BZ2_bzDecompress}
3798 +         if @code{BZ_OK} was returned
3799 +      @code{BZ2_bzDecompressEnd}
3800 +         otherwise
3801 +@end display
3802 +
3803 +
3804 +@subsection @code{BZ2_bzDecompressEnd}
3805 +@example
3806 +int BZ2_bzDecompressEnd ( bz_stream *strm );
3807 +@end example
3808 +Releases all memory associated with a decompression stream.
3809 +
3810 +Possible return values:
3811 +@display
3812 +      @code{BZ_PARAM_ERROR}
3813 +         if @code{strm} is @code{NULL} or @code{strm->s} is @code{NULL}
3814 +      @code{BZ_OK}
3815 +         otherwise
3816 +@end display
3817 +
3818 +Allowable next actions:
3819 +@display
3820 +      None.
3821 +@end display
3822 +
3823 +
3824 +@section High-level interface
3825 +
3826 +This interface provides functions for reading and writing 
3827 +@code{bzip2} format files.  First, some general points.
3828 +
3829 +@itemize @bullet
3830 +@item All of the functions take an @code{int*} first argument,
3831 +  @code{bzerror}.
3832 +  After each call, @code{bzerror} should be consulted first to determine
3833 +  the outcome of the call.  If @code{bzerror} is @code{BZ_OK}, 
3834 +  the call completed
3835 +  successfully, and only then should the return value of the function
3836 +  (if any) be consulted.  If @code{bzerror} is @code{BZ_IO_ERROR}, 
3837 +  there was an error
3838 +  reading/writing the underlying compressed file, and you should
3839 +  then consult @code{errno}/@code{perror} to determine the 
3840 +  cause of the difficulty.
3841 +  @code{bzerror} may also be set to various other values; precise details are
3842 +  given on a per-function basis below.
3843 +@item If @code{bzerror} indicates an error 
3844 +  (ie, anything except @code{BZ_OK} and @code{BZ_STREAM_END}),
3845 +  you should immediately call @code{BZ2_bzReadClose} (or @code{BZ2_bzWriteClose},
3846 +  depending on whether you are attempting to read or to write)
3847 +  to free up all resources associated
3848 +  with the stream.  Once an error has been indicated, behaviour of all calls
3849 +  except @code{BZ2_bzReadClose} (@code{BZ2_bzWriteClose}) is undefined.  
3850 +  The implication is that (1) @code{bzerror} should
3851 +  be checked after each call, and (2) if @code{bzerror} indicates an error, 
3852 +  @code{BZ2_bzReadClose} (@code{BZ2_bzWriteClose}) should then be called to clean up.
3853 +@item The @code{FILE*} arguments passed to
3854 +   @code{BZ2_bzReadOpen}/@code{BZ2_bzWriteOpen}  
3855 +  should be set to binary mode.
3856 +  Most Unix systems will do this by default, but other platforms,
3857 +  including Windows and Mac, will not.  If you omit this, you may
3858 +  encounter problems when moving code to new platforms.
3859 +@item Memory allocation requests are handled by
3860 +  @code{malloc}/@code{free}.  
3861 +  At present
3862 +  there is no facility for user-defined memory allocators in the file I/O
3863 +  functions (could easily be added, though).
3864 +@end itemize
3865 +
3866 +
3867 +
3868 +@subsection @code{BZ2_bzReadOpen}
3869 +@example
3870 +   typedef void BZFILE;
3871 +
3872 +   BZFILE *BZ2_bzReadOpen ( int *bzerror, FILE *f, 
3873 +                            int small, int verbosity,
3874 +                            void *unused, int nUnused );
3875 +@end example
3876 +Prepare to read compressed data from file handle @code{f}.  @code{f}
3877 +should refer to a file which has been opened for reading, and for which
3878 +the error indicator (@code{ferror(f)})is not set.  If @code{small} is 1,
3879 +the library will try to decompress using less memory, at the expense of
3880 +speed.
3881 +
3882 +For reasons explained below, @code{BZ2_bzRead} will decompress the
3883 +@code{nUnused} bytes starting at @code{unused}, before starting to read
3884 +from the file @code{f}.  At most @code{BZ_MAX_UNUSED} bytes may be
3885 +supplied like this.  If this facility is not required, you should pass
3886 +@code{NULL} and @code{0} for @code{unused} and n@code{Unused}
3887 +respectively.
3888 +
3889 +For the meaning of parameters @code{small} and @code{verbosity},
3890 +see @code{BZ2_bzDecompressInit}.
3891 +
3892 +The amount of memory needed to decompress a file cannot be determined
3893 +until the file's header has been read.  So it is possible that
3894 +@code{BZ2_bzReadOpen} returns @code{BZ_OK} but a subsequent call of
3895 +@code{BZ2_bzRead} will return @code{BZ_MEM_ERROR}.
3896 +
3897 +Possible assignments to @code{bzerror}:
3898 +@display
3899 +      @code{BZ_CONFIG_ERROR}
3900 +         if the library has been mis-compiled
3901 +      @code{BZ_PARAM_ERROR}
3902 +         if @code{f} is @code{NULL} 
3903 +         or @code{small} is neither @code{0} nor @code{1}                 
3904 +         or @code{(unused == NULL && nUnused != 0)}
3905 +         or @code{(unused != NULL && !(0 <= nUnused <= BZ_MAX_UNUSED))}
3906 +      @code{BZ_IO_ERROR}    
3907 +         if @code{ferror(f)} is nonzero
3908 +      @code{BZ_MEM_ERROR}   
3909 +         if insufficient memory is available
3910 +      @code{BZ_OK}
3911 +         otherwise.
3912 +@end display
3913 +
3914 +Possible return values:
3915 +@display
3916 +      Pointer to an abstract @code{BZFILE}        
3917 +         if @code{bzerror} is @code{BZ_OK}   
3918 +      @code{NULL}
3919 +         otherwise
3920 +@end display
3921 +
3922 +Allowable next actions:
3923 +@display
3924 +      @code{BZ2_bzRead}
3925 +         if @code{bzerror} is @code{BZ_OK}   
3926 +      @code{BZ2_bzClose} 
3927 +         otherwise
3928 +@end display
3929 +
3930 +
3931 +@subsection @code{BZ2_bzRead}
3932 +@example
3933 +   int BZ2_bzRead ( int *bzerror, BZFILE *b, void *buf, int len );
3934 +@end example
3935 +Reads up to @code{len} (uncompressed) bytes from the compressed file 
3936 +@code{b} into
3937 +the buffer @code{buf}.  If the read was successful, 
3938 +@code{bzerror} is set to @code{BZ_OK}
3939 +and the number of bytes read is returned.  If the logical end-of-stream
3940 +was detected, @code{bzerror} will be set to @code{BZ_STREAM_END}, 
3941 +and the number
3942 +of bytes read is returned.  All other @code{bzerror} values denote an error.
3943 +
3944 +@code{BZ2_bzRead} will supply @code{len} bytes,
3945 +unless the logical stream end is detected
3946 +or an error occurs.  Because of this, it is possible to detect the 
3947 +stream end by observing when the number of bytes returned is 
3948 +less than the number
3949 +requested.  Nevertheless, this is regarded as inadvisable; you should
3950 +instead check @code{bzerror} after every call and watch out for
3951 +@code{BZ_STREAM_END}.
3952 +
3953 +Internally, @code{BZ2_bzRead} copies data from the compressed file in chunks
3954 +of size @code{BZ_MAX_UNUSED} bytes
3955 +before decompressing it.  If the file contains more bytes than strictly
3956 +needed to reach the logical end-of-stream, @code{BZ2_bzRead} will almost certainly
3957 +read some of the trailing data before signalling @code{BZ_SEQUENCE_END}.
3958 +To collect the read but unused data once @code{BZ_SEQUENCE_END} has 
3959 +appeared, call @code{BZ2_bzReadGetUnused} immediately before @code{BZ2_bzReadClose}.
3960 +
3961 +Possible assignments to @code{bzerror}:
3962 +@display
3963 +      @code{BZ_PARAM_ERROR}
3964 +         if @code{b} is @code{NULL} or @code{buf} is @code{NULL} or @code{len < 0}
3965 +      @code{BZ_SEQUENCE_ERROR} 
3966 +         if @code{b} was opened with @code{BZ2_bzWriteOpen}
3967 +      @code{BZ_IO_ERROR} 
3968 +         if there is an error reading from the compressed file
3969 +      @code{BZ_UNEXPECTED_EOF} 
3970 +         if the compressed file ended before the logical end-of-stream was detected
3971 +      @code{BZ_DATA_ERROR} 
3972 +         if a data integrity error was detected in the compressed stream
3973 +      @code{BZ_DATA_ERROR_MAGIC}
3974 +         if the stream does not begin with the requisite header bytes (ie, is not 
3975 +         a @code{bzip2} data file).  This is really a special case of @code{BZ_DATA_ERROR}.
3976 +      @code{BZ_MEM_ERROR} 
3977 +         if insufficient memory was available
3978 +      @code{BZ_STREAM_END} 
3979 +         if the logical end of stream was detected.
3980 +      @code{BZ_OK}
3981 +         otherwise.
3982 +@end display
3983 +
3984 +Possible return values:
3985 +@display
3986 +      number of bytes read
3987 +         if @code{bzerror} is @code{BZ_OK} or @code{BZ_STREAM_END}
3988 +      undefined
3989 +         otherwise
3990 +@end display
3991 +
3992 +Allowable next actions:
3993 +@display
3994 +      collect data from @code{buf}, then @code{BZ2_bzRead} or @code{BZ2_bzReadClose}
3995 +         if @code{bzerror} is @code{BZ_OK} 
3996 +      collect data from @code{buf}, then @code{BZ2_bzReadClose} or @code{BZ2_bzReadGetUnused} 
3997 +         if @code{bzerror} is @code{BZ_SEQUENCE_END}   
3998 +      @code{BZ2_bzReadClose} 
3999 +         otherwise
4000 +@end display
4001 +
4002 +
4003 +
4004 +@subsection @code{BZ2_bzReadGetUnused}
4005 +@example
4006 +   void BZ2_bzReadGetUnused ( int* bzerror, BZFILE *b, 
4007 +                              void** unused, int* nUnused );
4008 +@end example
4009 +Returns data which was read from the compressed file but was not needed
4010 +to get to the logical end-of-stream.  @code{*unused} is set to the address
4011 +of the data, and @code{*nUnused} to the number of bytes.  @code{*nUnused} will
4012 +be set to a value between @code{0} and @code{BZ_MAX_UNUSED} inclusive.
4013 +
4014 +This function may only be called once @code{BZ2_bzRead} has signalled 
4015 +@code{BZ_STREAM_END} but before @code{BZ2_bzReadClose}.
4016 +
4017 +Possible assignments to @code{bzerror}:
4018 +@display
4019 +      @code{BZ_PARAM_ERROR} 
4020 +         if @code{b} is @code{NULL} 
4021 +         or @code{unused} is @code{NULL} or @code{nUnused} is @code{NULL}
4022 +      @code{BZ_SEQUENCE_ERROR} 
4023 +         if @code{BZ_STREAM_END} has not been signalled
4024 +         or if @code{b} was opened with @code{BZ2_bzWriteOpen}
4025 +     @code{BZ_OK}
4026 +         otherwise
4027 +@end display
4028 +
4029 +Allowable next actions:
4030 +@display 
4031 +      @code{BZ2_bzReadClose}
4032 +@end display
4033 +
4034 +
4035 +@subsection @code{BZ2_bzReadClose}
4036 +@example
4037 +   void BZ2_bzReadClose ( int *bzerror, BZFILE *b );
4038 +@end example
4039 +Releases all memory pertaining to the compressed file @code{b}.  
4040 +@code{BZ2_bzReadClose} does not call @code{fclose} on the underlying file
4041 +handle, so you should do that yourself if appropriate.
4042 +@code{BZ2_bzReadClose} should be called to clean up after all error
4043 +situations.
4044 +
4045 +Possible assignments to @code{bzerror}:
4046 +@display
4047 +      @code{BZ_SEQUENCE_ERROR} 
4048 +         if @code{b} was opened with @code{BZ2_bzOpenWrite} 
4049 +      @code{BZ_OK} 
4050 +         otherwise
4051 +@end display
4052 +
4053 +Allowable next actions:
4054 +@display
4055 +      none
4056 +@end display
4057 +
4058 +
4059 +
4060 +@subsection @code{BZ2_bzWriteOpen}
4061 +@example
4062 +   BZFILE *BZ2_bzWriteOpen ( int *bzerror, FILE *f, 
4063 +                             int blockSize100k, int verbosity,
4064 +                             int workFactor );
4065 +@end example
4066 +Prepare to write compressed data to file handle @code{f}.  
4067 +@code{f} should refer to
4068 +a file which has been opened for writing, and for which the error
4069 +indicator (@code{ferror(f)})is not set.  
4070 +
4071 +For the meaning of parameters @code{blockSize100k},
4072 +@code{verbosity} and @code{workFactor}, see
4073 +@* @code{BZ2_bzCompressInit}.
4074 +
4075 +All required memory is allocated at this stage, so if the call
4076 +completes successfully, @code{BZ_MEM_ERROR} cannot be signalled by a
4077 +subsequent call to @code{BZ2_bzWrite}.
4078 +
4079 +Possible assignments to @code{bzerror}:
4080 +@display 
4081 +      @code{BZ_CONFIG_ERROR}
4082 +         if the library has been mis-compiled
4083 +      @code{BZ_PARAM_ERROR} 
4084 +         if @code{f} is @code{NULL} 
4085 +         or @code{blockSize100k < 1} or @code{blockSize100k > 9}
4086 +      @code{BZ_IO_ERROR} 
4087 +         if @code{ferror(f)} is nonzero
4088 +      @code{BZ_MEM_ERROR} 
4089 +         if insufficient memory is available
4090 +      @code{BZ_OK} 
4091 +         otherwise
4092 +@end display
4093 +
4094 +Possible return values:
4095 +@display
4096 +      Pointer to an abstract @code{BZFILE}  
4097 +         if @code{bzerror} is @code{BZ_OK}   
4098 +      @code{NULL} 
4099 +         otherwise
4100 +@end display
4101 +
4102 +Allowable next actions:
4103 +@display
4104 +      @code{BZ2_bzWrite} 
4105 +         if @code{bzerror} is @code{BZ_OK} 
4106 +         (you could go directly to @code{BZ2_bzWriteClose}, but this would be pretty pointless)
4107 +      @code{BZ2_bzWriteClose} 
4108 +         otherwise
4109 +@end display
4110 +
4111 +
4112 +
4113 +@subsection @code{BZ2_bzWrite}
4114 +@example
4115 +   void BZ2_bzWrite ( int *bzerror, BZFILE *b, void *buf, int len );
4116 +@end example
4117 +Absorbs @code{len} bytes from the buffer @code{buf}, eventually to be
4118 +compressed and written to the file.
4119 +
4120 +Possible assignments to @code{bzerror}:
4121 +@display
4122 +      @code{BZ_PARAM_ERROR} 
4123 +         if @code{b} is @code{NULL} or @code{buf} is @code{NULL} or @code{len < 0}
4124 +      @code{BZ_SEQUENCE_ERROR} 
4125 +         if b was opened with @code{BZ2_bzReadOpen}
4126 +      @code{BZ_IO_ERROR} 
4127 +         if there is an error writing the compressed file.
4128 +      @code{BZ_OK} 
4129 +         otherwise
4130 +@end display
4131 +
4132 +
4133 +
4134 +
4135 +@subsection @code{BZ2_bzWriteClose}
4136 +@example
4137 +   void BZ2_bzWriteClose ( int *bzerror, BZFILE* f,
4138 +                           int abandon,
4139 +                           unsigned int* nbytes_in,
4140 +                           unsigned int* nbytes_out );
4141 +
4142 +   void BZ2_bzWriteClose64 ( int *bzerror, BZFILE* f,
4143 +                             int abandon,
4144 +                             unsigned int* nbytes_in_lo32,
4145 +                             unsigned int* nbytes_in_hi32,
4146 +                             unsigned int* nbytes_out_lo32,
4147 +                             unsigned int* nbytes_out_hi32 );
4148 +@end example
4149 +
4150 +Compresses and flushes to the compressed file all data so far supplied
4151 +by @code{BZ2_bzWrite}.  The logical end-of-stream markers are also written, so
4152 +subsequent calls to @code{BZ2_bzWrite} are illegal.  All memory associated 
4153 +with the compressed file @code{b} is released.  
4154 +@code{fflush} is called on the
4155 +compressed file, but it is not @code{fclose}'d.
4156 +
4157 +If @code{BZ2_bzWriteClose} is called to clean up after an error, the only
4158 +action is to release the memory.  The library records the error codes
4159 +issued by previous calls, so this situation will be detected
4160 +automatically.  There is no attempt to complete the compression
4161 +operation, nor to @code{fflush} the compressed file.  You can force this
4162 +behaviour to happen even in the case of no error, by passing a nonzero
4163 +value to @code{abandon}.
4164 +
4165 +If @code{nbytes_in} is non-null, @code{*nbytes_in} will be set to be the
4166 +total volume of uncompressed data handled.  Similarly, @code{nbytes_out}
4167 +will be set to the total volume of compressed data written.  For 
4168 +compatibility with older versions of the library, @code{BZ2_bzWriteClose}
4169 +only yields the lower 32 bits of these counts.  Use
4170 +@code{BZ2_bzWriteClose64} if you want the full 64 bit counts.  These
4171 +two functions are otherwise absolutely identical.
4172 +
4173 +
4174 +Possible assignments to @code{bzerror}:
4175 +@display
4176 +      @code{BZ_SEQUENCE_ERROR} 
4177 +         if @code{b} was opened with @code{BZ2_bzReadOpen}
4178 +      @code{BZ_IO_ERROR} 
4179 +         if there is an error writing the compressed file
4180 +      @code{BZ_OK} 
4181 +         otherwise
4182 +@end display
4183 +
4184 +@subsection Handling embedded compressed data streams
4185 +
4186 +The high-level library facilitates use of
4187 +@code{bzip2} data streams which form some part of a surrounding, larger
4188 +data stream.
4189 +@itemize @bullet
4190 +@item For writing, the library takes an open file handle, writes
4191 +compressed data to it, @code{fflush}es it but does not @code{fclose} it.
4192 +The calling application can write its own data before and after the
4193 +compressed data stream, using that same file handle.
4194 +@item Reading is more complex, and the facilities are not as general
4195 +as they could be since generality is hard to reconcile with efficiency.
4196 +@code{BZ2_bzRead} reads from the compressed file in blocks of size
4197 +@code{BZ_MAX_UNUSED} bytes, and in doing so probably will overshoot
4198 +the logical end of compressed stream.
4199 +To recover this data once decompression has
4200 +ended, call @code{BZ2_bzReadGetUnused} after the last call of @code{BZ2_bzRead}
4201 +(the one returning @code{BZ_STREAM_END}) but before calling
4202 +@code{BZ2_bzReadClose}.
4203 +@end itemize
4204 +
4205 +This mechanism makes it easy to decompress multiple @code{bzip2}
4206 +streams placed end-to-end.  As the end of one stream, when @code{BZ2_bzRead}
4207 +returns @code{BZ_STREAM_END}, call @code{BZ2_bzReadGetUnused} to collect the
4208 +unused data (copy it into your own buffer somewhere).  
4209 +That data forms the start of the next compressed stream.
4210 +To start uncompressing that next stream, call @code{BZ2_bzReadOpen} again,
4211 +feeding in the unused data via the @code{unused}/@code{nUnused}
4212 +parameters.
4213 +Keep doing this until @code{BZ_STREAM_END} return coincides with the
4214 +physical end of file (@code{feof(f)}).  In this situation
4215 +@code{BZ2_bzReadGetUnused}
4216 +will of course return no data.
4217 +
4218 +This should give some feel for how the high-level interface can be used.
4219 +If you require extra flexibility, you'll have to bite the bullet and get
4220 +to grips with the low-level interface.
4221 +
4222 +@subsection Standard file-reading/writing code
4223 +Here's how you'd write data to a compressed file:
4224 +@example @code
4225 +FILE*   f;
4226 +BZFILE* b;
4227 +int     nBuf;
4228 +char    buf[ /* whatever size you like */ ];
4229 +int     bzerror;
4230 +int     nWritten;
4231 +
4232 +f = fopen ( "myfile.bz2", "w" );
4233 +if (!f) @{
4234 +   /* handle error */
4235 +@}
4236 +b = BZ2_bzWriteOpen ( &bzerror, f, 9 );
4237 +if (bzerror != BZ_OK) @{
4238 +   BZ2_bzWriteClose ( b );
4239 +   /* handle error */
4240 +@}
4241 +
4242 +while ( /* condition */ ) @{
4243 +   /* get data to write into buf, and set nBuf appropriately */
4244 +   nWritten = BZ2_bzWrite ( &bzerror, b, buf, nBuf );
4245 +   if (bzerror == BZ_IO_ERROR) @{ 
4246 +      BZ2_bzWriteClose ( &bzerror, b );
4247 +      /* handle error */
4248 +   @}
4249 +@}
4250 +
4251 +BZ2_bzWriteClose ( &bzerror, b );
4252 +if (bzerror == BZ_IO_ERROR) @{
4253 +   /* handle error */
4254 +@}
4255 +@end example
4256 +And to read from a compressed file:
4257 +@example
4258 +FILE*   f;
4259 +BZFILE* b;
4260 +int     nBuf;
4261 +char    buf[ /* whatever size you like */ ];
4262 +int     bzerror;
4263 +int     nWritten;
4264 +
4265 +f = fopen ( "myfile.bz2", "r" );
4266 +if (!f) @{
4267 +   /* handle error */
4268 +@}
4269 +b = BZ2_bzReadOpen ( &bzerror, f, 0, NULL, 0 );
4270 +if (bzerror != BZ_OK) @{
4271 +   BZ2_bzReadClose ( &bzerror, b );
4272 +   /* handle error */
4273 +@}
4274 +
4275 +bzerror = BZ_OK;
4276 +while (bzerror == BZ_OK && /* arbitrary other conditions */) @{
4277 +   nBuf = BZ2_bzRead ( &bzerror, b, buf, /* size of buf */ );
4278 +   if (bzerror == BZ_OK) @{
4279 +      /* do something with buf[0 .. nBuf-1] */
4280 +   @}
4281 +@}
4282 +if (bzerror != BZ_STREAM_END) @{
4283 +   BZ2_bzReadClose ( &bzerror, b );
4284 +   /* handle error */
4285 +@} else @{
4286 +   BZ2_bzReadClose ( &bzerror );
4287 +@}
4288 +@end example
4289 +
4290 +
4291 +
4292 +@section Utility functions
4293 +@subsection @code{BZ2_bzBuffToBuffCompress}
4294 +@example
4295 +   int BZ2_bzBuffToBuffCompress( char*         dest,
4296 +                                 unsigned int* destLen,
4297 +                                 char*         source,
4298 +                                 unsigned int  sourceLen,
4299 +                                 int           blockSize100k,
4300 +                                 int           verbosity,
4301 +                                 int           workFactor );
4302 +@end example
4303 +Attempts to compress the data in @code{source[0 .. sourceLen-1]}
4304 +into the destination buffer, @code{dest[0 .. *destLen-1]}.
4305 +If the destination buffer is big enough, @code{*destLen} is
4306 +set to the size of the compressed data, and @code{BZ_OK} is
4307 +returned.  If the compressed data won't fit, @code{*destLen}
4308 +is unchanged, and @code{BZ_OUTBUFF_FULL} is returned.
4309 +
4310 +Compression in this manner is a one-shot event, done with a single call
4311 +to this function.  The resulting compressed data is a complete
4312 +@code{bzip2} format data stream.  There is no mechanism for making
4313 +additional calls to provide extra input data.  If you want that kind of
4314 +mechanism, use the low-level interface.
4315 +
4316 +For the meaning of parameters @code{blockSize100k}, @code{verbosity}
4317 +and @code{workFactor}, @* see @code{BZ2_bzCompressInit}.
4318 +
4319 +To guarantee that the compressed data will fit in its buffer, allocate
4320 +an output buffer of size 1% larger than the uncompressed data, plus
4321 +six hundred extra bytes.
4322 +
4323 +@code{BZ2_bzBuffToBuffDecompress} will not write data at or
4324 +beyond @code{dest[*destLen]}, even in case of buffer overflow.
4325 +
4326 +Possible return values:
4327 +@display
4328 +      @code{BZ_CONFIG_ERROR}
4329 +         if the library has been mis-compiled
4330 +      @code{BZ_PARAM_ERROR} 
4331 +         if @code{dest} is @code{NULL} or @code{destLen} is @code{NULL}
4332 +         or @code{blockSize100k < 1} or @code{blockSize100k > 9}
4333 +         or @code{verbosity < 0} or @code{verbosity > 4} 
4334 +         or @code{workFactor < 0} or @code{workFactor > 250}
4335 +      @code{BZ_MEM_ERROR}
4336 +         if insufficient memory is available 
4337 +      @code{BZ_OUTBUFF_FULL}
4338 +         if the size of the compressed data exceeds @code{*destLen}
4339 +      @code{BZ_OK} 
4340 +         otherwise
4341 +@end display
4342 +
4343 +
4344 +
4345 +@subsection @code{BZ2_bzBuffToBuffDecompress}
4346 +@example
4347 +   int BZ2_bzBuffToBuffDecompress ( char*         dest,
4348 +                                    unsigned int* destLen,
4349 +                                    char*         source,
4350 +                                    unsigned int  sourceLen,
4351 +                                    int           small,
4352 +                                    int           verbosity );
4353 +@end example
4354 +Attempts to decompress the data in @code{source[0 .. sourceLen-1]}
4355 +into the destination buffer, @code{dest[0 .. *destLen-1]}.
4356 +If the destination buffer is big enough, @code{*destLen} is
4357 +set to the size of the uncompressed data, and @code{BZ_OK} is
4358 +returned.  If the compressed data won't fit, @code{*destLen}
4359 +is unchanged, and @code{BZ_OUTBUFF_FULL} is returned.
4360 +
4361 +@code{source} is assumed to hold a complete @code{bzip2} format
4362 +data stream.  @* @code{BZ2_bzBuffToBuffDecompress} tries to decompress
4363 +the entirety of the stream into the output buffer.
4364 +
4365 +For the meaning of parameters @code{small} and @code{verbosity},
4366 +see @code{BZ2_bzDecompressInit}.
4367 +
4368 +Because the compression ratio of the compressed data cannot be known in
4369 +advance, there is no easy way to guarantee that the output buffer will
4370 +be big enough.  You may of course make arrangements in your code to
4371 +record the size of the uncompressed data, but such a mechanism is beyond
4372 +the scope of this library.
4373 +
4374 +@code{BZ2_bzBuffToBuffDecompress} will not write data at or
4375 +beyond @code{dest[*destLen]}, even in case of buffer overflow.
4376 +
4377 +Possible return values:
4378 +@display
4379 +      @code{BZ_CONFIG_ERROR}
4380 +         if the library has been mis-compiled
4381 +      @code{BZ_PARAM_ERROR} 
4382 +         if @code{dest} is @code{NULL} or @code{destLen} is @code{NULL}
4383 +         or @code{small != 0 && small != 1}
4384 +         or @code{verbosity < 0} or @code{verbosity > 4} 
4385 +      @code{BZ_MEM_ERROR}
4386 +         if insufficient memory is available 
4387 +      @code{BZ_OUTBUFF_FULL}
4388 +         if the size of the compressed data exceeds @code{*destLen}
4389 +      @code{BZ_DATA_ERROR}
4390 +         if a data integrity error was detected in the compressed data
4391 +      @code{BZ_DATA_ERROR_MAGIC}
4392 +         if the compressed data doesn't begin with the right magic bytes
4393 +      @code{BZ_UNEXPECTED_EOF}
4394 +         if the compressed data ends unexpectedly
4395 +      @code{BZ_OK} 
4396 +         otherwise
4397 +@end display
4398 +
4399 +
4400 +
4401 +@section @code{zlib} compatibility functions
4402 +Yoshioka Tsuneo has contributed some functions to
4403 +give better @code{zlib} compatibility.  These functions are
4404 +@code{BZ2_bzopen}, @code{BZ2_bzread}, @code{BZ2_bzwrite}, @code{BZ2_bzflush},
4405 +@code{BZ2_bzclose},
4406 +@code{BZ2_bzerror} and @code{BZ2_bzlibVersion}.
4407 +These functions are not (yet) officially part of
4408 +the library.  If they break, you get to keep all the pieces.
4409 +Nevertheless, I think they work ok.
4410 +@example
4411 +typedef void BZFILE;
4412 +
4413 +const char * BZ2_bzlibVersion ( void );
4414 +@end example
4415 +Returns a string indicating the library version.
4416 +@example
4417 +BZFILE * BZ2_bzopen  ( const char *path, const char *mode );
4418 +BZFILE * BZ2_bzdopen ( int        fd,    const char *mode );
4419 +@end example
4420 +Opens a @code{.bz2} file for reading or writing, using either its name
4421 +or a pre-existing file descriptor. 
4422 +Analogous to @code{fopen} and @code{fdopen}.
4423 +@example         
4424 +int BZ2_bzread  ( BZFILE* b, void* buf, int len );
4425 +int BZ2_bzwrite ( BZFILE* b, void* buf, int len );
4426 +@end example
4427 +Reads/writes data from/to a previously opened @code{BZFILE}.
4428 +Analogous to @code{fread} and @code{fwrite}.
4429 +@example
4430 +int  BZ2_bzflush ( BZFILE* b );
4431 +void BZ2_bzclose ( BZFILE* b );
4432 +@end example
4433 +Flushes/closes a @code{BZFILE}.  @code{BZ2_bzflush} doesn't actually do
4434 +anything.  Analogous to @code{fflush} and @code{fclose}.
4435 +
4436 +@example 
4437 +const char * BZ2_bzerror ( BZFILE *b, int *errnum )
4438 +@end example
4439 +Returns a string describing the more recent error status of
4440 +@code{b}, and also sets @code{*errnum} to its numerical value.
4441 +
4442 +
4443 +@section Using the library in a @code{stdio}-free environment
4444 +
4445 +@subsection Getting rid of @code{stdio}
4446 +
4447 +In a deeply embedded application, you might want to use just
4448 +the memory-to-memory functions.  You can do this conveniently
4449 +by compiling the library with preprocessor symbol @code{BZ_NO_STDIO}
4450 +defined.  Doing this gives you a library containing only the following
4451 +eight functions:
4452 +
4453 +@code{BZ2_bzCompressInit}, @code{BZ2_bzCompress}, @code{BZ2_bzCompressEnd} @*
4454 +@code{BZ2_bzDecompressInit}, @code{BZ2_bzDecompress}, @code{BZ2_bzDecompressEnd} @*
4455 +@code{BZ2_bzBuffToBuffCompress}, @code{BZ2_bzBuffToBuffDecompress}
4456 +
4457 +When compiled like this, all functions will ignore @code{verbosity}
4458 +settings.
4459 +
4460 +@subsection Critical error handling
4461 +@code{libbzip2} contains a number of internal assertion checks which
4462 +should, needless to say, never be activated.  Nevertheless, if an
4463 +assertion should fail, behaviour depends on whether or not the library
4464 +was compiled with @code{BZ_NO_STDIO} set.
4465 +
4466 +For a normal compile, an assertion failure yields the message
4467 +@example
4468 +   bzip2/libbzip2: internal error number N.
4469 +   This is a bug in bzip2/libbzip2, 1.0.2, 30-Dec-2001.
4470 +   Please report it to me at: jseward@@acm.org.  If this happened
4471 +   when you were using some program which uses libbzip2 as a
4472 +   component, you should also report this bug to the author(s)
4473 +   of that program.  Please make an effort to report this bug;
4474 +   timely and accurate bug reports eventually lead to higher
4475 +   quality software.  Thanks.  Julian Seward, 30 December 2001.
4476 +@end example
4477 +where @code{N} is some error code number.  If @code{N == 1007}, it also
4478 +prints some extra text advising the reader that unreliable memory is
4479 +often associated with internal error 1007.  (This is a
4480 +frequently-observed-phenomenon with versions 1.0.0/1.0.1).
4481 +
4482 +@code{exit(3)} is then called.
4483 +
4484 +For a @code{stdio}-free library, assertion failures result
4485 +in a call to a function declared as:
4486 +@example
4487 +   extern void bz_internal_error ( int errcode );
4488 +@end example
4489 +The relevant code is passed as a parameter.  You should supply
4490 +such a function.
4491 +
4492 +In either case, once an assertion failure has occurred, any 
4493 +@code{bz_stream} records involved can be regarded as invalid.
4494 +You should not attempt to resume normal operation with them.
4495 +
4496 +You may, of course, change critical error handling to suit
4497 +your needs.  As I said above, critical errors indicate bugs
4498 +in the library and should not occur.  All "normal" error
4499 +situations are indicated via error return codes from functions,
4500 +and can be recovered from.
4501 +
4502 +
4503 +@section Making a Windows DLL
4504 +Everything related to Windows has been contributed by Yoshioka Tsuneo
4505 +@* (@code{QWF00133@@niftyserve.or.jp} /
4506 +@code{tsuneo-y@@is.aist-nara.ac.jp}), so you should send your queries to
4507 +him (but perhaps Cc: me, @code{jseward@@acm.org}).
4508 +
4509 +My vague understanding of what to do is: using Visual C++ 5.0,
4510 +open the project file @code{libbz2.dsp}, and build.  That's all.
4511 +
4512 +If you can't
4513 +open the project file for some reason, make a new one, naming these files:
4514 +@code{blocksort.c}, @code{bzlib.c}, @code{compress.c}, 
4515 +@code{crctable.c}, @code{decompress.c}, @code{huffman.c}, @*
4516 +@code{randtable.c} and @code{libbz2.def}.  You will also need
4517 +to name the header files @code{bzlib.h} and @code{bzlib_private.h}.
4518 +
4519 +If you don't use VC++, you may need to define the proprocessor symbol
4520 +@code{_WIN32}. 
4521 +
4522 +Finally, @code{dlltest.c} is a sample program using the DLL.  It has a
4523 +project file, @code{dlltest.dsp}.
4524 +
4525 +If you just want a makefile for Visual C, have a look at
4526 +@code{makefile.msc}.
4527 +
4528 +Be aware that if you compile @code{bzip2} itself on Win32, you must set
4529 +@code{BZ_UNIX} to 0 and @code{BZ_LCCWIN32} to 1, in the file
4530 +@code{bzip2.c}, before compiling.  Otherwise the resulting binary won't
4531 +work correctly.
4532 +
4533 +I haven't tried any of this stuff myself, but it all looks plausible.
4534 +
4535 +
4536 +
4537 +@chapter Miscellanea
4538 +
4539 +These are just some random thoughts of mine.  Your mileage may
4540 +vary.
4541 +
4542 +@section Limitations of the compressed file format
4543 +@code{bzip2-1.0}, @code{0.9.5} and @code{0.9.0}
4544 +use exactly the same file format as the previous
4545 +version, @code{bzip2-0.1}.  This decision was made in the interests of
4546 +stability.  Creating yet another incompatible compressed file format
4547 +would create further confusion and disruption for users.
4548 +
4549 +Nevertheless, this is not a painless decision.  Development
4550 +work since the release of @code{bzip2-0.1} in August 1997
4551 +has shown complexities in the file format which slow down
4552 +decompression and, in retrospect, are unnecessary.  These are:
4553 +@itemize @bullet
4554 +@item The run-length encoder, which is the first of the 
4555 +      compression transformations, is entirely irrelevant.
4556 +      The original purpose was to protect the sorting algorithm
4557 +      from the very worst case input: a string of repeated
4558 +      symbols.  But algorithm steps Q6a and Q6b in the original
4559 +      Burrows-Wheeler technical report (SRC-124) show how
4560 +      repeats can be handled without difficulty in block
4561 +      sorting.
4562 +@item The randomisation mechanism doesn't really need to be
4563 +      there.  Udi Manber and Gene Myers published a suffix
4564 +      array construction algorithm a few years back, which
4565 +      can be employed to sort any block, no matter how 
4566 +      repetitive, in O(N log N) time.  Subsequent work by
4567 +      Kunihiko Sadakane has produced a derivative O(N (log N)^2) 
4568 +      algorithm which usually outperforms the Manber-Myers
4569 +      algorithm.
4570 +
4571 +      I could have changed to Sadakane's algorithm, but I find
4572 +      it to be slower than @code{bzip2}'s existing algorithm for
4573 +      most inputs, and the randomisation mechanism protects
4574 +      adequately against bad cases.  I didn't think it was
4575 +      a good tradeoff to make.  Partly this is due to the fact
4576 +      that I was not flooded with email complaints about
4577 +      @code{bzip2-0.1}'s performance on repetitive data, so
4578 +      perhaps it isn't a problem for real inputs.
4579 +
4580 +      Probably the best long-term solution,
4581 +      and the one I have incorporated into 0.9.5 and above,
4582 +      is to use the existing sorting
4583 +      algorithm initially, and fall back to a O(N (log N)^2)
4584 +      algorithm if the standard algorithm gets into difficulties.
4585 +@item The compressed file format was never designed to be
4586 +      handled by a library, and I have had to jump though
4587 +      some hoops to produce an efficient implementation of
4588 +      decompression.  It's a bit hairy.  Try passing
4589 +      @code{decompress.c} through the C preprocessor 
4590 +      and you'll see what I mean.  Much of this complexity
4591 +      could have been avoided if the compressed size of
4592 +      each block of data was recorded in the data stream.
4593 +@item An Adler-32 checksum, rather than a CRC32 checksum,
4594 +      would be faster to compute.
4595 +@end itemize
4596 +It would be fair to say that the @code{bzip2} format was frozen
4597 +before I properly and fully understood the performance
4598 +consequences of doing so.
4599 +
4600 +Improvements which I was able to incorporate into
4601 +0.9.0, despite using the same file format, are:
4602 +@itemize @bullet
4603 +@item Single array implementation of the inverse BWT.  This
4604 +      significantly speeds up decompression, presumably
4605 +      because it reduces the number of cache misses.
4606 +@item Faster inverse MTF transform for large MTF values.  The
4607 +      new implementation is based on the notion of sliding blocks
4608 +      of values.
4609 +@item @code{bzip2-0.9.0} now reads and writes files with @code{fread}
4610 +      and @code{fwrite}; version 0.1 used @code{putc} and @code{getc}.
4611 +      Duh!  Well, you live and learn.
4612 +
4613 +@end itemize
4614 +Further ahead, it would be nice 
4615 +to be able to do random access into files.  This will 
4616 +require some careful design of compressed file formats.
4617 +
4618 +
4619 +
4620 +@section Portability issues
4621 +After some consideration, I have decided not to use
4622 +GNU @code{autoconf} to configure 0.9.5 or 1.0.
4623 +
4624 +@code{autoconf}, admirable and wonderful though it is, 
4625 +mainly assists with portability problems between Unix-like
4626 +platforms.  But @code{bzip2} doesn't have much in the way
4627 +of portability problems on Unix; most of the difficulties appear
4628 +when porting to the Mac, or to Microsoft's operating systems.
4629 +@code{autoconf} doesn't help in those cases, and brings in a 
4630 +whole load of new complexity.
4631 +
4632 +Most people should be able to compile the library and program
4633 +under Unix straight out-of-the-box, so to speak, especially 
4634 +if you have a version of GNU C available.
4635 +
4636 +There are a couple of @code{__inline__} directives in the code.  GNU C
4637 +(@code{gcc}) should be able to handle them.  If you're not using
4638 +GNU C, your C compiler shouldn't see them at all.
4639 +If your compiler does, for some reason, see them and doesn't
4640 +like them, just @code{#define} @code{__inline__} to be @code{/* */}.  One
4641 +easy way to do this is to compile with the flag @code{-D__inline__=}, 
4642 +which should be understood by most Unix compilers.
4643 +
4644 +If you still have difficulties, try compiling with the macro
4645 +@code{BZ_STRICT_ANSI} defined.  This should enable you to build the
4646 +library in a strictly ANSI compliant environment.  Building the program
4647 +itself like this is dangerous and not supported, since you remove
4648 +@code{bzip2}'s checks against compressing directories, symbolic links,
4649 +devices, and other not-really-a-file entities.  This could cause
4650 +filesystem corruption!
4651 +
4652 +One other thing: if you create a @code{bzip2} binary for public
4653 +distribution, please try and link it statically (@code{gcc -s}).  This
4654 +avoids all sorts of library-version issues that others may encounter
4655 +later on.
4656 +
4657 +If you build @code{bzip2} on Win32, you must set @code{BZ_UNIX} to 0 and
4658 +@code{BZ_LCCWIN32} to 1, in the file @code{bzip2.c}, before compiling.
4659 +Otherwise the resulting binary won't work correctly.
4660 +
4661 +
4662 +
4663 +@section Reporting bugs
4664 +I tried pretty hard to make sure @code{bzip2} is
4665 +bug free, both by design and by testing.  Hopefully
4666 +you'll never need to read this section for real.
4667 +
4668 +Nevertheless, if @code{bzip2} dies with a segmentation
4669 +fault, a bus error or an internal assertion failure, it
4670 +will ask you to email me a bug report.  Experience with
4671 +version 0.1 shows that almost all these problems can
4672 +be traced to either compiler bugs or hardware problems.
4673 +@itemize @bullet
4674 +@item
4675 +Recompile the program with no optimisation, and see if it
4676 +works.  And/or try a different compiler.
4677 +I heard all sorts of stories about various flavours
4678 +of GNU C (and other compilers) generating bad code for
4679 +@code{bzip2}, and I've run across two such examples myself.
4680 +
4681 +2.7.X versions of GNU C are known to generate bad code from
4682 +time to time, at high optimisation levels.  
4683 +If you get problems, try using the flags
4684 +@code{-O2} @code{-fomit-frame-pointer} @code{-fno-strength-reduce}.
4685 +You should specifically @emph{not} use @code{-funroll-loops}.
4686 +
4687 +You may notice that the Makefile runs six tests as part of
4688 +the build process.  If the program passes all of these, it's
4689 +a pretty good (but not 100%) indication that the compiler has
4690 +done its job correctly.
4691 +@item
4692 +If @code{bzip2} crashes randomly, and the crashes are not
4693 +repeatable, you may have a flaky memory subsystem.  @code{bzip2}
4694 +really hammers your memory hierarchy, and if it's a bit marginal,
4695 +you may get these problems.  Ditto if your disk or I/O subsystem
4696 +is slowly failing.  Yup, this really does happen.
4697 +
4698 +Try using a different machine of the same type, and see if
4699 +you can repeat the problem.
4700 +@item This isn't really a bug, but ... If @code{bzip2} tells
4701 +you your file is corrupted on decompression, and you
4702 +obtained the file via FTP, there is a possibility that you
4703 +forgot to tell FTP to do a binary mode transfer.  That absolutely
4704 +will cause the file to be non-decompressible.  You'll have to transfer
4705 +it again.
4706 +@end itemize
4707 +
4708 +If you've incorporated @code{libbzip2} into your own program
4709 +and are getting problems, please, please, please, check that the 
4710 +parameters you are passing in calls to the library, are
4711 +correct, and in accordance with what the documentation says
4712 +is allowable.  I have tried to make the library robust against
4713 +such problems, but I'm sure I haven't succeeded.
4714 +
4715 +Finally, if the above comments don't help, you'll have to send
4716 +me a bug report.  Now, it's just amazing how many people will 
4717 +send me a bug report saying something like
4718 +@display
4719 +   bzip2 crashed with segmentation fault on my machine
4720 +@end display
4721 +and absolutely nothing else.  Needless to say, a such a report
4722 +is @emph{totally, utterly, completely and comprehensively 100% useless; 
4723 +a waste of your time, my time, and net bandwidth}.
4724 +With no details at all, there's no way I can possibly begin
4725 +to figure out what the problem is.
4726 +
4727 +The rules of the game are: facts, facts, facts.  Don't omit
4728 +them because "oh, they won't be relevant".  At the bare 
4729 +minimum:
4730 +@display
4731 +   Machine type.  Operating system version.  
4732 +   Exact version of @code{bzip2} (do @code{bzip2 -V}).  
4733 +   Exact version of the compiler used.  
4734 +   Flags passed to the compiler.
4735 +@end display
4736 +However, the most important single thing that will help me is
4737 +the file that you were trying to compress or decompress at the
4738 +time the problem happened.  Without that, my ability to do anything
4739 +more than speculate about the cause, is limited.
4740 +
4741 +Please remember that I connect to the Internet with a modem, so
4742 +you should contact me before mailing me huge files.
4743 +
4744 +
4745 +@section Did you get the right package?
4746 +
4747 +@code{bzip2} is a resource hog.  It soaks up large amounts of CPU cycles
4748 +and memory.  Also, it gives very large latencies.  In the worst case, you
4749 +can feed many megabytes of uncompressed data into the library before
4750 +getting any compressed output, so this probably rules out applications
4751 +requiring interactive behaviour.
4752 +
4753 +These aren't faults of my implementation, I hope, but more
4754 +an intrinsic property of the Burrows-Wheeler transform (unfortunately).  
4755 +Maybe this isn't what you want.
4756 +
4757 +If you want a compressor and/or library which is faster, uses less
4758 +memory but gets pretty good compression, and has minimal latency,
4759 +consider Jean-loup
4760 +Gailly's and Mark Adler's work, @code{zlib-1.1.3} and
4761 +@code{gzip-1.2.4}.  Look for them at
4762 +
4763 +@code{http://www.zlib.org} and
4764 +@code{http://www.gzip.org} respectively.
4765 +
4766 +For something faster and lighter still, you might try Markus F X J
4767 +Oberhumer's @code{LZO} real-time compression/decompression library, at
4768 +@* @code{http://wildsau.idv.uni-linz.ac.at/mfx/lzo.html}.
4769 +
4770 +If you want to use the @code{bzip2} algorithms to compress small blocks
4771 +of data, 64k bytes or smaller, for example on an on-the-fly disk
4772 +compressor, you'd be well advised not to use this library.  Instead,
4773 +I've made a special library tuned for that kind of use.  It's part of
4774 +@code{e2compr-0.40}, an on-the-fly disk compressor for the Linux
4775 +@code{ext2} filesystem.  Look at
4776 +@code{http://www.netspace.net.au/~reiter/e2compr}.
4777 +
4778 +
4779 +
4780 +@section Testing
4781 +
4782 +A record of the tests I've done.
4783 +
4784 +First, some data sets:
4785 +@itemize @bullet
4786 +@item B: a directory containing 6001 files, one for every length in the
4787 +      range 0 to 6000 bytes.  The files contain random lowercase
4788 +      letters.  18.7 megabytes.
4789 +@item H: my home directory tree.  Documents, source code, mail files,
4790 +      compressed data.  H contains B, and also a directory of 
4791 +      files designed as boundary cases for the sorting; mostly very
4792 +      repetitive, nasty files.  565 megabytes.
4793 +@item A: directory tree holding various applications built from source:
4794 +      @code{egcs}, @code{gcc-2.8.1}, KDE, GTK, Octave, etc.
4795 +      2200 megabytes.
4796 +@end itemize
4797 +The tests conducted are as follows.  Each test means compressing 
4798 +(a copy of) each file in the data set, decompressing it and
4799 +comparing it against the original.
4800 +
4801 +First, a bunch of tests with block sizes and internal buffer
4802 +sizes set very small, 
4803 +to detect any problems with the
4804 +blocking and buffering mechanisms.  
4805 +This required modifying the source code so as to try to 
4806 +break it.
4807 +@enumerate
4808 +@item Data set H, with
4809 +      buffer size of 1 byte, and block size of 23 bytes.
4810 +@item Data set B, buffer sizes 1 byte, block size 1 byte.
4811 +@item As (2) but small-mode decompression.
4812 +@item As (2) with block size 2 bytes.
4813 +@item As (2) with block size 3 bytes.
4814 +@item As (2) with block size 4 bytes.
4815 +@item As (2) with block size 5 bytes.
4816 +@item As (2) with block size 6 bytes and small-mode decompression.
4817 +@item H with buffer size of 1 byte, but normal block
4818 +      size (up to 900000 bytes).
4819 +@end enumerate
4820 +Then some tests with unmodified source code.
4821 +@enumerate
4822 +@item H, all settings normal.
4823 +@item As (1), with small-mode decompress.
4824 +@item H, compress with flag @code{-1}.
4825 +@item H, compress with flag @code{-s}, decompress with flag @code{-s}.
4826 +@item Forwards compatibility: H, @code{bzip2-0.1pl2} compressing,
4827 +      @code{bzip2-0.9.5} decompressing, all settings normal.
4828 +@item Backwards compatibility:  H, @code{bzip2-0.9.5} compressing,
4829 +      @code{bzip2-0.1pl2} decompressing, all settings normal.
4830 +@item Bigger tests: A, all settings normal.
4831 +@item As (7), using the fallback (Sadakane-like) sorting algorithm.
4832 +@item As (8), compress with flag @code{-1}, decompress with flag
4833 +      @code{-s}.
4834 +@item H, using the fallback sorting algorithm.
4835 +@item Forwards compatibility: A, @code{bzip2-0.1pl2} compressing,
4836 +      @code{bzip2-0.9.5} decompressing, all settings normal.
4837 +@item Backwards compatibility:  A, @code{bzip2-0.9.5} compressing,
4838 +      @code{bzip2-0.1pl2} decompressing, all settings normal.
4839 +@item Misc test: about 400 megabytes of @code{.tar} files with
4840 +      @code{bzip2} compiled with Checker (a memory access error
4841 +       detector, like Purify).
4842 +@item Misc tests to make sure it builds and runs ok on non-Linux/x86
4843 +      platforms.
4844 +@end enumerate
4845 +These tests were conducted on a 225 MHz IDT WinChip machine, running
4846 +Linux 2.0.36.  They represent nearly a week of continuous computation.
4847 +All tests completed successfully.
4848 +
4849 +
4850 +@section Further reading
4851 +@code{bzip2} is not research work, in the sense that it doesn't present
4852 +any new ideas.  Rather, it's an engineering exercise based on existing
4853 +ideas.
4854 +
4855 +Four documents describe essentially all the ideas behind @code{bzip2}:
4856 +@example
4857 +Michael Burrows and D. J. Wheeler:
4858 +  "A block-sorting lossless data compression algorithm"
4859 +   10th May 1994. 
4860 +   Digital SRC Research Report 124.
4861 +   ftp://ftp.digital.com/pub/DEC/SRC/research-reports/SRC-124.ps.gz
4862 +   If you have trouble finding it, try searching at the
4863 +   New Zealand Digital Library, http://www.nzdl.org.
4864 +
4865 +Daniel S. Hirschberg and Debra A. LeLewer
4866 +  "Efficient Decoding of Prefix Codes"
4867 +   Communications of the ACM, April 1990, Vol 33, Number 4.
4868 +   You might be able to get an electronic copy of this
4869 +      from the ACM Digital Library.
4870 +
4871 +David J. Wheeler
4872 +   Program bred3.c and accompanying document bred3.ps.
4873 +   This contains the idea behind the multi-table Huffman
4874 +   coding scheme.
4875 +   ftp://ftp.cl.cam.ac.uk/users/djw3/
4876 +
4877 +Jon L. Bentley and Robert Sedgewick
4878 +  "Fast Algorithms for Sorting and Searching Strings"
4879 +   Available from Sedgewick's web page,
4880 +   www.cs.princeton.edu/~rs
4881 +@end example
4882 +The following paper gives valuable additional insights into the
4883 +algorithm, but is not immediately the basis of any code
4884 +used in bzip2.
4885 +@example
4886 +Peter Fenwick:
4887 +   Block Sorting Text Compression
4888 +   Proceedings of the 19th Australasian Computer Science Conference,
4889 +     Melbourne, Australia.  Jan 31 - Feb 2, 1996.
4890 +   ftp://ftp.cs.auckland.ac.nz/pub/peter-f/ACSC96paper.ps
4891 +@end example
4892 +Kunihiko Sadakane's sorting algorithm, mentioned above,
4893 +is available from:
4894 +@example
4895 +http://naomi.is.s.u-tokyo.ac.jp/~sada/papers/Sada98b.ps.gz
4896 +@end example
4897 +The Manber-Myers suffix array construction
4898 +algorithm is described in a paper
4899 +available from:
4900 +@example
4901 +http://www.cs.arizona.edu/people/gene/PAPERS/suffix.ps
4902 +@end example
4903 +Finally, the following paper documents some recent investigations
4904 +I made into the performance of sorting algorithms:
4905 +@example
4906 +Julian Seward:
4907 +   On the Performance of BWT Sorting Algorithms
4908 +   Proceedings of the IEEE Data Compression Conference 2000
4909 +     Snowbird, Utah.  28-30 March 2000.
4910 +@end example
4911 +
4912 +
4913 +@contents
4914 +
4915 +@bye
4916 +
4917 diff -Nru bzip2-1.0.2/doc/bzip2recover.1 bzip2-1.0.2.new/doc/bzip2recover.1
4918 --- bzip2-1.0.2/doc/bzip2recover.1      Thu Jan  1 01:00:00 1970
4919 +++ bzip2-1.0.2.new/doc/bzip2recover.1  Fri Feb  1 04:19:11 2002
4920 @@ -0,0 +1 @@
4921 +.so bzip2.1
4922 \ No newline at end of file
4923 diff -Nru bzip2-1.0.2/doc/bzmore.1 bzip2-1.0.2.new/doc/bzmore.1
4924 --- bzip2-1.0.2/doc/bzmore.1    Thu Jan  1 01:00:00 1970
4925 +++ bzip2-1.0.2.new/doc/bzmore.1        Sun Dec 30 03:12:35 2001
4926 @@ -0,0 +1,152 @@
4927 +.\"Shamelessly copied from zmore.1 by Philippe Troin <phil@fifi.org>
4928 +.\"for Debian GNU/Linux
4929 +.TH BZMORE 1
4930 +.SH NAME
4931 +bzmore, bzless \- file perusal filter for crt viewing of bzip2 compressed text
4932 +.SH SYNOPSIS
4933 +.B bzmore
4934 +[ name ...  ]
4935 +.br
4936 +.B bzless
4937 +[ name ...  ]
4938 +.SH NOTE
4939 +In the following description,
4940 +.I bzless
4941 +and
4942 +.I less
4943 +can be used interchangeably with
4944 +.I bzmore
4945 +and
4946 +.I more.
4947 +.SH DESCRIPTION
4948 +.I  Bzmore
4949 +is a filter which allows examination of compressed or plain text files
4950 +one screenful at a time on a soft-copy terminal.
4951 +.I bzmore
4952 +works on files compressed with
4953 +.I bzip2
4954 +and also on uncompressed files.
4955 +If a file does not exist,
4956 +.I bzmore
4957 +looks for a file of the same name with the addition of a .bz2 suffix.
4958 +.PP
4959 +.I Bzmore
4960 +normally pauses after each screenful, printing --More--
4961 +at the bottom of the screen.
4962 +If the user then types a carriage return, one more line is displayed.
4963 +If the user hits a space,
4964 +another screenful is displayed.  Other possibilities are enumerated later.
4965 +.PP
4966 +.I Bzmore
4967 +looks in the file
4968 +.I /etc/termcap
4969 +to determine terminal characteristics,
4970 +and to determine the default window size.
4971 +On a terminal capable of displaying 24 lines,
4972 +the default window size is 22 lines.
4973 +Other sequences which may be typed when
4974 +.I bzmore
4975 +pauses, and their effects, are as follows (\fIi\fP is an optional integer
4976 +argument, defaulting to 1) :
4977 +.PP
4978 +.IP \fIi\|\fP<space>
4979 +display
4980 +.I i
4981 +more lines, (or another screenful if no argument is given)
4982 +.PP
4983 +.IP ^D
4984 +display 11 more lines (a ``scroll'').
4985 +If
4986 +.I i
4987 +is given, then the scroll size is set to \fIi\|\fP.
4988 +.PP
4989 +.IP d
4990 +same as ^D (control-D)
4991 +.PP
4992 +.IP \fIi\|\fPz
4993 +same as typing a space except that \fIi\|\fP, if present, becomes the new
4994 +window size.  Note that the window size reverts back to the default at the
4995 +end of the current file.
4996 +.PP
4997 +.IP \fIi\|\fPs
4998 +skip \fIi\|\fP lines and print a screenful of lines
4999 +.PP
5000 +.IP \fIi\|\fPf
5001 +skip \fIi\fP screenfuls and print a screenful of lines
5002 +.PP
5003 +.IP "q or Q"
5004 +quit reading the current file; go on to the next (if any)
5005 +.PP
5006 +.IP "e or q"
5007 +When the prompt --More--(Next file: 
5008 +.IR file )
5009 +is printed, this command causes bzmore to exit.
5010 +.PP
5011 +.IP s
5012 +When the prompt --More--(Next file: 
5013 +.IR file )
5014 +is printed, this command causes bzmore to skip the next file and continue.
5015 +.PP 
5016 +.IP =
5017 +Display the current line number.
5018 +.PP
5019 +.IP \fIi\|\fP/expr
5020 +search for the \fIi\|\fP-th occurrence of the regular expression \fIexpr.\fP
5021 +If the pattern is not found,
5022 +.I bzmore
5023 +goes on to the next file (if any).
5024 +Otherwise, a screenful is displayed, starting two lines before the place
5025 +where the expression was found.
5026 +The user's erase and kill characters may be used to edit the regular
5027 +expression.
5028 +Erasing back past the first column cancels the search command.
5029 +.PP
5030 +.IP \fIi\|\fPn
5031 +search for the \fIi\|\fP-th occurrence of the last regular expression entered.
5032 +.PP
5033 +.IP !command
5034 +invoke a shell with \fIcommand\|\fP. 
5035 +The character `!' in "command" are replaced with the
5036 +previous shell command.  The sequence "\\!" is replaced by "!".
5037 +.PP
5038 +.IP ":q or :Q"
5039 +quit reading the current file; go on to the next (if any)
5040 +(same as q or Q).
5041 +.PP
5042 +.IP .
5043 +(dot) repeat the previous command.
5044 +.PP
5045 +The commands take effect immediately, i.e., it is not necessary to
5046 +type a carriage return.
5047 +Up to the time when the command character itself is given,
5048 +the user may hit the line kill character to cancel the numerical
5049 +argument being formed.
5050 +In addition, the user may hit the erase character to redisplay the
5051 +--More-- message.
5052 +.PP
5053 +At any time when output is being sent to the terminal, the user can
5054 +hit the quit key (normally control\-\\).
5055 +.I Bzmore
5056 +will stop sending output, and will display the usual --More--
5057 +prompt.
5058 +The user may then enter one of the above commands in the normal manner.
5059 +Unfortunately, some output is lost when this is done, due to the
5060 +fact that any characters waiting in the terminal's output queue
5061 +are flushed when the quit signal occurs.
5062 +.PP
5063 +The terminal is set to
5064 +.I noecho
5065 +mode by this program so that the output can be continuous.
5066 +What you type will thus not show on your terminal, except for the / and !
5067 +commands.
5068 +.PP
5069 +If the standard output is not a teletype, then
5070 +.I bzmore
5071 +acts just like
5072 +.I bzcat,
5073 +except that a header is printed before each file.
5074 +.SH FILES
5075 +.DT
5076 +/etc/termcap           Terminal data base
5077 +.SH "SEE ALSO"
5078 +more(1), less(1), bzip2(1), bzdiff(1), bzgrep(1)
5079 diff -Nru bzip2-1.0.2/doc/pl/Makefile.am bzip2-1.0.2.new/doc/pl/Makefile.am
5080 --- bzip2-1.0.2/doc/pl/Makefile.am      Thu Jan  1 01:00:00 1970
5081 +++ bzip2-1.0.2.new/doc/pl/Makefile.am  Fri Feb  1 04:19:11 2002
5082 @@ -0,0 +1,4 @@
5083 +
5084 +mandir = @mandir@/pl
5085 +man_MANS = bzip2.1 bunzip2.1 bzcat.1 bzip2recover.1
5086 +
5087 diff -Nru bzip2-1.0.2/doc/pl/bunzip2.1 bzip2-1.0.2.new/doc/pl/bunzip2.1
5088 --- bzip2-1.0.2/doc/pl/bunzip2.1        Thu Jan  1 01:00:00 1970
5089 +++ bzip2-1.0.2.new/doc/pl/bunzip2.1    Fri Feb  1 04:19:11 2002
5090 @@ -0,0 +1 @@
5091 +.so bzip2.1
5092 \ No newline at end of file
5093 diff -Nru bzip2-1.0.2/doc/pl/bzcat.1 bzip2-1.0.2.new/doc/pl/bzcat.1
5094 --- bzip2-1.0.2/doc/pl/bzcat.1  Thu Jan  1 01:00:00 1970
5095 +++ bzip2-1.0.2.new/doc/pl/bzcat.1      Fri Feb  1 04:19:11 2002
5096 @@ -0,0 +1 @@
5097 +.so bzip2.1
5098 \ No newline at end of file
5099 diff -Nru bzip2-1.0.2/doc/pl/bzip2.1 bzip2-1.0.2.new/doc/pl/bzip2.1
5100 --- bzip2-1.0.2/doc/pl/bzip2.1  Thu Jan  1 01:00:00 1970
5101 +++ bzip2-1.0.2.new/doc/pl/bzip2.1      Fri Feb  1 04:19:11 2002
5102 @@ -0,0 +1,384 @@
5103 +.\" T³umaczenie  Maciej Wojciechowski     wojciech@staszic.waw.pl
5104 +.PU
5105 +.TH bzip2 1 "" "" "wersja 1.0"
5106 +.SH NAZWA
5107 +bzip2, bunzip2 \- sortuj±cy bloki kompresor/dekompresor plików, v1.0
5108 +.br
5109 +bzcat \- dekompresuje pliki na standardowe wyj¶cie
5110 +.br
5111 +bzip2recover \- odzyskuje dane ze zniszczonych archiwów bzip2
5112 +.SH SK£ADNIA
5113 +.ll +8
5114 +.B bzip2
5115 +.RB [ \-cdfkqstvzVL123456789 ]
5116 +.RI [ nazwy_plików \&...]
5117 +.ll -8
5118 +.br
5119 +.B bunzip2
5120 +.RB [ \-fkvsVL ]
5121 +.RI [ nazwy_plików \&...]
5122 +.br
5123 +.B bzcat
5124 +.RB [ \-s ]
5125 +.RI [ nazwy_plików \&...]
5126 +.br
5127 +.B bzip2recover
5128 +.I nazwa_pliku
5129 +.SH OPIS
5130 +.I bzip2
5131 +kompresuje pliki u¿ywaj±c algorytmu sortowania bloków Burrowsa-Wheelera i 
5132 +kodu Huffmana. Kompresja jest generalnie sporo lepsza od konwencjonalnych 
5133 +kompresorów opartych o metodê LZ77/LZ78, i jest porównywalna z 
5134 +osi±gniêciami statystycznych kompresorów z rodziny PPM.
5135 +
5136 +Opcje linii poleceñ s± w wiêkszo¶ci bardzo podobne do tych z
5137 +.IR "GNU gzip" ,
5138 +ale nie s± identyczne.
5139 +
5140 +.I bzip2
5141 +oczekuje listy plików towarzysz±cych parametrom linii poleceñ. Ka¿dy plik jest 
5142 +zastêpowany przez swoj± skompresowan± wersjê, z nazw± 
5143 +"oryginalny_plik.bz2". Ka¿dy skompresowany plik ma ten sam czas modyfikacji, 
5144 +uprawnienia i, je¶li to mo¿liwe, w³a¶ciciela co orygina³, po to, aby te 
5145 +ustawienia mog³y zostaæ odtworzone podczas dekompresji. Utrzymywanie nazwy 
5146 +plików nie jest do koñca dok³adne w tym sensie, Â¿e nie ma mo¿liwo¶ci 
5147 +przetrzymywania daty, uprawnieñ, w³a¶ciciela i nazw plików na systemach, na 
5148 +których brakuje tych mo¿liwo¶ci lub maj± ograniczenia co do d³ugo¶ci nazwy, 
5149 +tak np. jak MS-DOS.
5150 +
5151 +.I bzip2
5152 +i
5153 +.I bunzip2
5154 +standardowo nie nadpisuj± istniej±cych ju¿ plików. Je¶li chcesz aby to 
5155 +robi³y, musisz u¿yæ parametru \-f.
5156 +
5157 +Je¶li nie podano Â¿adnej nazwy pliku,
5158 +.I bzip2
5159 +kompresuje ze standardowego wej¶cia na standardowe wyj¶cie. Odmiawia wówczas
5160 +wypisywania skompresowanego wyj¶cie na terminal, gdy¿ by³oby to
5161 +ca³kiem niezrozumia³e i przez to bez wiêkszego sensu.
5162 +
5163 +.I bunzip2
5164 +(lub
5165 +.IR bzip2 \-d ) 
5166 +dekompresuje wszystkie podane pliki. Pliki, które nie by³y 
5167 +utworzone przez
5168 +.I bzip2
5169 +zostan± wykryte i zignorowane, a na ekranie pojawi siê komunikat 
5170 +ostrzegawczy.
5171 +.I bzip2
5172 +próbuje zgadn±æ nazwê dla dekompresowanego pliku w nastêpuj±cy sposób:
5173 +.nf
5174 +       nazwa_pliku.bz2    staje siê   nazwa_pliku
5175 +       nazwa_pliku.bz     staje siê   nazwa_pliku
5176 +       nazwa_pliku.tbz2   staje siê   nazwa_pliku.tar
5177 +       nazwa_pliku.tbz    staje siê   nazwa_pliku.tar
5178 +       inna_nazwa        staje siê   inna_nazwa.out
5179 +.fi
5180 +Je¶li plik nie ma jednego z nastêpuj±cych rozpoznawalnych rozszerzeñ,
5181 +.IR .bz2 , 
5182 +.IR .bz , 
5183 +.I .tbz2
5184 +lub
5185 +.IR .tbz ,
5186 +to
5187 +.I bzip2 
5188 +napisze, Â¿e nie mo¿e zgadn±æ nazwy pierwotnego pliku, i u¿yje
5189 +oryginalnej nazwy z dodanym rozszerzeniem
5190 +.IR .out .
5191 +
5192 +Tak jak kompresja, nie posiadaj±ca Â¿adnych plików, powoduje kompresjê ze 
5193 +standardowego wej¶cia na standardowe wyj¶cie.
5194 +
5195 +.I bunzip2 
5196 +poprawnie zdekompresuje plik, który jest po³aczeniem dwóch lub wiêcej 
5197 +skompresowanych plików. Rezultatem jest po³±czony odpowiedni 
5198 +nieskompresowany plik. Obs³ugiwane jest równie¿ sprawdzanie spójno¶ci
5199 +(\-t) po³±czonych skompresowanych plików.
5200 +
5201 +Mo¿esz równie¿ kompresowaæ lub dekompresowaæ pliki na standardowe wyj¶cie 
5202 +u¿ywaj±c parametru \-c. W ten w³a¶nie sposób mo¿na przeprowadzaæ kompresjê
5203 +wielu plików równocze¶nie.
5204 +Powsta³e wyniki s± przesy³ane sekwencyjnie na standardowe wyj¶cie.
5205 +W ten sposób kompresja wielu plików generuje strumieñ 
5206 +zawieraj±cy reprezentacje kilku skompresowanych plików. Taki strumieñ mo¿e 
5207 +byæ zdekompresowany poprawnie tylko przez 
5208 +.I bzip2
5209 +w wersji 0.9.0 lub pó¼niejszej. Wcze¶niejsze wersje
5210 +.I bzip2
5211 +zatrzymaj± siê po zdekmpresowaniu pierwszego pliku w strumieniu.
5212 +
5213 +.I bzcat
5214 +(lub
5215 +.I bzip2 -dc) 
5216 +dekompresuje wszystkie wybrane pliki na standardowe wyj¶cie.
5217 +
5218 +.I bzip2
5219 +czyta argumenty ze zmiennych Â¶rodowiskowych
5220 +.I BZIP2
5221 +i
5222 +.I BZIP,
5223 +w podanej kolejno¶ci, i przetwarza je przed jakimikolwiek argumentami 
5224 +przeczytanymi z linii poleceñ. To dobra metoda na specyfikowanie 
5225 +standardowych ustawieñ.
5226 +
5227 +Kompresja stosowana jest zawsze, nawet je¶li skompresowany plik jest 
5228 +nieznaczniej wiêkszy od pliku oryginalnego. Pliki mniejsze ni¿ mniej wiêcej 
5229 +sto bajtów staj± siê wiêksze, poniewa¿ mechanizm kompresji ma sta³y 
5230 +nag³ówek wynosz±cy oko³o 50 bajtów. Przypadkowe dane (w³±czaj±c wyj¶cie 
5231 +wiêkszo¶ci kompresorów plików) d± kodowane na mniej wiêcej 8.05 bitu na 
5232 +bajt, daj±c zysk oko³o 0.5%.
5233 +
5234 +Jako samosprawdzenie dla twojej ochrony
5235 +.I bzip2
5236 +u¿ywa 32-bitowego CRC aby upewniæ siê, Â¿e zdekompresowana wersja pliku jest 
5237 +identyczna z oryginaln±. To strze¿e przed stratami w skompresowanych danych 
5238 +i przed niewykrytymi b³êdami w 
5239 +.I bzip2
5240 +(na szczê¶cie bardzo rzadkich). Mo¿liwo¶æ niewykrycia utraty danych 
5241 +jest mikroskopijna, mniej wiêcej jedna szansa na cztery biliony dla ka¿dego 
5242 +pliku. Uwa¿aj jednak, gdy¿ sprawdzenie jest dokonywane przed dekompresj±, 
5243 +wiêc dowiesz siê tylko tego, Â¿e co¶ jest nie w porz±dku. Nie pomo¿e ci to odzyskaæ 
5244 +oryginalnych nieskompresowanych danych. Mo¿esz u¿yæ
5245 +.I bzip2recover
5246 +aby spróbowaæ odzyskaæ dane z uszkodzonych plików.
5247 +
5248 +Zwracane warto¶ci: 0 dla normalnego wyj¶cia, 1 dla problemów technicznych 
5249 +(plik nie znaleziony, niew³a¶ciwy parametr, b³±d wyj¶cia/wyj¶cia itp.), 2 dla 
5250 +zasygnalizowania b³êdu skompresowanego pliku, 3 dla wewnêtrznego b³êdu (np. 
5251 +bug), który zmusi³ \fIbzip2\fP do przerwania.
5252 +
5253 +.SH OPCJE
5254 +.TP
5255 +.B \-c --stdout
5256 +Kompresuje lub dekompresuje na standardowe wyj¶cie.
5257 +.TP
5258 +.B \-d --decompress
5259 +Wymusza dekompresjê.
5260 +.IR bzip2 , 
5261 +.I bunzip2 
5262 +i
5263 +.I bzcat 
5264 +s± tak naprawdê tymi samymi programami i decyzja jakie akcje bêd± wykonane 
5265 +jest wykonywana na podstawie nazwy jaka zosta³a u¿yta. Ten parametr ma wy¿szy 
5266 +priorytet i wymusza na \fIbzip2\fP dekompresjê.
5267 +.TP
5268 +.B \-z --compress
5269 +Podobne do \-d: wymusza kompresjê, bez wzglêdu na sposób wywo³ania.
5270 +.TP
5271 +.B \-t --test
5272 +Sprawdza integralno¶æ wybranego pliku(ów), ale nie dekompresuje ich. Wymusza
5273 +to próbn± dekompresjê i mówi, jaki jest rezultat.
5274 +.TP
5275 +.B \-f --force
5276 +Wymusza zastêpowanie plików wyj¶ciowych. Normalnie, \fIbzip2\fP nie 
5277 +zastêpuje istniej±cych plików wyj¶ciowych. Wymusza równie¿ na \fIbzip2\fP 
5278 +³amanie dowi±zañ twardych, czego normalnie nie robi.
5279 +.TP
5280 +.B \-k --keep
5281 +Zatrzymaj (nie kasuj) pliki wej¶ciowe przy kompresji lub dekompresji.
5282 +.TP
5283 +.B \-s --small
5284 +Zredukuj u¿ycie pamiêci na kompresjê, dekompresjê i testowanie. Pliki s± 
5285 +dekompresowane i testowane przy u¿yciu zmodyfikowanego algorytmu, który 
5286 +potrzebuje tylko 2.5 bajtu na blok bajtów. Oznacza to, Â¿e ka¿dy plik mo¿e 
5287 +byæ zdekompresowany przy u¿yciu oko³o 2300k pamiêci, jednak trac±c oko³o po³owê 
5288 +normalnej szybko¶ci.
5289 +
5290 +Podczas kompresji, \-s wybiera bloki wielko¶ci 200k, których limity 
5291 +pamiêci wynosz± mniej wiêcej tyle samo, w zamian za jako¶æ kompresji. W 
5292 +skrócie, je¶li twój komputer ma ma³o pamiêci (8 megabajtów lub mniej), 
5293 +u¿ywaj opcji \-s do wszystkiego. Zobacz \fBzarz±dzanie pamiêci±\fP poni¿ej.
5294 +.TP
5295 +.B \-q --quiet
5296 +Wy³±cza wszystkie nieistotne komunikaty ostrzegawcze.
5297 +Nie s± eliminowane komunikaty dotycz±ce b³êdów wej¶cia/wyj¶cia i innych
5298 +zdarzeñ krytycznych.
5299 +.TP
5300 +.B \-v --verbose
5301 +Tryb gadatliwy -- pokazuje stopieñ kompresji dla ka¿dego pliku. Nastêpne 
5302 +\fB\-v\fP zwiêkszaj± stopieñ gadatliwo¶ci, powoduj±c wy¶wietlanie du¿ej 
5303 +ilo¶ci informacji, przydatnych g³ównie przy diagnostyce.
5304 +.TP
5305 +.B \-L --license -V --version
5306 +Wy¶wietla wersjê programu i warunki licencji.
5307 +.TP
5308 +.B \-1 to \-9
5309 +Ustawia wielko¶æ bloku na 100 k, 200 k .. 900 k przy kompresji. Nie ma 
5310 +¿adnego znaczenia przy dekompresji. Zobacz \fBzarz±dzanie pamiêci±\fP 
5311 +poni¿ej.
5312 +.TP
5313 +.B \--
5314 +Traktuje wszystkie nastêpuj±ce po nim argumenty jako nazwy plików, nawet je¶li 
5315 +zaczynaj± siê one od my¶lnika. Mo¿esz wiêc kompresowaæ i dekompresowaæ 
5316 +pliki, których nazwa zaczyna siê od my¶lnika, na przyk³ad: bzip2 \-- 
5317 +\-mój_plik.
5318 +.TP
5319 +.B \--repetitive-fast --repetitive-best
5320 +Te parametry nie maj± znaczenia w wersjach 0.9.5 i wy¿szych. Umo¿liwia³y one 
5321 +pewn± infantyln± kontrolê nad zachowaniem algorytmu sortuj±cego we 
5322 +wcze¶niejszych wersjach, co by³o czasami u¿yteczne. Wersje 0.9.5 i wy¿sze 
5323 +maj± usprawniony algorytm, który powoduje bezu¿yteczno¶æ tej funkcji.
5324 +
5325 +.SH ZARZ¡DZANIE PAMIÊCI¡
5326 +.I bzip2 
5327 +kompresuje du¿e pliki w blokach. Rozmiar bloku ma wp³yw zarówno na stopieñ 
5328 +osi±ganej kompresji, jak równie¿ na ilo¶æ pamiêci potrzebnej do kompresji 
5329 +i dekompresji. Parametry od \-1 do \-9 wybieraj± rozmiar bloku odpowiednio
5330 +od 100,000 bajtów a¿ do 900,000 bajtów (standardowo). W czasie dekompresji, 
5331 +rozmiar bloku u¿ytego do kompresji jest odczytywany z nag³ówku pliku 
5332 +skompresowanego i
5333 +.I bunzip2
5334 +sam zajmuje odpowiedni± do dekompresji ilo¶æ pamiêci. Poniewa¿ rozmiar
5335 +bloków jest przetrzymywany w pliku skompresowanym, parametry od \-1 do \-9 
5336 +nie maj± przy dekompresji Â¿adnego znaczenia.
5337 +
5338 +Wymagania kompresji i dekompresji w bajtach, mog± byæ wyliczone przez:
5339 +
5340 +       Kompresja :   400k + ( 8 x rozmiar bloku )
5341 +
5342 +       Dekompresja :  100k + ( 4 x rozmiar bloku ) lub
5343 +                      100k + ( 2.5 x rozmiar bloku )
5344 +
5345 +Wiêksze bloki daj± du¿e zmniejszenie zwrotów marginalnych. Wiêkszo¶æ 
5346 +kompresji pochodzi z pierwszych stu lub dwustu kilobajtów rozmiaru bloku.
5347 +Warto o tym pamiêtaæ u¿ywaj±c \fIbzip2\fP na wolnych 
5348 +komputerach. Warto równie¿ podkre¶liæ, Â¿e rozmiar pamiêci potrzebnej do 
5349 +dekompresji jest wybierany poprzez ustawienie odpowiedniej 
5350 +wielko¶ci bloku przy kompresji.
5351 +
5352 +Dla plików skompresowanych standardowym blokiem wielko¶ci 900k, 
5353 +\fIbunzip2\fP bêdzie wymaga³ oko³o 3700 kilobajtów do dekompresji. Aby 
5354 +umo¿liwiæ dekompresjê na komputerze wyposa¿onym jedynie w 4 megabajty 
5355 +pamiêci, \fIbunzip2\fP ma opcjê, która mo¿e zmniejszyæ wymagania prawie do 
5356 +po³owy, tzn. oko³o 2300 kilobajtów. Prêdko¶æ dekompresji jest równie¿ bardzo 
5357 +zmiejszona, wiêc u¿ywaj tej opcji tylko wtedy, kiedy jest to konieczne. Tym 
5358 +parametrem jest -s.
5359 +
5360 +Generalnie, próbuj i u¿ywaj najwiêkszych rozmiarów bloków, je¶li ilo¶æ 
5361 +pamiêci ci na to pozwala. Prêdko¶æ kompresji i dekompresji w zasadzie nie 
5362 +zale¿y od wielko¶ci u¿ytego bloku.
5363 +
5364 +Inna wa¿na rzecz dotyczy plików, które mieszcz± siê w pojedyñczym bloku -- 
5365 +oznacza to wiêkszo¶æ plików na które siê natkniesz u¿ywaj±c du¿ych bloków. 
5366 +Rozmiar realny pamiêci zabieranej jest proporcjonalny do wielko¶ci pliku, 
5367 +je¶li plik jest mniejszy ni¿ blok. Na przyk³ad, kompresja pliku o 
5368 +wielko¶ci 20,000 bajtów z parametrem -9 wymusi na kompresorze odnalezienie 
5369 +7600 k pamiêci, ale zajêcie tylko 400k + 20000 * 8 = 560 kilobajtów z 
5370 +tego. Podobnie, dekompresor odnajdzie 3700k, ale zajmie tylko 100k + 20000 
5371 +* 4 = 180 kilobajtów.
5372 +
5373 +Tu jest tabela, która podsumowuje maksymalne u¿ycie pamiêci dla ró¿nych 
5374 +rozmiarów bloków. Podano te¿ ca³kowity rozmiar skompresowanych 14 
5375 +plików tekstowych (Calgary Text Compressione Corpus) zajmuj±cych razem 
5376 +3,141,622 bajtów. Ta kolumna daje pewne pojêcie o tym, jaki wp³yw na 
5377 +kompresjê ma wielko¶æ bloków. Ta tabela uzmys³awia równie¿ przewagê u¿ycia 
5378 +wiêkszych bloków dla wiêkszych plików, poniewa¿ "Corpus" jest zdominowany 
5379 +przez mniejsze pliki.
5380 +.nf
5381 +             U¿ycie       U¿ycie        U¿ycie         Corpus
5382 +   Parametr kompresji   dekompresji   dekompresji -s    Size
5383 +
5384 +     -1      1200k         500k          350k          914704
5385 +     -2      2000k         900k          600k          877703
5386 +     -3      2800k         1300k         850k          860338
5387 +     -4      3600k         1700k        1100k          846899
5388 +     -5      4400k         2100k        1350k          845160
5389 +     -6      5200k         2500k        1600k          838626
5390 +     -7      6100k         2900k        1850k          834096
5391 +     -8      6800k         3300k        2100k          828642
5392 +     -9      7600k         3700k        2350k          828642
5393 +.fi
5394 +.SH ODZYSKIWANIE DANYCH ZE ZNISZCZONYCH PLIKÓW BZIP2
5395 +.I bzip2
5396 +kompresuje pliki w blokach, zazwyczaj 900 kilbajtowych. Ka¿dy blok jest 
5397 +trzymany osobno. Je¶li b³êdy transmisji lub no¶nika uszkodz± plik 
5398 +wieloblokowy .bz2, mo¿liwe jest odtworzenie danych zawartych w 
5399 +niezniszczonych blokach pliku.
5400 +
5401 +Ka¿dy blok jest reprezentowany przez 48-bitowy wzorzec, który umo¿liwia 
5402 +znajdowanie przyporz±dkowañ bloków z rozs±dn± pewno¶ci±. Ka¿dy blok 
5403 +ma równie¿ swój 32-bitowy CRC, wiêc bloki uszkodzone mog± byæ Â³atwo 
5404 +odseparowane od poprawnych.
5405 +
5406 +.I bzip2recover
5407 +jest oddzielnym programem, którego zadaniem jest poszukiwanie bloków w 
5408 +plikach .bz2 i zapisywanie ich do w³asnego pliku .bz2. Mo¿esz potem u¿yæ 
5409 +\fIbzip2\fP \-t aby sprawdziæ spójno¶æ wyj¶ciowego pliku i zdekompresowaæ 
5410 +te, które nie s± uszkodzone.
5411 +
5412 +.I bzip2recover
5413 +pobiera pojedynczy argument, nazwê uszkodzonego pliku, i tworzy pewn± liczbê 
5414 +plików "rec0001plik.bz2", "rec0002plik.bz2", itd., przetrzymuj±ce odzyskane 
5415 +bloki. Wyj¶ciowe nazwy plików s± tak tworzone, aby Â³atwo by³o potem u¿ywaæ 
5416 +ich razem za pomoc± gwiazdek -- na przyk³ad, "bzip2 -dc rec*plik.bz2 > 
5417 +odzyskany_plik" -- wylistuje pliki we w³a¶ciwej kolejno¶ci.
5418 +
5419 +.I bzip2recover
5420 +powinien byæ u¿ywany najczê¶ciej z du¿ymi plikami .bz2, jako i¿ one 
5421 +zawieraj± najczê¶ciej du¿o bloków. Jest czystym bezsensem u¿ywaæ go na 
5422 +uszkodzonym jedno-blokowym pliku, poniewa¿ uszkodzony blok nie mo¿e byæ 
5423 +odzyskany. Je¶li chcesz zminimalizowaæ jakiekolwiek mo¿liwe straty danych 
5424 +poprzez no¶nik lub transmisjê, powiniene¶ zastanowiæ siê nad u¿yciem 
5425 +mniejszych bloków.
5426 +
5427 +.SH OPISY WYNIKÓW
5428 +Etap sortuj±cy kompresji Â³Â±czy razem podobne ci±gi znaków w pliku. Przez 
5429 +to, pliki zawieraj±ce bardzo d³ugie ci±gi powtarzaj±cych siê symboli, jak 
5430 +"aabaabaabaab ..." (powtórzone kilkaset razy) mog± byæ kompresowane wolniej 
5431 +ni¿ normalnie. Wersje 0.9.5 i wy¿sze zachowuj± siê du¿o lepiej w tej 
5432 +sytuacji ni¿ wersje poprzednie. Ró¿nica stopnia kompresji pomiêdzy 
5433 +najgorszym i najlepszym przypadkiem kompresji wynosi oko³o 10:1. Dla 
5434 +wcze¶niejszych wersji by³o to nawet oko³o 100:1. Je¶li chcesz, mo¿esz u¿yæ
5435 +parametru \-vvvv aby monitorowaæ postêpy bardzo szczegó³owo.
5436 +
5437 +Prêdko¶æ dekompresji nie jest zmieniana przez to zjawisko.
5438 +
5439 +.I bzip2
5440 +zazwyczaj rezerwuje kilka megabajtów pamiêci do dzia³ania a 
5441 +potem wykorzystuje j± w sposób zupe³nie przypadkowy.
5442 +Oznacza to, Â¿e zarówno prêdko¶æ kompresji jak i dekompresji jest w 
5443 +du¿ej czê¶ci zale¿na od prêdko¶ci, z jak± twój komputer mo¿e naprawiaæ braki 
5444 +bufora podrêcznego. Z tego powodu, wprowadzone zosta³y ma³e zmiany kody aby 
5445 +zmniejszyæ straty, które da³y nieproporcjonalnie du¿y wzrost osi±gniêæ.
5446 +My¶lê, Â¿e
5447 +.I bzip2
5448 +bêdzie dzia³a³ najlepiej na komputerach z du¿ymi buforami podrêcznymi.
5449 +
5450 +.SH ZAKAMARKI
5451 +Wiadomo¶ci o b³êdach wej¶cia/wyj¶cia nie s± a¿ tak pomocne, jak mog³yby byæ.
5452 +.I bzip2
5453 +stara siê wykryæ b³±d wej¶cia/wyj¶cia i wyj¶æ "czysto", ale 
5454 +szczegó³y tego, jaki to problem mog± byæ czasami bardzo myl±ce.
5455 +
5456 +Ta strona podrêcznika odnosi siê do wersji 1.0 programu \fIbzip2\fP.
5457 +Skompresowane pliki utworzone przez tê wersjê s± kompatybilne zarówno z 
5458 +w przód jak i wstecznie z poprzednimi publicznymi wydaniami, 
5459 +wersjami 0.1pl2, 0.9.0 i 0.9.5 ale z ma³ymi wyj±tkami: 0.9.0 i wy¿sze potrafi± 
5460 +poprawnie dekompresowaæ wiele skompresowanych plików z³±czonych w jeden. 
5461 +0.1pl2 nie potrafi tego; zatrzyma siê ju¿ po dekompresji pierwszego pliku w 
5462 +strumieniu.
5463 +
5464 +.I bzip2recover
5465 +u¿ywa 32-bitowych liczb do reprezentacji pozycji bitu w skompresowanym 
5466 +pliku, wiêc nie mo¿e przetwarzaæ skompresowanych plików d³u¿szych ni¿ 512 
5467 +megabajtów. Mo¿na to Â³atwo naprawiæ.
5468 +
5469 +.SH AUTOR
5470 +Julian Seward, jseward@acm.org.
5471 +
5472 +http://www.muraroa.demon.co.uk
5473 +http://sourceware.cygnus.com/bzip2
5474 +
5475 +Idee zawarte w \fIbzip2\fP s± podzielone (przynajmniej) pomiêdzy 
5476 +nastepuj±cy ludzi: Michael Burrows i David Wheeler (transformacja
5477 +sortuj±c± bloki), David Wheeler (znów, koder Huffmana), Peter Fenwick 
5478 +(struktura kodowania modelu w oryginalnym \fIbzip2\fP, i wiele 
5479 +udoskonaleñ), i Alistair Moffar, Radford Neal i Ian Witten (arytmetyczny 
5480 +koder w oryginalnym \fIbzip2\fP). Jestem im bardzo wdziêczny za ich pomoc, 
5481 +wsparcie i porady. Zobacz stronê manuala w Â¼ród³owej dystrybucji po 
5482 +wska¼niki do Â¼róde³ dokumentacji. Christian von Roques zachêci³ mnie do 
5483 +wymy¶lenia szybszego algorytmu sortuj±cego, po to Â¿eby przyspieszyæ 
5484 +kompresjê. Bela Lubkin zachêci³a mnie do polepszenia najgorszych wyników 
5485 +kompresji. Wiele ludzi przys³a³o Â³atki, pomog³o w ró¿nych problemach, 
5486 +po¿yczy³o komputerów, da³o rady i by³o ogólnie pomocnych.
5487 diff -Nru bzip2-1.0.2/doc/pl/bzip2recover.1 bzip2-1.0.2.new/doc/pl/bzip2recover.1
5488 --- bzip2-1.0.2/doc/pl/bzip2recover.1   Thu Jan  1 01:00:00 1970
5489 +++ bzip2-1.0.2.new/doc/pl/bzip2recover.1       Fri Feb  1 04:19:11 2002
5490 @@ -0,0 +1 @@
5491 +.so bzip2.1
5492 \ No newline at end of file
5493 diff -Nru bzip2-1.0.2/huffman.c bzip2-1.0.2.new/huffman.c
5494 --- bzip2-1.0.2/huffman.c       Sun Dec 30 03:19:17 2001
5495 +++ bzip2-1.0.2.new/huffman.c   Fri Feb  1 04:19:11 2002
5496 @@ -58,6 +58,10 @@
5497    For more information on these sources, see the manual.
5498  --*/
5499  
5500 +#ifdef HAVE_CONFIG_H
5501 +#include <config.h>
5502 +#endif
5503 +
5504  
5505  #include "bzlib_private.h"
5506  
5507 diff -Nru bzip2-1.0.2/makefile.msc bzip2-1.0.2.new/makefile.msc
5508 --- bzip2-1.0.2/makefile.msc    Wed Jan  2 05:02:33 2002
5509 +++ bzip2-1.0.2.new/makefile.msc        Thu Jan  1 01:00:00 1970
5510 @@ -1,63 +0,0 @@
5511 -# Makefile for Microsoft Visual C++ 6.0\r
5512 -# usage: nmake -f makefile.msc\r
5513 -# K.M. Syring (syring@gsf.de)\r
5514 -# Fixed up by JRS for bzip2-0.9.5d release.\r
5515 -\r
5516 -CC=cl\r
5517 -CFLAGS= -DWIN32 -MD -Ox -D_FILE_OFFSET_BITS=64 -nologo\r
5518 -\r
5519 -OBJS= blocksort.obj  \\r
5520 -      huffman.obj    \\r
5521 -      crctable.obj   \\r
5522 -      randtable.obj  \\r
5523 -      compress.obj   \\r
5524 -      decompress.obj \\r
5525 -      bzlib.obj\r
5526 -\r
5527 -all: lib bzip2 test\r
5528 -\r
5529 -bzip2: lib\r
5530 -       $(CC) $(CFLAGS) -o bzip2 bzip2.c libbz2.lib setargv.obj\r
5531 -       $(CC) $(CFLAGS) -o bzip2recover bzip2recover.c\r
5532 -\r
5533 -lib: $(OBJS)\r
5534 -       lib /out:libbz2.lib $(OBJS)\r
5535 -\r
5536 -test: bzip2\r
5537 -       type words1\r
5538 -       .\\bzip2 -1  < sample1.ref > sample1.rb2\r
5539 -       .\\bzip2 -2  < sample2.ref > sample2.rb2\r
5540 -       .\\bzip2 -3  < sample3.ref > sample3.rb2\r
5541 -       .\\bzip2 -d  < sample1.bz2 > sample1.tst\r
5542 -       .\\bzip2 -d  < sample2.bz2 > sample2.tst\r
5543 -       .\\bzip2 -ds < sample3.bz2 > sample3.tst\r
5544 -       @echo All six of the fc's should find no differences.\r
5545 -       @echo If fc finds an error on sample3.bz2, this could be\r
5546 -       @echo because WinZip's 'TAR file smart CR/LF conversion'\r
5547 -       @echo is too clever for its own good.  Disable this option.\r
5548 -       @echo The correct size for sample3.ref is 120,244.  If it\r
5549 -       @echo is 150,251, WinZip has messed it up.\r
5550 -       fc sample1.bz2 sample1.rb2 \r
5551 -       fc sample2.bz2 sample2.rb2\r
5552 -       fc sample3.bz2 sample3.rb2\r
5553 -       fc sample1.tst sample1.ref\r
5554 -       fc sample2.tst sample2.ref\r
5555 -       fc sample3.tst sample3.ref\r
5556 -\r
5557 -\r
5558 -\r
5559 -clean: \r
5560 -       del *.obj\r
5561 -       del libbz2.lib \r
5562 -       del bzip2.exe\r
5563 -       del bzip2recover.exe\r
5564 -       del sample1.rb2 \r
5565 -       del sample2.rb2 \r
5566 -       del sample3.rb2\r
5567 -       del sample1.tst \r
5568 -       del sample2.tst\r
5569 -       del sample3.tst\r
5570 -\r
5571 -.c.obj: \r
5572 -       $(CC) $(CFLAGS) -c $*.c -o $*.obj\r
5573 -\r
5574 diff -Nru bzip2-1.0.2/manual.ps bzip2-1.0.2.new/manual.ps
5575 --- bzip2-1.0.2/manual.ps       Sat Jan  5 01:52:57 2002
5576 +++ bzip2-1.0.2.new/manual.ps   Thu Jan  1 01:00:00 1970
5577 @@ -1,3991 +0,0 @@
5578 -%!PS-Adobe-2.0
5579 -%%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software
5580 -%%Title: manual.dvi
5581 -%%Pages: 40
5582 -%%PageOrder: Ascend
5583 -%%BoundingBox: 0 0 596 842
5584 -%%EndComments
5585 -%DVIPSWebPage: (www.radicaleye.com)
5586 -%DVIPSCommandLine: dvips -o manual.ps manual.dvi
5587 -%DVIPSParameters: dpi=600, compressed
5588 -%DVIPSSource:  TeX output 2002.01.05:0052
5589 -%%BeginProcSet: texc.pro
5590 -%!
5591 -/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
5592 -N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72
5593 -mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0
5594 -0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{
5595 -landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize
5596 -mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[
5597 -matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round
5598 -exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{
5599 -statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0]
5600 -N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin
5601 -/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array
5602 -/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2
5603 -array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N
5604 -df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A
5605 -definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get
5606 -}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub}
5607 -B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr
5608 -1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3
5609 -1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx
5610 -0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx
5611 -sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{
5612 -rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp
5613 -gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B
5614 -/chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{
5615 -/cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{
5616 -A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy
5617 -get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse}
5618 -ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp
5619 -fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17
5620 -{2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add
5621 -chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{
5622 -1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop}
5623 -forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn
5624 -/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put
5625 -}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{
5626 -bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A
5627 -mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{
5628 -SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{
5629 -userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X
5630 -1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4
5631 -index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N
5632 -/p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{
5633 -/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT)
5634 -(LaserWriter 16/600)]{A length product length le{A length product exch 0
5635 -exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse
5636 -end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask
5637 -grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot}
5638 -imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round
5639 -exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto
5640 -fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p
5641 -delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M}
5642 -B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{
5643 -p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S
5644 -rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end
5645 -
5646 -%%EndProcSet
5647 -TeXDict begin 39158280 55380996 1000 600 600 (manual.dvi)
5648 -@start
5649 -%DVIPSBitmapFont: Fa cmbxti10 14.4 1
5650 -/Fa 1 47 df<13FCEA03FF000F13804813C05AA25AA2B5FCA31480A214006C5A6C5A6C5A
5651 -EA0FE0121271912B>46 D E
5652 -%EndDVIPSBitmapFont
5653 -%DVIPSBitmapFont: Fb cmti10 10.95 26
5654 -/Fb 26 122 df<DA0780150EDA3FE0151FDA7870153F4A6C157E902601E03C15FC902603
5655 -C01CEC01F8902607801EEC07F0010FD91F80130F90271F001DE0EB7FE0923A1CFC07FFC0
5656 -013E91391FFF9F80933903F83F004991C7123E6001FC16FC494B5A4D5A033C495A000102
5657 -38495A495E4DC7FC03785B0370137E495D00039138F001F84B485A02015C00014A485A91
5658 -3803800F0207495A4B48C8FC020E137E2600F01E5B4A5B9039787001F090383FE0039027
5659 -0F8007E013F090C7390FC007FC92391F800F0E92393F001E07033E133C4B903878038003
5660 -FC13F0913801F801913903F003E0EC07E091390FC007C0158091391F000F805C027E131F
5661 -4A1400495A494815074A4914004948133E130F49485D49C7140E017E143C49027C131E49
5662 -161C4848163C0003033C133848485E484816F048485E48C8495A003EED1E03484C5A00FC
5663 -DB0F0EC7FC48ED07FC0070ED01F0404974C34A>37 D<EA01E0EA07F8120FA2EA1FFCA4EA
5664 -0FF8EA0798EA001813381330A21370136013E013C01201EA0380EA07001206120E5A5A5A
5665 -5A5A0E1C7A891C>44 D<120FEA3FC0127FA212FFA31380EA7F00123C0A0A77891C>46
5666 -D<15FE913807FF8091381F07C091387C01F0ECF000494813F8494813780107147C495A49
5667 -C7FC167E133E137EA25BA2485AA2000315FEA25B000715FCA2491301120FA34848EB03F8
5668 -A44848EB07F0A448C7EA0FE0A316C0007E141F12FE1680153FA2481500A2157EA25DA25D
5669 -4813015D6C495A127C4A5A4A5A6C49C7FC143E6C5B380FC1F03803FFC0C648C8FC273F76
5670 -BC2E>48 D<15031507150F151F151E153E157EEC01FEEC03FC1407141FEB01FF90380FFB
5671 -F8EB1FC3EB0E07130015F0A2140FA215E0A2141FA215C0A2143FA21580A2147FA21500A2
5672 -5CA25CA21301A25CA21303A25CA21307A25CA2130FA25CA2131FA25CEB7FE0B612F0A215
5673 -E0203D77BC2E>I<EB03C0EB07F0130FEB1FF8133FA214F0EB1FE014C0EB078090C7FCB3
5674 -EA01E0EA07F0487EA2121FA46C5AEA07B0EA003013701360A213E05B12015B120348C7FC
5675 -1206120E5A5A123012705A5A15397AA61C>59 D<147E49B47E903907C1C38090391F80EF
5676 -C090383F00FF017E137F4914804848133F485AA248481400120F5B001F5C157E485AA215
5677 -FE007F5C90C7FCA21401485C5AA21403EDF0385AA21407EDE078020F1370127C021F13F0
5678 -007E013F13E0003E137FECF3E1261F01E313C03A0F8781E3803A03FF00FF00D800FC133E
5679 -252977A72E>97 D<EB1FC0EA0FFF5CA2EA003FA291C7FCA25BA2137EA213FEA25BA21201
5680 -A25BA21203A25B147E3907F1FF809038F783E09038EF01F013FE390FF800F8A24913FC49
5681 -137C485A157E5B15FE123FA290C7FCA248130115FC127EA2140300FE14F85AA2EC07F0A2
5682 -15E048130F15C0141F15800078EB3F00127C147E003C5B383E01F8381E03E06C485A6CB4
5683 -C7FCEA01F81F4076BE2A>I<EC1FC0ECFFF0903803F03C903807C01E90381F800E90383F
5684 -000F017E133F4913FF485A485A000714FE5B000F14FC48481300A2485AA3127F90C8FCA3
5685 -5A5AA6481403007E1407150F151E003E143C15786C14F0EC03E0390F800F803903E07E00
5686 -3801FFF838003FC0202977A72A>I<EE3F80ED1FFF1700A2ED007FA2167EA216FEA25EA2
5687 -1501A25EA21503A25EA21507A25E147E903801FF8F903807C1CF90391F80EFC090383F00
5688 -FF017E137F5B48486D5A485AA2485A000F92C7FC5B001F5CA24848137EA215FE127F90C7
5689 -5AA214015A485CA2140316384814F0A21407167891380FE070127C021F13F0007E013F5B
5690 -003E137FECF3E1261F01E35B3A0F8781E3802703FF00FFC7FCD800FC133E294077BE2E>
5691 -I<EC3F80903801FFE0903807E0F890381F803CEB3E0001FC131E485A485A12074848133E
5692 -49133C121F4848137C15F8EC03F0397F000FE0ECFF809038FFFC00B512C048C8FCA45AA6
5693 -1506150E151E007C143C15786C14F0EC01E06CEB07C0390F801F003807C0FC3801FFF038
5694 -007F801F2976A72A>I<167C4BB4FC923807C78092380F83C0ED1F87161FED3F3FA2157E
5695 -A21780EE0E004BC7FCA414015DA414035DA30103B512F8A390260007E0C7FCA3140F5DA5
5696 -141F5DA4143F92C8FCA45C147EA414FE5CA413015CA4495AA4495AA4495A121E127F5C12
5697 -FF49C9FCA2EAFE1EEAF83C1270EA7878EA3FE0EA0F802A5383BF1C>I<EB01FC13FF5CA2
5698 -1303A25CA21307A25CA2130FA25CA2131FA25CA2133FA291C8FCEC03F890387F0FFE9138
5699 -3E0F80D97E7813C0ECE007D9FFC013E014801400A2485A5BA25B0003140F16C05BA20007
5700 -141F16805BA2000F143F16005B5D001F147EEDFE074913FCA2003F0101130FEDF80E1300
5701 -161E48ECF01CA2007E1538A200FE1570020013E048EC7FC00038EC1F0028407ABE2E>
5702 -104 D<1478EB01FCA21303A314F8EB00E01400AD137C48B4FC38038F80EA0707000E13C0
5703 -121E121CEA3C0F1238A2EA781F00701380A2EAF03F140012005B137E13FE5BA212015BA2
5704 -12035B1438120713E0000F1378EBC070A214F0EB80E0A2EB81C01383148038078700EA03
5705 -FEEA00F8163E79BC1C>I<EB07F0EA03FF14E0A2EA000FA214C0A2131FA21480A2133FA2
5706 -1400A25BA2137EA213FEA25BA21201A25BA21203A25BA21207A25BA2120FA25BA2121FA2
5707 -5BA2123FA290C7FCA25A1307127EA2EAFE0F130E12FCA2131E131CA2EA7C381378EA3C70
5708 -EA1FE0EA0780144079BE17>108 D<D801F0D93F80137F3D07FC01FFE003FFC03D0F3E07
5709 -C1F80F83F03D0E1F0F00FC1E01F8001E011C90387C3800001C49D97E707F003C01F05C00
5710 -38157F4A5C26783FC05C12704A91C7FC91C7127E00F003FE1301494A5CEA007EA2030114
5711 -0301FE5F495CA203031407000160495C180F03075D0003051F13E0494A1480A2030FEC3F
5712 -810007F001C0495CA2031F91383E0380120F494AEC0700A2033F150E001FEF1E1C4991C7
5713 -EA0FF80007C7000EEC03E0432979A74A>I<D801F0EB3F803A07FC01FFE03A0F3E07C1F8
5714 -3A0E1F0F00FC001E011C137C001C49137E003C13F012385C38783FC012705C91C7FC00F0
5715 -15FE495CEA007EA2150101FE5C5BA2150300015D5B15075E0003020F13704914C0A2031F
5716 -13F00007ED80E05B1681EE01C0120F49EC0380A2EE0700001FEC0F0E49EB07FC0007C7EA
5717 -01F02C2979A733>I<EC1FC0ECFFF8903803F07C90380FC01FEB1F8090393F000F80017E
5718 -14C0491307484814E0485A12075B000F15F0485AA2485AA2ED0FE0127F90C7FCA2151F48
5719 -15C05AA2ED3F80A2ED7F00A248147E007C5C007E13015D4A5A003E495A6C495A4A5A260F
5720 -803EC7FC3807C0FC3801FFF038003F80242977A72E>I<903903E001F890390FF807FE90
5721 -3A1E7C1E0F80903A1C3E3C07C0013C137801389038E003E0EB783F017001C013F0ED8001
5722 -9038F07F0001E015F8147E1603000113FEA2C75AA20101140717F05CA20103140F17E05C
5723 -A20107EC1FC0A24A1480163F010F15005E167E5E131F4B5A6E485A4B5A90393FB80F80DA
5724 -9C1FC7FCEC0FFCEC03E049C9FCA2137EA213FEA25BA21201A25BA21203A2387FFFE0B5FC
5725 -A22D3A80A72E>I<D801F013FC3A07FC07FF803A0F3E0F03C0260E1F1C13E0001EEB380F
5726 -001C1370003CEBE01F123814C0D8783F14C00070903880070092C7FC91C8FC12F05BEA00
5727 -7EA313FE5BA312015BA312035BA312075BA3120F5BA3121F5B0007C9FC232979A726>
5728 -114 D<EC7F80903801FFE0903807C0F890381F003C013E131C013C131E017C133E49137E
5729 -15FEA2000114FCA215706D13007FEBFFC014FC6C13FF15806D13C06D13E0010F13F01300
5730 -140F14071403120C123F387F80011403D8FF0013E0A300FCEB07C000F0EB0F8012700078
5731 -EB1F006C133C381F01F83807FFE0C690C7FC1F297AA725>I<EB01C0EB03F01307A25CA2
5732 -130FA25CA2131FA25CA2133FA291C7FCA2007FB51280B6FC1500D8007EC7FC13FEA25BA2
5733 -1201A25BA21203A25BA21207A25BA2120FA25BA2121F141C1380A2003F133C1438EB0078
5734 -147014F05C495AEA1F03495A6C48C7FCEA07FCEA01F0193A78B81E>I<137C48B4141C26
5735 -038F80137EEA0707000E7F001E15FE121CD83C0F5C12381501EA781F007001805BA2D8F0
5736 -3F1303140000005D5B017E1307A201FE5C5B150F1201495CA2151F0003EDC1C0491481A2
5737 -153F1683EE0380A2ED7F07000102FF13005C01F8EBDF0F00009038079F0E90397C0F0F1C
5738 -90391FFC07F8903907F001F02A2979A731>I<017CEB01C048B4EB07F038038F80EA0707
5739 -000E01C013F8121E001C1403EA3C0F0038EC01F0A2D8781F130000705BA2EAF03F91C712
5740 -E012005B017E130116C013FE5B1503000115805BA2ED07001203495B150EA25DA25D1578
5741 -000114706D5B0000495A6D485AD97E0FC7FCEB1FFEEB03F0252979A72A>I<017C167048
5742 -B491387001FC3A038F8001F8EA0707000E01C015FE001E1403001CEDF000EA3C0F003817
5743 -7C1507D8781F4A133C00701380A2D8F03F130F020049133812005B017E011F14784C1370
5744 -13FE5B033F14F0000192C712E05BA2170100034A14C049137E17031880A2EF070015FE17
5745 -0E00010101141E01F86D131C0000D9039F5BD9FC076D5A903A3E0F07C1E0903A1FFC03FF
5746 -C0902703F0007FC7FC372979A73C>I<137C48B4143826038F8013FCEA0707000E7F001E
5747 -1401001C15F8EA3C0F12381503D8781F14F000701380A2D8F03F1307020013E012005B01
5748 -7E130F16C013FE5B151F1201491480A2153F000315005BA25D157EA315FE5D00011301EB
5749 -F8030000130790387C1FF8EB3FF9EB07E1EB00035DA21407000E5CEA3F80007F495AA24A
5750 -5AD8FF0090C7FC143E007C137E00705B387801F0383803E0381E0FC06CB4C8FCEA03F826
5751 -3B79A72C>121 D E
5752 -%EndDVIPSBitmapFont
5753 -%DVIPSBitmapFont: Fc cmtt12 14.4 10
5754 -/Fc 10 123 df<EC3FF80103B57E010F14E0013F14F84914FE48B7FC4816C048D9C01F7F
5755 -270FFE00017F49EB007FD81FF0EC1FF848486E7E160748486E7E4914018300FF81A26D16
5756 -80177FA36C5AA26CC9FCCAFCA217FF1800A25E5F16035F16075F160F4C5A163F4C5A5F4C
5757 -5A4B90C7FCED07FE4B5A4B5A4B5A4B5A4B5A4A5B4A90C8FCEC0FFE4A5AEC3FF04A5A4A5A
5758 -495B4990C9FCEB0FFC495A495A495A4948143F485B4890C8EA7F80EA0FFC485A48B8FC5A
5759 -B9FCA36C17007E314A7AC93E>50 D<383FFF805AB57EA37E7EEA003FAEED07FC92383FFF
5760 -8092B512E002C314F802CF8002DF8091B7FCDBF80F1380DBC00113C092C713E04A143F4A
5761 -EC1FF04A15F84A140F4AEC07FCA217034A15FE1701A318FF83A95F18FEA280170318FC6E
5762 -140718F86E140FEF1FF06E143F6EEC7FE06EECFFC0DBC0031380EDF01F92B6120002DF14
5763 -FC02CF5C02C35CD91F8114C090260F807F90C7FC90C7EA0FF8384A7FC83E>98
5764 -D<923803FFF85D4B7FA38181ED0003AEEC1FF0ECFFFE0103EBFF83010F14E34914F3017F
5765 -14FB90B7FC48EBF80F48EBC00191C7FC4848143F4848141F5B4848140F491407123F4914
5766 -03127F5BA312FF90C8FCA97F127FA216077F123F6D140FA26C6C141F6D143F000F157F6C
5767 -6C14FF01FF5B6C6D5A6CD9F01FEBFFFC6C90B500FB13FE6D02F313FF6D14E3010F14C36D
5768 -020113FE010101FC14FC9026003FE0C8FC384A7CC83E>100 D<143E147F4A7E497FA56D
5769 -5B6EC8FC143E91C9FCAC003FB57E5A81A47EC7123FB3B3007FB71280B812C0A56C16802A
5770 -4A76C93E>105 D<007FB512C0B6FC81A47EC7121FB3B3B3A5007FB712F8B812FCA56C16
5771 -F82E4978C83E>108 D<EC1FF0ECFFFE01036D7E010F14E04980017F14FC90B67E489038
5772 -F01FFFECC00748D90001138048486D13C04848EC7FE049143F4848EC1FF049140F003F16
5773 -F8491407A24848EC03FCA448C8EA01FEAA6D1403007F16FCA26D1407A2003F16F86D140F
5774 -6C6CEC1FF0A26C6CEC3FE06D147F6C6CECFFC06D5B6CD9C00713806CD9F01F13006C90B5
5775 -5A6D5C6D5C010F14E001031480010049C7FCEC1FF02F3679B43E>111
5776 -D<ED07FC3B3FFF803FFF804891B512E0B500C314F802CF8002DF806C90B7FC6CDAF80F13
5777 -80D8003FD9C00113C092C713E04A143F4AEC1FF04A15F84A140F4AEC07FCA217034A15FE
5778 -1701A318FF83A95F18FEA280170318FC6E140718F86E140FEF1FF06E143F6EEC7FE06EEC
5779 -FFC0DBC0031380EDF01F92B6120002DF14FC02CF5C02C35C02C114C0DAC07F90C7FCED0F
5780 -F892C9FCB3003FB512C04880B67EA36C5C6C5C384F7FB33E>I<903901FFF00F011F9038
5781 -FE1F8090B612BF000315FF5A5A5A393FFE003F01F01307D87FC0130190C8FC5A48157FA4
5782 -7EEE3F00D87FC091C7FC13F0EA3FFE381FFFF06CEBFFC06C14FE6C6E7EC615E0013F14F8
5783 -010780D9003F7F02007F03071380030013C0003EED3FE0007F151F48150F17F06D1407A3
5784 -7FA26D140F6D15E0161F01FCEC3FC06D14FF9026FFC00F138091B612005E485D013F5C6D
5785 -14E0D8FC0714802778007FF8C7FC2C3677B43E>115 D<147C14FC497EAD003FB712FC5A
5786 -B87EA36C5EA2260001FEC9FCB3A6173FA2EF7F80A76E14FF6D16006F5A9238C007FE9138
5787 -7FF01F92B55A6E5C6E5C6E5C6E1480020149C7FC9138003FF031437DC13E>I<000FB812
5788 -804817C04817E0A418C001C0C712014C13804C1300EE1FFE4C5AEE7FF06C484A5A4B5BC8
5789 -485B4B90C7FC4B5A4B5A4B5A4B5A4B5A4A5B4A5B4A90C8FC4A5A4A5A4A5A4A5A4A5A495B
5790 -495B4990C9FC495A495A4948EC0FC0495A4948EC1FE0485B00075B4890C8FCEA1FFC485A
5791 -485A90B8FCB9FCA46C17C07E33337CB23E>122 D E
5792 -%EndDVIPSBitmapFont
5793 -%DVIPSBitmapFont: Fd cmtt12 13.14 31
5794 -/Fd 31 123 df<903801FFC0010F13F8013F13FF4914C048B67E48814815FC4801007FD8
5795 -1FF8130F01E0EB03FF48480100138049EC7FC0007F153F90C8121F4816E0160F17F07F16
5796 -07A36CC8FC123EC9FCA2160F17E0A2161F17C0163FA2EE7F80EEFF00A24B5A4B5A15074B
5797 -5A4B5A4B5A4B5A4B5A020390C7FC4A5A4A5A4A5A4A5AEC7FC049485A4990C8FC495A495A
5798 -495AEB3FE0EBFFC04849EB03E04890C7EA07F0485A485AEA1FF048B7FC5AB8FCA37E6C16
5799 -E02C447AC338>50 D<003FB6FC4815E0B712F882826C816C16802701FC000113C0923800
5800 -7FE0161FEE0FF0A2160717F81603A6160717F0A2160FEE1FE0163FEE7FC0923801FF8003
5801 -0F130090B65A5E16F08216FEEEFF8017C001FCC7EA7FE0EE1FF0EE07F8160317FCEE01FE
5802 -1600A217FF177FA717FF17FE16011603EE07FC160FEE3FF8EEFFF0003FB7FC4816E0B812
5803 -C01780EEFE006C15F86C15C030437DC238>66 D<DA07FC133C91393FFF807E91B512E001
5804 -03ECF8FE4914FC4914FF5B90383FFE0390387FF000D9FFC0133F4849131F91C7120F4848
5805 -1407485A49140348481401A2485AA248481400A25BA2007F167C90CAFCA35A5AAD7E7EA3
5806 -7F003F167C17FE7FA26C7EA26C6C140117FC6C7E6D14036C6C15F86C6C14076EEB0FF06C
5807 -6D131FD97FF0EB7FE0903A3FFE03FFC06DB612806D15006D5C6D5C010014F0023F13C0DA
5808 -07FCC7FC2F457CC338>I<007FB512F8B7FC16C08216F8826C813A03F8001FFF15070301
5809 -13806F13C0167FEE3FE0161FEE0FF0A2EE07F8A2EE03FCA21601A217FE1600A4177FAD17
5810 -FF17FEA4160117FCA2160317F81607A2EE0FF0161FEE3FE0167FEEFFC04B13805D031F13
5811 -00007FB65AB75A5E5E16C093C7FC6C14F830437DC238>I<007FB712FCB87EA57ED801FC
5812 -C8FCA9177C94C7FCA6ED07C04B7EA590B6FCA79038FC000FA56F5A92C9FCA7EF0F80EF1F
5813 -C0AA007FB8FCB9FCA56C178032437DC238>I<91391FF003C091397FFC07E049B5FC0107
5814 -14CF4914EF4914FF5B90387FF81F9038FFE00748EB800191C7FC4848147F485A49143F48
5815 -5A161F485AA249140F123F5BA2127F90C8EA07C093C7FCA35A5AAA923807FFFC4B13FE4B
5816 -13FF7E7E6F13FE6F13FC9238000FE07F003F151FA27F121F7F163F6C7EA26C6C147F7F6C
5817 -6C14FF6C6C5B6E5A6C6D5A90387FF81F6DB6FC6D14EF6D14CF6D148F0101140F903A007F
5818 -FC07C0DA1FF0C7FC30457CC338>71 D<007FB612F0B712F8A56C15F0260001FCC7FCB3B3
5819 -B1007FB612F0B712F8A56C15F0254377C238>73 D<90380FFFFE90B612E0000315F84881
5820 -48814881A2273FFE000F138001F01301497F49147F4848EC3FC0A290C8121FA44816E0A2
5821 -48150FB3AC6C151FA36C16C0A36D143FA36C6CEC7F806D14FF6D5B01FE130F6CB71200A2
5822 -6C5D6C5D6C5DC615E0010F49C7FC2B457AC338>79 D<003FB512F04814FEB77E16E0826C
5823 -816C813A01FC003FFEED07FF03017F81707E163F161F83160FA7161F5F163F167F4C5A5D
5824 -030790C7FCED3FFE90B65A5E5E5EA282829038FC001FED07FC6F7E150115008282AA18E0
5825 -EF01F0EF03F8A31783EE3F87263FFFE0ECC7F0486D14FFB56C7F18E07013C06C496D1380
5826 -6C496D1300CA12FC35447EC238>82 D<003FB8FC481780B9FCA53BFE0007F0003FA9007C
5827 -EE1F00C792C7FCB3B3A70107B512F04980A56D5C31437DC238>84
5828 -D<267FFFF090387FFFF0B56C90B512F8A56C496D13F0D801FCC73801FC00B3B3A66D1403
5829 -00005EA36D14076D5D6E130F6D6C495A6E133F6D6C495A6D6C495AECFF076D90B5C7FC6D
5830 -5C6D5C6D5C023F13E0020F1380DA03FEC8FC35447FC238>I<D83FFE913803FFE0486C4A
5831 -13F0B56C4913F8A36C90C76C13F06C486E13E0D80FC09138001F80A36C6CED3F00A86C6C
5832 -157EA86C6C5DEC01FC4A7EA24A7EA4D800FC9038DF01F8020F1381A3158F021F13C1A201
5833 -7C5DA2017E14C31507023F13E3A490263E3E035BA2027E13F3A2EC7C01013F14F7A3011F
5834 -5DEC7800A202F813FFA34A137F010F5DA24A133F6D486DC7FC35447FC238>87
5835 -D<001FB712F04816F85AA417F090C8121F17E0EE3FC0167F1780EEFF00A24B5A4B5A123E
5836 -C8485A4B5AA24B5A4B5AA24B5A4BC7FCA24A5A14035D4A5A140F5D4A5A143F5D4A5A14FF
5837 -92C8FC495A13035C495AA2495A495AA2495A495A17F849C7EA01FC485AA2485A485AA248
5838 -5A121F5B485A127F90B7FCB8FCA56C16F82E437BC238>90 D<003FB712804816C0B812E0
5839 -A46C16C06C16802B087A7D38>95 D<EB1FFF90B512E0000314F84814FE4880824881D9F0
5840 -017F9138003FF0ED0FF815076C486D7E6C481301C87FA21500A4EC03FF147F0107B5FC13
5841 -1F90B6FC5A000714C048EBE0004890C7FCEA3FF813E0EA7F8090C8FC5A5AA415017E6C6C
5842 -13036D13076C6CEB3FFFD9FC01B6FC6CB812807E6C816C4A7E6CECF80F6C6CD9C0031300
5843 -D90FFCC9FC31327AB038>97 D<EA3FFE487EB5FCA37E7EC67EACED3FC0913801FFF80207
5844 -13FE021F7F4A804A8091B67E03C07F9139FE001FF802F86D7E4A13034A6D7E5C707E4A80
5845 -188091C8123FA318C0171FA9173F6E1580A2177FA26EECFF00A26E495A6E13034C5A6E49
5846 -5A02FE133F6E6CB45A92B55A6E5C6E5C6E91C7FC6D6C13FCD91E0313F090C7EA7F803244
5847 -7FC238>I<EC3FFF49B512E0010714F8011F8049805B90B7FC48EBE001481300485AEA0F
5848 -F8496D5A4848147C93C7FC485A5B127F90CAFCA35A5AA97E7EA27F123F6D141F6DEC3F80
5849 -121F6C7E01FC147F6C6CECFF006C6C6C5A6C9038F00FFE91B55A6C6C5C6D5C6D5C010714
5850 -80010149C7FC9038003FF0293278B038>I<ED1FFF4B7F5DA38181ED003FACEC7F809038
5851 -03FFF0010F13FC013F13FF4914BF90B7FC5A48EBC07F48EB000FD80FFC7F497F48487F49
5852 -7F485A167F485A163F90C8FCA25A5AA97E6C157FA36D14FF123F6D5B6C7E5D6C6C5B01FC
5853 -5B6C6C133F2603FFC0B6FC6C90B712806C03BF13C06D143F6D13FC6D01F814800107D9E0
5854 -1F1300010090C9FC32447CC238>I<EC3FE0903801FFFC010713FF011F14C04980498090
5855 -B67E489038E03FFC4890380007FE48481301D80FF86D7E49804848158049143F003F16C0
5856 -49141F127F90C8FC17E0160F5A90B7FCA617C048CAFC7E7EA27FA26C7EEE07C06C6CEC0F
5857 -E07F6C7ED807FE141F6DEC3FC06C01C013FF6CD9FC0713806C90B612006D5C6D5C010F5C
5858 -010314E001001480DA1FFCC7FC2B327AB038>I<ED1FF8ED7FFE4AB5FC020714804A14C0
5859 -5C5C91387FF07F15809139FF003F804AEB1F00010191C7FC5CA9003FB612FE4881B8FCA4
5860 -6C5D260001FCC8FCB3AF003FB612E04881A56C5D2A447CC338>I<14F0497E497E497EA4
5861 -6D5A6D5A6D5A91C8FCAB383FFFFC487FB5FCA37E7EC7FCB3AF007FB612F0B712F816FCA3
5862 -16F86C15F0264476C338>105 D<387FFFFEB6FCA57EC77EB3B3B1007FB7FCB81280A56C
5863 -1600294379C238>108 D<023FEB07E03B3FE0FFC01FF8D87FF39038E07FFCD8FFF76D48
5864 -7E90B500F97F15FB6C91B612806C01C1EBF83F00030100EBE01F4902C013C0A24990387F
5865 -800FA2491400A349137EB3A73C3FFF03FFE07FFC4801879038F0FFFEB500C76D13FFA36C
5866 -01874913FE6C01039038E07FFC383080AF38>I<ED7FC03A3FFE01FFF8267FFF0713FEB5
5867 -001F7F4A805C6C90B67E6CECC07F3B007FFE001FE002F8130F4A805C16075C5CA391C7FC
5868 -B3A6273FFFFE03B512E0486D4814F0B6008F14F8A36C020714F06C496C14E035307FAF38
5869 ->I<EC7FC0903803FFF8010F13FE497F017F14C090B67E4881489038C07FF8489038001F
5870 -FC01FC130748486D7E49130148486D7E4980003F168049143F007F16C090C8121FA300FE
5871 -ED0FE0A96C151FA26C16C0A26D143FA26C6CEC7F80A26C6CECFF006D5B6C6C495A6D1307
5872 -6CB4EB1FFC6C9038C07FF86C90B55A6C5D6D5C6D5C010F49C7FC010313F89038007FC02B
5873 -327AB038>I<ED3FC03A3FFE01FFF8267FFF0713FEB5001F7F4A804A806C90B67E6C02C0
5874 -7F3B007FFE001FF802F86D7E4A13034A6D7E5C707E4A80188091C8123FA318C0171FA917
5875 -3F6E1580A2177FA26EECFF00A26E495A6E13034C5A6E495A02FE133F6E6CB45A92B55A6E
5876 -5C6E5C6E91C7FC6E13FC020313F09138007F8092C9FCB0383FFFFE487FB67EA36C91C9FC
5877 -6C5B32487FAF38>I<EEFFC0277FFFC00713F8B5D8E01F13FC037F13FE92B5FC02E114FF
5878 -14E36C01E713813A000FEFFC019139FFF000FE4B137C0380130092C8FCA25C5CA25CA25C
5879 -A45CB2007FB67EB77E82A35E6C5D30307CAF38>114 D<903907FF80F0017FEBF1F848B5
5880 -12FD000714FF5A5A5AEBFC00D87FE0131F0180130F48C71207481403A5007FEC01F001C0
5881 -90C7FCEA3FF013FE381FFFF86CEBFFC0000314F8C614FF013F1480010714E0D9003F13F0
5882 -020013F8ED0FFC1503003CEC01FE007E140000FE15FF167F7EA37F6D14FF16FE01F01303
5883 -6DEB07FC01FF137F91B512F816F016E04815C0D8FC3F1400010F13FCD8780113E0283278
5884 -B038>I<EB01E0497E1307AB003FB712804816C0B8FCA46C1680260007F0C8FCB3A4EE03
5885 -E0EE07F0A66E130F17E06D6C131F6EEB3FC0903901FF81FF92B512806D15006E5B6E5B6E
5886 -13F002075B020190C7FC2C3D7DBB38>I<D83FFE903803FFE0486C497FB55BA36C806C80
5887 -C66CEB0007B3A9160FA2161F163F6E137F6D6C13FFDAF007EBFFE091B712F06D16F87F6D
5888 -14E76D02C713F00100020313E0DA3FF8C8FC35307FAE38>I<000FB712FC4816FE5AA417
5889 -FC0180C7EA1FF8EE3FF0EE7FE0EEFFC04B13804B13006CC7485AC8485A4B5A4B5A4B5A4B
5890 -5A4A5B4A90C7FCEC07FC4A5A4A5A4A5A4A5A49485A4990C8FC495A495A495A495A494814
5891 -7C494814FE485B4890C8FC485A485A485A485A48B7FCB8FCA56C16FC2F2F7DAE38>122
5892 -D E
5893 -%EndDVIPSBitmapFont
5894 -%DVIPSBitmapFont: Fe cmbx12 13.14 53
5895 -/Fe 53 122 df<923803FFE092B512FC020714FF021F81027F9038007FC0DAFFF0EB0FE0
5896 -010301C0804990C7EA3FF84948147F4A81494814FF495AA2137F5CA2715A715A715AEF07
5897 -8094C8FCA8EF07FCB9FCA526007FF0C7123F171FB3B3003FB5D8E00FB512F8A53D4D7ECC
5898 -44>12 D<B7FCAA200A7F9C29>45 D<EA07E0EA1FF8EA3FFCEA7FFEA2B5FCA6EA7FFEA2EA
5899 -3FFCEA1FF8EA07E01010778F22>I<177817F8EE01FCA21603A2EE07F8A217F0160FA217
5900 -E0161FA2EE3FC0A21780167FA217005EA24B5AA25E1503A24B5AA25E150FA25E151FA24B
5901 -5AA25E157FA24BC7FCA25D1401A25D1403A24A5AA25D140FA24A5AA25D143FA25D147FA2
5902 -4AC8FCA25C1301A25C1303A2495AA25C130FA2495AA25C133FA25C137FA249C9FCA25B12
5903 -01A2485AA25B1207A25B120FA2485AA25B123FA25B127FA248CAFCA25AA2127CA22E6D79
5904 -D13D>I<15F014011407141F147FEB03FF137FB6FCA313FC1380C7FCB3B3B2007FB712E0
5905 -A52B4777C63D>49 D<ECFFF80107EBFF80013F14F090B612FC4881480101EBFF802707F8
5906 -003F13C0D80FE0010F13E0D81F806D13F0003F80D87FF06D13F86D15FC6D7F00FF16FE6D
5907 -147FA217FF82A36C5A6C5A6C5A6C5AC95A17FEA3EEFFFCA24B13F817F05D17E04B13C017
5908 -804B13004B5A4B5A5EED7FE04B5A4A5B4A90C7FCEC07FC4A5A4A5A4B131FEC3F804AC7FC
5909 -14FE4948143E495AEB07E0495A4948147E49C8FC017E15FE90B7FC4816FC5A5A5A5A5A5A
5910 -B8FC17F8A430477AC63D>I<EC3FFE0103B512E0010F14FC013F14FF90267FE01F7F9026
5911 -FF000713E0D801FC6D7FD803F07F486C6D7FD80FFE817F486D80167FA3805C16FF7E91C7
5912 -5B6C5A6C5AD80020495B90C75C5D5F4B5B5F031F90C7FCED3FFC4AB45A49B512E0168016
5913 -E016FC90C7EA3FFF030713C06F7F6F7F6F7F83707E83A2701380A318C0EA07E0EA1FF848
5914 -7E487EA2B5FCA31880A25E491600127F494A5A6C485D01E05B001F4A5BD80FFC495B2707
5915 -FFC03F13C06C90B65AC64BC7FC013F14F8010714E09026007FFEC8FC32487BC63D>I<EE
5916 -07E0160FA2161F163F167F16FFA25D5D5DA25D5D5DA2157D15FDEC01F915F1EC03E11407
5917 -EC0FC1EC1F811501143F147E14FC14F8EB01F01303EB07E014C0EB0F80131FEB3F00133E
5918 -5B13FC485A485A5B1207485A485A90C7FC123E127E5AB912FCA5C80003EBE000AD023FB6
5919 -12FCA536487DC73D>I<D8038015E001E0140301FC143F9039FFE003FF91B612C0178017
5920 -00A25E5E16F05E5E93C7FC15FC15F001E790C8FC01E0C9FCAAEC1FFC01E1B512C001E714
5921 -F001EF14FC9039FFE01FFFDA0007138001FC6D13C001F06D13E04915F0497F17F8C913FC
5922 -167F17FEA417FFA3EA0FC0EA3FF0487EA2487EA317FEA34914FF6C4815FC5B018015F86C
5923 -C74813F07F6C6C4913E0D80FF04913C0D807FC011F13806CB46CB512006C90B512FC6C5D
5924 -013F14C0010F91C7FC010113F030487AC63D>I<ED7FF8913807FFFE021F6D7E027F8090
5925 -3A01FFF01FE0010790388003F04948486C7E49486D7ED93FF013074948130F01FF4A7E48
5926 -49133F5C5A4890C7FCA25A705A48486E5A705A003F92C8FCA3485AA21520913807FFE002
5927 -1F13FC00FF497F4A6D7EDAFC017F9026FDF0007F4A6D7ED9FFC06D7E4A6D7E8391C7FC83
5928 -82491680A318C05BA3127FA6123FA27F001F1780A3000F4B1300A26C6C5DA26C6D495A6C
5929 -6D5C6C6D495A6D6C48485A90263FFC075B6DB65A6D4AC7FC01035C010014F0020F90C8FC
5930 -32487BC63D>I<121F7F7F13FE90B812E0A45A18C0188018005F5FA25F485E90C8EA07E0
5931 -007E4B5A5F007C151F4CC7FC167E5E485D15014B5A4B5AC8485A4B5AA24BC8FC157EA25D
5932 -1401A24A5A1407A24A5AA2141FA24A5AA2147FA314FFA3495BA45BA55BAA6D5BA26D90C9
5933 -FCEB007C334B79C93D>I<EC1FFF49B512F0010714FC011F14FF90263FF00713C049C77F
5934 -01FCEC3FF04848EC0FF848481407000782491403000F821601A2121F7FA27F13FE6D1403
5935 -02C05C14F002FC495A6C6D130FDAFF805B9238E01FE06C6E485A9238FCFF806C91B5C7FC
5936 -6C15FC6C5D7F6D14FE6D806D15C06D81011F81017F81D9FFDF804813072603FE01804848
5937 -6C804848133F4848010F1480003F8049130148486D6C13C0161F824848140382A282A217
5938 -7FA218807F127FEFFF007F6C6C4A5AA2D81FFC4A5A6C6CEC0FF86C6C6CEB3FF06C9039F0
5939 -03FFE06C90B612806C6C92C7FC011F14FC010714E09026003FFEC8FC32487BC63D>I<EC
5940 -1FFE49B512C0010F14F04914FC90397FFC0FFE903AFFE003FF804849C67F48496D7E4890
5941 -C7FC486F7E484881161F003F825B007F82A28300FF81A31880A518C0A45E127FA3003F5D
5942 -7F121F5E120F6C6C91B5FC6C90388001EF6CEBC0036C9038E00FCF6DB5128F011F140F01
5943 -0701FE1480010113F8903800010091C7FCA24C1300A3D803F85D487E487E486C4A5AA25F
5944 -4C5AA24C5A49495B6C485D49010790C7FC01E0495AD807F8EB3FFC6CB448B45A6C90B55A
5945 -6C15C06D91C8FC011F13FC010313C032487BC63D>I<EE01F8A24C7EA34C7EA24C7EA34C
5946 -7FA24C7FA34C7FA293B57EA34B8016F303038016E316E103078016C0030F805E83031F81
5947 -4C7E4B81153E83037E81037C7F03FC815D830201824B7F0203825D830207824B7F020F82
5948 -5D84021F8392B8FC4A83A34A83027CC8120F02FC835C840101844A810103845C84010784
5949 -4A81010F845C85011F85496C82B600C091B712F0A5544D7CCC5D>65
5950 -D<93261FFF80EB01C00307B500F81303033F02FE13074AB7EA800F0207EEE01F021F903A
5951 -FE007FF83F027F01E0903807FC7F91B5C73801FEFF010301FCEC007F4901F0814901C015
5952 -0F4949814990C97E494882495A48498248197F5C48193F5C48191F5C48190FA2485BA21A
5953 -075AA391CDFCA2B5FCAD7EA280F207C0A27EA36C7F1A0F6C1A80806C191F6E18006C6180
5954 -6C197E6C6D177C6D6C17FC6D6C4C5A6D6D4B5A6D6D4B5A6D01F0ED1FC06D01FC4B5A0100
5955 -01FF03FFC7FC6E01E0EB07FE021F01FEEB3FFC020790B612F0020116C0DA003F92C8FC03
5956 -0714F8DB001F13804A4D79CB59>67 D<B912F0F0FF8019F019FC19FFD8001F9026800001
5957 -14C0DD001F7F060713F806017F726C7E737E737F737F737F8587737F8587A2747EA38786
5958 -A21C80A51CC0A586A462A51C80A51C00A26263A2631AFF636163614F5B634F5B073F90C7
5959 -FC4F5A4F5A06035B061F5B4DB512C0BBC8FC19FC19F0198006F0C9FC524B7CCA5E>I<BB
5960 -12C0A486D8000F01E0C77E18071801F0007F193F191F190F1907861903A31901A3EF0F80
5961 -A2737EA497C7FC171FA2173F177F17FF160392B6FCA5EDE0031600177F173F171FA2050F
5962 -EC0F80A3F21F00A494C8FC621A3EA21A7EA31AFE6219011903A21907190FF13FF819FF18
5963 -03183FBBFCA262A3494A7CC951>I<BBFCA41A80D8001F01C0C7FC181F18038484197F19
5964 -3F191F1AC0190FA31907A4171FF103E0A496C7FCA25FA25F5F5E160792B6FCA5EDC00716
5965 -01828383A283A794C9FCB1B8FCA5434A7CC94D>I<93261FFF80EB01C00307B500F81303
5966 -033F02FE13074AB7EA800F0207EEE01F021F903AFE007FF83F027F01E0903807FC7F91B5
5967 -C73801FEFF010301FCEC007F4901F0814901C0150F4949814990C97E494882495A484982
5968 -48197F5C48193F5C48191F5C48190FA2485BA21A075AA391CEFCA2B5FCAD7E050FB712C0
5969 -80A37E94C7001FEBC000807EA27E807E807E806C7F7E6D7E6D7E6D7F6D01E05D6D6D5D6D
5970 -13FC010001FF4AB5FC6E01E0EB07F9021F01FFEB3FF0020791B5EAE07F0201EEC01FDA00
5971 -3FED0007030702F81301DB001F018090C8FC524D79CB60>I<B7D8FC01B712FCA5D8001F
5972 -01C0C8001FEBC000B3AA92B9FCA503C0C8121FB3AEB7D8FC01B712FCA5564B7BCA60>I<
5973 -B712FEA5D8000FEBE000B3B3B3ABB712FEA5274B7DCA2E>I<B8FCA5D8001F01C0C9FCB3
5974 -B3A4193EA4197E197CA519FCA31801A2F003F8A21807180F181F183F187FEF01FF170717
5975 -3FBA12F0A53F4B7BCA4A>76 D<B600E04DB612806F5FA26F5FA2D8001F09FCC7FC6FEF0F
5976 -7FA2DABFFE171EA2DA9FFF173CA3028F6D1678A202876D16F0A202836DED01E0A302816D
5977 -ED03C0A202806DED0780A26F6CED0F00A36F6C151EA26F6C5DA26F6D5CA26F6D5CA36F6D
5978 -495AA26F6D495AA26F6D495AA3706C49C7FCA2706C131EA2706C5BA3706D5AA2706D5AA2
5979 -70EBE1E0A370EBF3C0A270EBFF80A27190C8FCA2715AA3715AA2715A497EB600F06D4801
5980 -03B71280A3715A715A694B7BCA74>I<B600E092B612FC8181A281D8001F6D9239001FE0
5981 -006F705A82A28202BF7F029F7FA2028F7F02877F02837F8214810280806F7F6F7F83816F
5982 -7F6F7F6F7F83816F80707F707F8482707F707F707FA2707F7014807113C019E0837113F0
5983 -7113F87113FC19FE837113FF71148F7213CF1AEF847213FF8484A284848485A2858585A2
5984 -85858585497EB600F8167F1A3F1A1F1A0FA2564B7BCA60>I<EEFFF8031FEBFFC04AB612
5985 -FC020715FF021FD9C01F13C091277FFE000313F0902601FFF09038007FFC49496E7E4901
5986 -80EC0FFF4990C86C7F49486F7F49486F7F017F8449486F7F4849707EA24849707E4885A2
5987 -4849701380A2481AC04A82A2481AE0A34890CA6C13F0A5B519F8AE6C1AF0A26E5EA36C1A
5988 -E0A26E5E6C1AC0A26C1A806E5E6C1A006E5E6C616E16FF6C616C6D4B5B6D6C4B5B6E5D6D
5989 -6D4A5B6D6D4A5B01076D4A90C7FC6D01F8ECFFFE6D01FE01035B9028007FFFC01F13F002
5990 -1F90B612C0020793C8FC020115FCDA001F14C0030101FCC9FC4D4D79CB5C>I<B912C018
5991 -FCF0FF8019F085D8001F902680000713FE05007F063F1380060F13C07213E01AF0841AF8
5992 -A27213FCA31AFEA81AFCA34E13F8A21AF0601AE04E13C0063F138095B51200050713FC92
5993 -B75A19E096C7FC18F803C0CAFCB3ABB712FCA5474B7BCA54>I<B9FC18F8F0FF8019E019
5994 -F8D8000F9026C0000713FE9439007FFF80061F7F727F727F727F84868684A286A862A24E
5995 -5BA2624E5B4E5B4E5B4E5B95B5C8FC050713FC92B712F0198006FCC9FC18FF9226C0003F
5996 -13C0050713F0717F717F717F187F85727FA28486A786A71C3E86A28474137E72157C726D
5997 -13FCB700FC6D9038FE01F872EBFF8373EBFFF0071F14E007031480CD383FFE00574C7CCA
5998 -5C>82 D<DA7FFCEB01C00103B5EAC003011FECF00749ECFC0F90B7121F48D9E00F13BF48
5999 -90C713FFD807FC141F4848804848140382484880177F485A173F171F12FFA2170F7FA217
6000 -077F7F7F6D92C7FC6D7E6C13F014FF15F86CECFF8016F86C15FF6C16C0836C826C826C82
6001 -6C82013F816D1680010716C01300020F15E01400030714F0ED007F160F16037013F88217
6002 -7F127800F8163FA3171FA27E18F0A27EA26CEE3FE07F18C001E0157F6DEDFF8001FC1600
6003 -01FF140302E0EB0FFED97FFEEB3FFC486CB612F0D8FC0F5DD8F803158048C66C49C7FC48
6004 -010313F0354D79CB44>I<003FBB12C0A5DA80019038FC001FD9FC001601D87FF0943800
6005 -7FE001C0183F49181F90C7170FA2007E1907A3007C1903A500FC1AF0481901A5C894C7FC
6006 -B3B3A749B812FCA54C4A7CC955>I<B700F8023FB512F8A5D8001F01C0C9380FE000745A
6007 -B3B3AD6D180F63811A1F6D96C7FC626D7F1A7E6D7F6D606E6C4B5A6E6CED07F06E6C4B5A
6008 -6E01C0EC3FC06E01F049B45A020101FF011F90C8FC6E91B55A033F15F8030715E0030092
6009 -C9FC040713F0554C7CCA5E>I<B700F00203B6FCA5D8001F01E0C93803FC00745A6D6181
6010 -1A036D6D5F1A076D6D5F1A0F6D616F161FA26D6D94C7FC626E6D153E1A7E6E177C7015FC
6011 -6E5F8219016E6D5D19036E5F7014076E5F82190F6E6D5D191F6E6D92C8FC616F153E8319
6012 -7E6F6D137C19FC6F6D5B18016F5DEFF003A26F01F85B18076F01FC5B180F6F5DEFFE1F6F
6013 -92C9FC17FF607013BE18FE705BA2705BA3705BA2705BA2705BA3705BA27090CAFCA2177E
6014 -A2584C7ECA5D>I<B700F84AB6FCA5D8001F01F0C93803FC006F705A6D4E5A6D6D4C5A81
6015 -6D4E5A6D6D4C5A826D4EC7FC6E6D5D70157E6E5F6E7F704A5A6E4C5A6E7F704A5A6E4C5A
6016 -6E7F71495A6E4CC8FC6F7F71137E6F5D6F7F71485A6F4A5A6F13FC71485A6F4A5A6F13FF
6017 -F09F806F02BFC9FC7013FF60705B8260705B8260B3A7037FB612FEA5584B7ECA5D>89
6018 -D<ECFFFC010FEBFFC0017F14F090B612FC489038803FFF2703FC00077F486C6D7F486C6D
6019 -7F6E7E83707EA3707E6C90C7FC6C5A6C5AC9FCA4ED1FFF021FB5FC49B6FC130F013FEBC0
6020 -3F9038FFFE00000313F04813C04890C7FC485A485AA2485AA2485AA4167FA26D14FF007F
6021 -15EF6D01017F6C6C903907CFFF806C6CD90F8F13FE6C9038E07F076C9038FFFE0300014A
6022 -7ED8003F9038F0007F0103018090C7FC37337CB13C>97 D<EB7FC0B5FCA512037EB3A2ED
6023 -0FFF037F13F002C1B512FC02C714FF9126CFF80F7F9126FFC00113E092C76C7E02FC6E7E
6024 -4A6E7E5C4A6E7E84831980A219C083A319E0AC19C0A25F1980A34D1300606E141F606E4A
6025 -5A6E4A5A02BF4A5A91261F80035B9027FE0FF01F5B496CB548C7FC496C14F849C614E0C8
6026 -D80FFEC8FC3B4D7CCB44>I<91380FFF8091B512F8010314FF010F158090263FFE0013C0
6027 -D97FF8EB1FE0D9FFE0EB3FF04849EB7FF8484913FF4890C7FC5A5B121F5B003FED7FF0EE
6028 -3FE0007FED1FC093C7FC5BA212FFAC127F7FA2123FA26D153E121F6D157E6C167C6C6D14
6029 -FC6C16F86C6D13036C01F0EB07F0D97FFCEB1FE06DB4EBFFC0010F90B5120001035C0100
6030 -14F0020F13802F337CB137>I<EF1FF0EE3FFFA51600177FB3A2EC0FFF91B512E0010314
6031 -F8010F14FE013FEB01FF903A7FF8003FFFD9FFE0130F48497F48497F4890C77E4881485A
6032 -A2485AA3127F5BA212FFAC127FA37F123FA2121F7F000F5D6C6C5C5E6C6D5B6C01E0497F
6033 -6C6D017FEBFFE090393FFE03FE6DB512F801075C010114C09027001FFC00EBC0003B4D7C
6034 -CB44>I<EC0FFF91B512F0010314FC010F14FF90263FFE077F90267FF0007F4948EB3FE0
6035 -4801806D7E48824890C76C7E4848140783485A003F6F7EA3485A701380A312FFA290B8FC
6036 -A401F8CAFCA5127FA27FA2123FA26C6CED0F80A2000F161F6C6C16006E5C6C6D147E6C6D
6037 -5C6C6D495AD97FFCEB07F0903A1FFF803FE06D90B55A010392C7FCD9007F13FC020713C0
6038 -31337DB138>I<ED7FE0913807FFFC021F7F027F7F902601FFE0138049018113C0902607
6039 -FE0113E049485A14F8131FEB3FF0A26F13C0EB7FE06F1380EE3E0093C7FCADB77EA52600
6040 -7FF0C8FCB3B3A2003FB512F8A52B4D7DCC26>I<DA7FFCEB0FF00103B538807FF8011F91
6041 -38F1FFFC4991B512FE90267FF01F13F32701FFC007138348EB0001A248486DEBC1FC000F
6042 -EEE0F849027F1300A2001F82A8000F5EA26D14FF00075E6C6C495BA26CD9C00790C7FC6C
6043 -9038F01FFC4890B55A5ED803C314809026C07FFCC8FC000790CAFCA47FA27F13FC90B612
6044 -FCEEFFC06C16F817FE6C8218806C17C06D16E00003B812F0120FD81FFCC7000F13F8D83F
6045 -F0140049153F4848ED1FFC00FF160F491507A56D150F007F17F86D151F6C6CED3FF06C6C
6046 -ED7FE0D80FFE913801FFC06C6C6C010713806C01F8017F1300C690B612FC013F15F00107
6047 -1580D9003F01F0C7FC37487DB03D>I<EB7FC0B5FCA512037EB3A2923801FFC0030F13F8
6048 -033F13FE4B7F9126C1FE077F9126C3F0037F9138C7C001DACF8080150002DE7F02FC81A2
6049 -5CA25CA35CB3A9B6D8C07FEBFFE0A53B4C7BCB44>I<13FCEA03FF487F487FA2487FA66C
6050 -5BA26C5B6C90C7FCEA00FC90C8FCACEB7FC0B5FCA512037EB3B3B61280A5194D7BCC22>
6051 -I<EB7FC0B5FCA512037EB3B3B3AAB61280A5194C7BCB22>108 D<90287FC001FFE0EC7F
6052 -F8B5010F01FC0103B5FC033F6D010F804B6D6C4814E0DBFE079026C03F817F9126C3F001
6053 -9138FC007F0003D9C7E0DAE1F8806CDA8000D9F1E06D7E02CFC7EBF3C002DE91267FF780
6054 -131F02FC03FFC77FA24A5DA24A5DA34A5DB3A9B6D8C03FB5D8F00FB512FCA55E317BB067
6055 ->I<903A7FC001FFC0B5010F13F8033F13FE4B7F9126C1FE077F9126C3F0037F00039038
6056 -C7C0016CD9CF8080150002DE7F02FC81A25CA25CA35CB3A9B6D8C07FEBFFE0A53B317BB0
6057 -44>I<913807FF80027F13F80103B6FC010F15C090261FFE017F903A7FF0003FF8D9FFC0
6058 -EB0FFC48496D7E4890C76C7E4817804980000F17C048486E13E0A2003F17F049157FA200
6059 -7F17F8A400FF17FCAB007F17F8A36C6CEDFFF0A3001F17E06D5C000F17C06C6C4A13806C
6060 -17006C6D495A6C01E0EB1FFC6D6C495A903A3FFE01FFF0010FB612C0010392C7FCD9007F
6061 -13F80207138036337DB13D>I<90397FC00FFFB5017F13F002C1B512FC02C714FF9126CF
6062 -F80F7F9126FFC00313E0000391C77F6C01FC6E7E4A6E7E5C4A6E7E848319808319C0A471
6063 -13E0AC4D13C0A319805FA219004D5A804D5A6E4A5A6E4A5A02FF495BDB80075B9126EFF0
6064 -1F5B02E7B548C7FC02E314F802E014E0DB0FFEC8FC92CAFCAFB612C0A53B467CB044>I<
6065 -9039FF803FE0B5EBFFF8028113FE02837FDA87E11380EC8F830003D99F0713C06C139E14
6066 -BCA214F8A24A6C13806F13004A6C5A93C7FCA45CB3A7B612E0A52A317CB032>114
6067 -D<90390FFF8070017FEBF1F048B6FC1207380FFC01391FE0003F4848130F491307127F90
6068 -C712035A1501A27FA213E06D90C7FC13FE387FFFF0ECFFC015F06C14FC6C14FF6C15806C
6069 -15C06C15E0C615F0013F14F8010714FCEB007F14019138003FFE150F0078140700F81403
6070 -A26C1401A37E16FC6C14036D14F87F6DEB07F001F8EB1FE001FFEBFFC091B51280D8FC7F
6071 -1400D8F81F13FCD8E00313C027337CB130>I<14F8A61301A41303A21307A2130FA2131F
6072 -133F137F13FF1203000F90B512F0B7FCA426007FF8C7FCB3A6167CAA013F14F880A29039
6073 -1FFE01F0010F1303903907FF87E06DEBFFC06D14806D6C1300EC0FFC26467EC430>I<D9
6074 -7FE0EC3FF0B5EC7FFFA5000315016C81B3AB5EA25EA25E7E6EEB0F7F017F021E7F6E017C
6075 -EBFFE090393FFE01F86DB512F0010714E0010114C09027003FFE00EBC0003B327BB044>
6076 -I<B66C90B512C0A5000101E0C73807F0006E5D6C5F6E140F017F5E80171F013F93C7FC6E
6077 -5C011F153E6E147E6D157C6F13FC6D5DEDC001A26D01E05B16036D5DEDF0076D5DEDF80F
6078 -027F5CEDFC1F023F91C8FC15FE5E021F133EEDFF7E6E137C16FC6E5BA26E5BA36E5BA26E
6079 -5BA26F5AA26FC9FCA23A317DAF41>I<B60081B500FC90387FFFF0A500019026E0000301
6080 -80903803FC006E715A6C6F5E6E6F1303017F61A26E496D1307013F616E6F130F011F4A5E
6081 -A26E6F131F6D4A93C7FCDD9FFC5B6DD9801F153E170F03C06E137E6D023F157C93383E07
6082 -FFDBE07E15FC6DDA7C035C03F015816D02FC5D4C7E03F815C3DA7FF95E9226FDF00013E7
6083 -DA3FFF5E4C137F19FF6E5F4C7FA26E496D90C8FCA26E5E93C7120FA26E486E5AA202015E
6084 -4B1403A26E486E5A54317EAF59>I<007FB500C090387FFFE0A5C601F0C73803F8006E5D
6085 -017F5E6E1407013F5E6E140F011F5E6E141FA26D6D91C7FC5F6D153E6F137E6D157C6F13
6086 -FC6D5DEDF0016D5DEDF803027F5C15FC1607DA3FFE5B160F021F5CEDFF1F6E91C8FC16BF
6087 -6E13BE16FE6E5BA36E5BA26E5BA26F5AA26F5AA26F5AA393C9FC5D153E157E157CD81F80
6088 -13FC486C5B387FE001D8FFF05B14035D14074A5A49485A007F49CAFCEBC07E383F81FC6C
6089 -B45A6C5B6C13C0C648CBFC3B467EAF41>121 D E
6090 -%EndDVIPSBitmapFont
6091 -%DVIPSBitmapFont: Ff cmtt12 17.28 6
6092 -/Ff 6 123 df<913803FFC0023F13FC49B67E010715F04981013F15FE498190B812C048
6093 -8348D9FC0180489026E0001F7F480180130391C87F48486F7E49153F4848ED0FFF834848
6094 -178083496F13C012FF8319E07FA2187FA36C5A6C5A6C5ACBFCA218FFA219C05FA219805F
6095 -A24D13005F604D5A173F4D5A4D5AA24C5B4C5B4C5B041F90C7FC4C5A4C5A4C5A4B5B4B5B
6096 -4B5B031F5B4B90C8FC4B5AEDFFF84A5B4A5B4A5B021F5B4A90C9FCEC7FFC4A5A495B495B
6097 -010F5B495B4948CAFC4948ED1F804948ED3FC04849ED7FE0485B000F5B4890C9FC4890B8
6098 -FC5ABAFCA56C18C06C18803B5A79D94A>50 D<383FFFF0487F80B5FCA37EA27EEA000FB0
6099 -EE0FFC93B57E030714E0031F14F84B14FE92B7FC02FD8291B87E85DCE01F7FEE000703FC
6100 -01017F4B6D7F03E0143F4B6E7E4B140F8592C87E4A6F1380A34A6F13C0A284A21AE0A219
6101 -7FAA19FFA21AC0A26E5DA24E138080606F1600606F4A5A6F143F6F4A5A6F4A5A6F130303
6102 -FF010F5BDCC03F5B93B65A6102FD93C7FC02FC5D6F5C031F14F0902607F80714C0902603
6103 -F00191C8FC90C8EA3FF043597FD74A>98 D<EC01F0EC07FC4A7EA24A7EA56E5AA26E5AEC
6104 -01F091CAFCAE001FB512FC4880815AA37EA27EC71203B3B3A8003FB812C04817E0A2B912
6105 -F0A36C17E0A26C17C0345974D84A>105 D<003FB512FE4880B77EA57E7EC71201B3B3B3
6106 -B0003FB812FC4817FEBAFCA56C17FE6C17FC385877D74A>108 D<EE0FFC263FFFF090B5
6107 -7E48D9F80714E0DAFC1F14F8B54914FE92B7FC02FD826C90B87E856CDBE01F7FD8000FEC
6108 -000703FC01017F4B6D7F03E0143F4B6E7E4B140F8592C87E4A6F1380A34A6F13C0A284A2
6109 -1AE0A2197FAA19FFA21AC0A26E5DA24E138080606F1600606F4A5A6F143F6F4A5A6F4A5A
6110 -6F130303FF010F5BDCC03F5B93B65A6102FD93C7FC02FC5D6F5C031F14F0030714C00301
6111 -91C8FC9238003FF093CAFCB3A4003FB6FC4881A2B77EA36C5DA26C92CAFC435F7FBE4A>
6112 -112 D<000FB912E04818F04818F8A619F001F0C8000313E04D13C04D13804D13004D5A4D
6113 -5A4D5A6C484A5B6C484A5BC9000F5B4C5B4C90C7FC4C5A4C5A4B5B4B5B4B5B4B5B4B5B4B
6114 -90C8FC4B5A4B5A4A5B4A5B4A5B4A5B4A5B4A90C9FC4A5A4A5A495B495B495B4949EC07E0
6115 -4949EC0FF04948C8EA1FF8495A495A485B485B485B485B4890C9FC485A48B9FCBAFCA66C
6116 -18F06C18E03D3E7BBD4A>122 D E
6117 -%EndDVIPSBitmapFont
6118 -%DVIPSBitmapFont: Fg cmbx12 17.28 28
6119 -/Fg 28 120 df<16F04B7E1507151F153FEC01FF1407147F010FB5FCB7FCA41487EBF007
6120 -C7FCB3B3B3B3007FB91280A6395E74DD51>49 D<913801FFF8021FEBFFC091B612F80103
6121 -15FF010F16C0013F8290267FFC0114F89027FFE0003F7F4890C7000F7F48486E7FD807F8
6122 -6E148048486E14C048486E14E048486F13F001FC17F8486C816D17FC6E80B56C16FE8380
6123 -A219FFA283A36C5BA26C5B6C90C8FCD807FC5DEA01F0CA14FEA34D13FCA219F85F19F04D
6124 -13E0A294B512C019804C14004C5B604C5B4C5B604C13804C90C7FC4C5A4C5A4B13F05F4B
6125 -13804B90C8FC4B5AED1FF84B5A4B5A4B48143F4A5B4A48C8FC4A5A4A48157E4A5A4A5AEC
6126 -7F8092C9FC02FE16FE495A495A4948ED01FCD90FC0150749B8FC5B5B90B9FC5A4818F85A
6127 -5A5A5A5ABAFCA219F0A4405E78DD51>I<92B5FC020F14F8023F14FF49B712C04916F001
6128 -0FD9C01F13FC90271FFC00077FD93FE001017F49486D8049C86C7F484883486C6F7F14C0
6129 -486D826E806E82487FA4805CA36C5E4A5E6C5B6C5B6C495E011FC85A90C95CA294B55A61
6130 -4C91C7FC604C5B4C5B4C5B4C5B047F138092260FFFFEC8FC020FB512F817E094C9FC17F8
6131 -17FF91C7003F13E0040713F8040113FE707F717F7113E085717FA2717F85A285831A80A3
6132 -1AC0EA03FCEA0FFF487F487F487FA2B57EA31A80A34D14005C7E4A5E5F6C495E49C8485B
6133 -D81FF85F000F5ED807FE92B55A6C6C6C4914806C01F0010791C7FC6C9026FF803F5B6D90
6134 -B65A011F16F0010716C001014BC8FCD9001F14F0020149C9FC426079DD51>I<F01F804E
6135 -7E187F18FFA25F5F5F5FA25F5F5FA294B5FC5E5E5EA25E5EEE3FBFEE7F3FA216FEED01FC
6136 -ED03F8ED07F0A2ED0FE0ED1FC0ED3F8016005D15FE4A5A4A5AA24A5A4A5A4A5A4A5AA24A
6137 -C7FC14FE495A5C1303495A495A495A5C133F49C8FC13FE485AA2485A485A485A5B121F48
6138 -5A48C9FC12FEBCFCA6CA6CEBC000B1037FB8FCA6485E7CDD51>I<4DB5ED03C0057F02F0
6139 -14070407B600FE140F047FDBFFC0131F4BB800F0133F030F05FC137F033F9127F8007FFE
6140 -13FF92B6C73807FF814A02F0020113C3020702C09138007FE74A91C9001FB5FC023F01FC
6141 -16074A01F08291B54882490280824991CB7E49498449498449498449865D49498490B5FC
6142 -484A84A2484A84A24891CD127FA25A4A1A3F5AA348491A1FA44899C7FCA25CA3B5FCB07E
6143 -A380A27EA2F50FC0A26C7FA37E6E1A1F6C1D80A26C801D3F6C6E1A00A26C6E616D1BFE6D
6144 -7F6F4E5A7F6D6D4E5A6D6D4E5A6D6D4E5A6D6E171F6D02E04D5A6E6DEFFF806E01FC4C90
6145 -C7FC020F01FFEE07FE6E02C0ED1FF8020102F8ED7FF06E02FF913803FFE0033F02F8013F
6146 -1380030F91B648C8FC030117F86F6C16E004071680DC007F02F8C9FC050191CAFC626677
6147 -E375>67 D<B96C90B91280A6D8000102C0C9000102C0C7FCB3B3A293BBFCA604C0C91201
6148 -B3B3A6B96C90B91280A671627AE17E>72 D<B912E0A6C702E0C7FCB3B3B3B3AEB912E0A6
6149 -33627CE13C>I<B700C0083FB612F070627097B7FCA37061D800010DF8C7FC70F103EFA2
6150 -02FD6DF107CFA202FC6DF10F8FA36F6DF01F0FA26F6D183EA26F6D187CA26F6D18F8A36F
6151 -6DEF01F0A26F6DEF03E0A26F6DEF07C0A26F6DEF0F80A3706DEE1F00A2706D163EA2706D
6152 -5EA2706D5EA3706D4B5AA2706D4B5AA2706D4B5AA2706D4B5AA3716D4AC7FCA2716D143E
6153 -A2716D5CA2716D5CA3716D495AA2716D495AA2716D495AA2716D495AA3726D48C8FCA272
6154 -EBC03EA2726D5AA2726D5AA372EBF9F0A272EBFFE0A2725CA2725CA37390C9FCA2735AA2
6155 -735A90381FFFC0B700F86E480207B812F0A3735AA2735A8C627AE199>77
6156 -D<BB7E1AFCF2FFC01BF81BFE757ED800010280C7001F80070114F0736C7F081F7F747F74
6157 -7F7414807414C0A27414E0A21DF0A27513F8A41DFCA91DF8A498B512F0A21DE0A25014C0
6158 -1D8062501400505B505B087F5B4FB512E0071F5C93B9C7FC1BFC1BF01B8008F0C8FC04C0
6159 -CCFCB3B3A2B97EA65E627AE16E>80 D<001FBEFCA64849C79126E0000F148002E0180091
6160 -C8171F498601F81A0349864986A2491B7FA2491B3F007F1DC090C9181FA4007E1C0FA600
6161 -FE1DE0481C07A5CA95C7FCB3B3B3A3021FBAFCA663617AE070>84
6162 -D<913803FFFE027FEBFFF00103B612FE010F6F7E4916E090273FFE001F7FD97FE001077F
6163 -D9FFF801017F486D6D7F717E486D6E7F85717FA2717FA36C496E7FA26C5B6D5AEB1FC090
6164 -C9FCA74BB6FC157F0207B7FC147F49B61207010F14C0013FEBFE004913F048B512C04891
6165 -C7FC485B4813F85A5C485B5A5CA2B55AA45FA25F806C5E806C047D7F6EEB01F96C6DD903
6166 -F1EBFF806C01FED90FE114FF6C9027FFC07FC01580000191B5487E6C6C4B7E011F02FC13
6167 -0F010302F001011400D9001F90CBFC49437CC14E>97 D<903807FF80B6FCA6C6FC7F7FB3
6168 -A8EFFFF8040FEBFF80047F14F00381B612FC038715FF038F010014C0DBBFF0011F7FDBFF
6169 -C001077F93C76C7F4B02007F03F8824B6F7E4B6F13804B17C0851BE0A27313F0A21BF8A3
6170 -7313FCA41BFEAE1BFCA44F13F8A31BF0A24F13E0A24F13C06F17804F1300816F4B5A6F4A
6171 -5B4AB402075B4A6C6C495B9126F83FE0013F13C09127F00FFC03B55A4A6CB648C7FCDAC0
6172 -0115F84A6C15E091C7001F91C8FC90C8000313E04F657BE35A>I<92380FFFF04AB67E02
6173 -0F15F0023F15FC91B77E01039039FE001FFF4901F8010113804901E0010713C049018049
6174 -13E0017F90C7FC49484A13F0A2485B485B5A5C5A7113E0485B7113C048701380943800FE
6175 -0095C7FC485BA4B5FCAE7EA280A27EA2806C18FCA26C6D150119F87E6C6D15036EED07F0
6176 -6C18E06C6D150F6D6DEC1FC06D01E0EC7F806D6DECFF00010701FCEB03FE6D9039FFC03F
6177 -FC010091B512F0023F5D020F1580020102FCC7FCDA000F13C03E437BC148>I<F17FF805
6178 -0FB5FCA6EF000F8484B3A892380FFF804AB512F8020F14FE023FECFF8391B712E3010391
6179 -38807FF3499039F8000FFB011F01E00103B5FC494913004990C87E49488148498148834A
6180 -815A485BA2485BA25AA3485BA4B5FCAE7EA46C7FA37EA26C7FA26C5F806C5F6C6D5D6C6D
6181 -5D017F93B5FC6D6C6C0103806D6D49806D01F0D91FF7EBFFFE6D9039FE01FFE7010190B6
6182 -12876D6CECFE07021F14F8020314E09127003FFE00ECC0004F657BE35A>I<92380FFFC0
6183 -4AB512FC020FECFF80023F15E091B712F80103D9FE037F499039F0007FFF011F01C0011F
6184 -7F49496D7F4990C76C7F49486E7F48498048844A804884485B727E5A5C48717EA35A5C72
6185 -1380A2B5FCA391B9FCA41A0002C0CBFCA67EA380A27EA27E6E160FF11F806C183F6C7FF1
6186 -7F006C7F6C6D16FE6C17016D6C4B5A6D6D4A5A6D01E04A5A6D6DEC3FE0010301FC49B45A
6187 -6D9026FFC01F90C7FC6D6C90B55A021F15F8020715E0020092C8FC030713F041437CC14A
6188 ->I<EE3FFC0307B51280033F14C04AB612F0020715F84A9038F03FFC4AEB807F913A7FFE
6189 -00FFFE4A5A4B4813FF4913F05B4913E0A24913C0A27013FE4949EB7FFCEF3FF8EF1FF0EF
6190 -07C094C7FCB0B812C0A6D8001F01C0C8FCB3B3B0007FB612FCA638657CE431>I<F107F8
6191 -DB7FFEEC3FFE020FB5D8F001B5FC027FDAFE03148049B7128F49DCDFFD13C0010FD9F00F
6192 -EBFFC149D9800114014990C7EBFC0349486E6C7E4948EC3FFF48496E0181138007801300
6193 -48F0C03E97C7FC48496E7FA34884A96C60A36C6D4A5BA26C60A26C6D4A90C8FC6D6C4A5A
6194 -6D6C4A5A6D6D485BDBF00F5B4990B612C060D97C7F4AC9FCD9FC0F14F09126007FFECAFC
6195 -92CCFC1201A47FA27F8014F091B77E18FE6CEFFFC019F06D17FC19FF6D846D846D846D84
6196 -013F8490BAFC0003854801E0C712014890C9000F7F484816014848EE007F4848717E8512
6197 -FF5B85A56D5F007F616D173F003F616D177F6C6C4D5A6C01C003035B6C6D4B5B6C01F803
6198 -1F5BC601FF92B5C7FC6D01F8011F5B011F90B712F8010717E0010094C8FC020F15F0DA00
6199 -3F01FCC9FC4A607CC151>I<903807FF80B6FCA6C6FC7F7FB3A8EF1FFF94B512F0040714
6200 -FC041F14FF4C8193267FE07F7F922781FE001F7FDB83F86D7FDB87F07FDB8FC0814C7F03
6201 -9FC78015BE03BC8003FC825DA25DA25DA45DB3B2B7D8F007B71280A651647BE35A>I<EB
6202 -0FE0EB3FF8497E48B5FCA24880A24880A76C5CA26C91C7FCA238007FFC6D5AEB0FE090C9
6203 -FCAF903807FF80007FB5FCA6C6FC7F7FB3B3AEB712C0A622657BE42C>I<903807FF80B6
6204 -FCA6C6FC7F7FB3B3B3B3ADB712E0A623647BE32C>108 D<902607FF80D91FFFEEFFF8B6
6205 -91B500F00207EBFF80040702FC023F14E0041F02FF91B612F84C6F488193267FE07F6D48
6206 -01037F922781FE001F9027E00FF0007FC6DA83F86D9026F01FC06D7F6DD987F06D4A487F
6207 -6DD98FC0DBF87EC7804C6D027C80039FC76E488203BEEEFDF003BC6E4A8003FC04FF834B
6208 -5FA24B5FA24B94C8FCA44B5EB3B2B7D8F007B7D8803FB612FCA67E417BC087>I<902607
6209 -FF80EB1FFFB691B512F0040714FC041F14FF4C8193267FE07F7F922781FE001F7FC6DA83
6210 -F86D7F6DD987F07F6DD98FC0814C7F039FC78015BE03BC8003FC825DA25DA25DA45DB3B2
6211 -B7D8F007B71280A651417BC05A>I<923807FFE092B6FC020715E0021F15F8027F15FE49
6212 -4848C66C6C7E010701F0010F13E04901C001037F49496D7F4990C87F49486F7E49486F7E
6213 -48496F13804819C04A814819E048496F13F0A24819F8A348496F13FCA34819FEA4B518FF
6214 -AD6C19FEA46C6D4B13FCA36C19F8A26C6D4B13F0A26C19E06C6D4B13C0A26C6D4B13806C
6215 -6D4B13006D6C4B5A6D6D495B6D6D495B010701F0010F13E06D01FE017F5B010090B7C7FC
6216 -023F15FC020715E0020092C8FC030713E048437CC151>I<D90FFFEB0FFCB690383FFF80
6217 -93B512E04B14F04B14F8923907FC7FFC92390FE0FFFEC6EC1F806DD93F0113FF6D133E15
6218 -7E157C15F8A215F07013FEA24BEB7FFCEF3FF8EF0FE04B90C7FCA55DB3B0B712F8A63841
6219 -7BC042>114 D<913A3FFF8007800107B5EAF81F011FECFE7F017F91B5FC48B8FC48EBE0
6220 -014890C7121FD80FFC1407D81FF0801600485A007F167F49153FA212FF171FA27F7F7F6D
6221 -92C7FC13FF14E014FF6C14F8EDFFC06C15FC16FF6C16C06C16F06C826C826C826C82013F
6222 -1680010F16C01303D9007F15E0020315F0EC001F1500041F13F81607007C150100FC8117
6223 -7F6C163FA2171F7EA26D16F0A27F173F6D16E06D157F6D16C001FEEDFF806D0203130002
6224 -C0EB0FFE02FCEB7FFC01DFB65A010F5DD8FE0315C026F8007F49C7FC48010F13E035437B
6225 -C140>I<EC07E0A6140FA5141FA3143FA2147FA214FF5BA25B5B5B5B137F48B5FC000F91
6226 -B512FEB8FCA5D8001F01E0C8FCB3AFEF0FC0AC171F6D6D1480A2173F6D16006F5B6D6D13
6227 -7E6D6D5B6DEBFF836EEBFFF86E5C020F14C002035C9126003FFCC7FC325C7DDA3F>I<90
6228 -2607FFC0ED3FFEB60207B5FCA6C6EE00076D826D82B3B3A260A360A2607F60183E6D6D14
6229 -7E4E7F6D6D4948806D6DD907F0ECFF806D01FFEB3FE06D91B55A6E1500021F5C020314F8
6230 -DA003F018002F0C7FC51427BC05A>I<B70081B600FC0103B512FCA6C66C0180C701FCC8
6231 -381FFE006F6FED03F86D047F5F856F6E16076D646F70140F6D705F866F6E161F6D646F4A
6232 -6D143F6D99C7FC4E7F6F616D1B7E6F4A6D14FE6D6395B57E7001FC15016E62DCC0016E13
6233 -036EDBF87F5D05038004E0496C14076E62DCF007ED800F6E4B6C5D050F15C004F8496C14
6234 -1F6E62DCFC1FEDE03F6E4B6C92C8FC053F15F004FE496C5C6E197E7048EDF8FE6E027E6D
6235 -5C05FE15FC4D6D13FD6F601BFF6F496E5BA24D806F60A26F496E5BA24D806F60A26F496E
6236 -90C9FCA294C87E6F5FA26F486F5A047C6F5A6E417DBF75>119 D
6237 -E
6238 -%EndDVIPSBitmapFont
6239 -%DVIPSBitmapFont: Fh cmsy10 10.95 1
6240 -/Fh 1 16 df<EB0FFCEB3FFF90B512C0000314F04880488048804880A2481580A3B712C0
6241 -AA6C1580A36C1500A26C5C6C5C6C5C6C5CC614C0013F90C7FCEB0FFC22227BA72D>15
6242 -D E
6243 -%EndDVIPSBitmapFont
6244 -%DVIPSBitmapFont: Fi cmtt10 10.95 89
6245 -/Fi 89 127 df<121C127FEAFF80B3EA7F00B2123EC7FCA8121C127FA2EAFF80A3EA7F00
6246 -A2121C09396DB830>33 D<00101304007C131F00FEEB3F80A26C137FA248133FB2007E14
6247 -00007C7F003C131E00101304191C75B830>I<903907C007C0A2496C487EA8011F131FA2
6248 -02C05BA3007FB7FCA2B81280A36C16006C5D3A007F807F80A2020090C7FCA9495BA2003F
6249 -90B512FE4881B81280A36C1600A22701FC01FCC7FCA300031303A201F85BA76C486C5AA2
6250 -29387DB730>I<EB07E0EB1FF8497E137F497E803801FC7F497E810003131F13F0A6143F
6251 -92C8FC91387F0FFF9026F87E1F1380000113FEEBF9FC13FB4A6C1300D9FFF013C06C13E0
6252 -151F02C05BEB7F809038FF003F4892C7FC485C48EB807E5A15FE391FDFC0FC383F8FE014
6253 -E1397F07F1F8EB03F300FEEBFBF0EB01FF5D7FEDC006027F130F91393F801F8015C06C13
6254 -7F6CEBFFE049EBF83F018701FC1300263FFFFBB5FC6C01F15B14E06C9038C03FFC000390
6255 -38001FF8D801FCEB07E0293A7DB830>38 D<EA07C0EA0FF0EA1FF8A213FCA213FE120F12
6256 -07EA007EA513FE13FCA2120113F81203EA07F0120FEA1FE0127FEAFFC013801300127C12
6257 -380F1D70B730>I<141E147F14FF5BEB03FEEB07FCEB0FF0EB1FE0EB3FC0EB7F80EBFF00
6258 -485A5B12035B485A120F5BA2485AA2123F5BA2127F90C7FCA412FEAD127FA47F123FA27F
6259 -121FA26C7EA27F12076C7E7F12017F6C7EEB7F80EB3FC0EB1FE0EB0FF0EB07FCEB03FEEB
6260 -01FF7F147F141E184771BE30>I<127812FE7E7F6C7E6C7EEA0FF06C7E6C7E6C7E6C7EEB
6261 -7F80133F14C0131FEB0FE014F01307A2EB03F8A214FC1301A214FE1300A4147FAD14FEA4
6262 -130114FCA2130314F8A2EB07F0A2130F14E0EB1FC0133F1480137FEBFF00485A485A485A
6263 -485AEA3FE0485A485A90C7FC5A1278184778BE30>I<14E0497E497EA60038EC0380007E
6264 -EC0FC0D8FF83EB3FE001C3137F9038F3F9FF267FFBFB13C06CB61280000FECFE00000314
6265 -F86C5C6C6C13C0011F90C7FC017F13C048B512F04880000F14FE003FECFF80267FFBFB13
6266 -C026FFF3F913E09038C3F87F0183133FD87E03EB0FC00038EC0380000091C7FCA66D5A6D
6267 -5A23277AAE30>I<143EA2147FAF007FB7FCA2B81280A36C1600A2C76CC8FCAF143EA229
6268 -297DAF30>I<EA03E0EA0FF0EA1FF813FCEA3FFEA213FFA27EA27E1203EA007FA2137E13
6269 -FEEA01FC1203EA07F8EA3FF0127FEAFFE0EA7F801300123C1019708B30>I<007FB612F0
6270 -A2B712F8A36C15F0A225077B9E30>I<120FEA3FC0EA7FE0A2EAFFF0A4EA7FE0A2EA3FC0
6271 -EA0F000C0C6E8B30>I<16F01501ED03F8A21507A2ED0FF0A2ED1FE0A2ED3FC0A2ED7F80
6272 -A2EDFF00A24A5AA25D1403A24A5AA24A5AA24A5AA24A5AA24A5AA24AC7FCA2495AA25C13
6273 -03A2495AA2495AA2495AA2495AA2495AA249C8FCA2485AA25B1203A2485AA2485AA2485A
6274 -A2485AA2485AA248C9FCA25AA2127CA225477BBE30>I<14FE903807FFC0497F013F13F8
6275 -497F90B57E48EB83FF4848C6138049137F4848EB3FC04848EB1FE049130F001F15F04913
6276 -07A24848EB03F8A290C712014815FCA400FEEC00FEAD6C14016C15FCA36D1303003F15F8
6277 -A26D1307001F15F0A26D130F6C6CEB1FE0A26C6CEB3FC06C6CEB7F806D13FF2601FF8313
6278 -006CEBFFFE6D5B6D5B010F13E06D5BD900FEC7FC273A7CB830>I<EB03C0497EA2130FA2
6279 -131FA2133F137F13FF1203123FB5FCA213EF138FEA7E0F1200B3B0003FB512F84814FCB6
6280 -12FEA26C14FC6C14F81F3977B830>I<EB07FC90383FFFC090B512F00003804814FE4880
6281 -261FF80F1380263FE00113C09038C0007F4848EB3FE090C7121FED0FF04814075A6C15F8
6282 -1503A3127E1218C8FCA2150716F0150F16E0151F16C0153FED7F8015FF4A13005DEC07FC
6283 -4A5A4A5A4A5A4A5A4A5A4990C7FC495A495AEB0FF0EB3FE0495A495A4890C8FC4848EB01
6284 -F04848EB03F8485AEA1FE048B6FCB7FCA37E6C15F025397BB830>I<EB03FF013F13E090
6285 -B512F84814FE4880481580260FFE0113C09038F0007F4848EB1FE0150F16F01507A26C5A
6286 -6C5AC8FC150F16E0A2151FED3FC0157FEDFF8002071300903807FFFE495B5D8115FF6D14
6287 -80D9000113C09138003FE0ED1FF0ED07F8150316FC150116FE1500A21218127EB4FCA215
6288 -0116FC4814036C15F86C6C13076DEB1FF0D83FF0133F3A1FFE01FFE06CB612C06C15806C
6289 -ECFE00C65C013F13F001031380273A7CB830>I<EC03FC4A7E140F141FA2143F147F157E
6290 -14FEA2EB01FCEB03F8A2EB07F0A2EB0FE0EB1FC0A2EB3F80A2EB7F0013FEA2485A485AA2
6291 -485AA2485A485AA2485AA248C7FC12FEB8FC1780A46C1600C8007EC7FCAA91387FFFFE91
6292 -B6FCA46E5B29397DB830>I<000FB612804815C05AA316800180C8FCAEEB83FF019F13C0
6293 -90B512F015FC8181D9FE0313809039F0007FC049133F0180EB1FE06CC7120F000E15F0C8
6294 -1207A216F81503A31218127EA2B4FC150716F048140F6C15E06C141F6DEB3FC06D137F3A
6295 -3FE001FF80261FFC0F13006CB55A6C5C6C5C6C14E06C6C1380D90FFCC7FC25397BB730>
6296 -I<EC0FF8EC7FFF49B51280010714E0131F4914F090387FF80F9039FFC007F84813803803
6297 -FE005B485A4848EB03F0ED01E0484890C7FC5B123F5BA2127FEB000C903803FFE0010F13
6298 -F8D8FF3F13FE48B6FCB7128016C09039FE007FE001F8EB1FF001E0130F49EB07F849EB03
6299 -FCA290C7120116FE1500A37EA46C7E15016D14FC121F6D1303000FEC07F86D130F6C6CEB
6300 -1FF06DEB3FE03A03FF81FFC06C90B512806C15006D5B011F13F8010713E001011380273A
6301 -7CB830>I<127CB712FC16FEA416FC48C7EA0FF816F0ED1FE0007CEC3FC0C8EA7F80EDFF
6302 -00A24A5A4A5A5D14075D140F5D4A5AA24A5AA24AC7FCA25C5C13015CA213035CA213075C
6303 -A4495AA6131F5CA96D5A6DC8FC273A7CB830>I<49B4FC011F13F0017F13FC90B57E0003
6304 -ECFF804815C048010113E03A1FF8003FF049131FD83FC0EB07F8A24848EB03FC90C71201
6305 -A56D1303003F15F86D13076C6CEB0FF06C6CEB1FE0D807FCEB7FC03A03FF83FF806C90B5
6306 -12006C6C13FC011F13F0497F90B512FE48802607FE0013C0D80FF8EB3FE0D81FE0EB0FF0
6307 -4848EB07F8491303007F15FC90C712014815FE481400A66C14016C15FC6D1303003F15F8
6308 -6D1307D81FF0EB1FF06D133F3A0FFF01FFE06C90B512C06C1580C6ECFE006D5B011F13F0
6309 -010190C7FC273A7CB830>I<49B4FC010F13E0013F13F890B57E4880488048010113803A
6310 -0FFC007FC0D81FF0EB3FE04848131F49EB0FF048481307A290C7EA03F85A4815FC1501A4
6311 -16FEA37E7E6D1303A26C6C13076C6C130F6D133FD80FFC13FF6CB6FC7E6C14FE6C14F901
6312 -3FEBE1FC010F138190380060011400ED03F8A2150716F0150F000F15E0486C131F486CEB
6313 -3FC0157FEDFF804A1300EC07FE391FF01FFC90B55A6C5C6C5C6C1480C649C7FCEB3FF027
6314 -3A7CB830>I<120FEA3FC0EA7FE0A2EAFFF0A4EA7FE0A2EA3FC0EA0F00C7FCAF120FEA3F
6315 -C0EA7FE0A2EAFFF0A4EA7FE0A2EA3FC0EA0F000C276EA630>I<EA03C0EA0FF0EA1FF8A2
6316 -EA3FFCA4EA1FF8A2EA0FF0EA03C0C7FCAFEA03C0EA0FF0121F13F8123F13FCA3121FA212
6317 -0F12031200120113F8120313F01207EA1FE0123FEA7FC0EAFF80EA7F00127E12380E3470
6318 -A630>I<16F01503ED07F8151F157FEDFFF014034A13C0021F138091383FFE00ECFFF849
6319 -5B010713C0495BD93FFEC7FC495A3801FFF0485B000F13804890C8FCEA7FFC5BEAFFE05B
6320 -7FEA7FF87FEA1FFF6C7F000313E06C7F38007FFC6D7E90380FFF806D7F010113F06D7FEC
6321 -3FFE91381FFF80020713C06E13F01400ED7FF8151F1507ED03F01500252F7BB230>I<00
6322 -7FB7FCA2B81280A36C16006C5DCBFCA7003FB612FE4881B81280A36C1600A229157DA530
6323 ->I<1278127EB4FC13C07FEA7FF813FEEA1FFF6C13C000037F6C13F86C6C7EEB1FFF6D7F
6324 -010313E06D7F9038007FFC6E7E91380FFF806E13C0020113F080ED3FF8151F153FEDFFF0
6325 -5C020713C04A138091383FFE004A5A903801FFF0495B010F13804990C7FCEB7FFC48485A
6326 -4813E0000F5B4890C8FCEA7FFE13F8EAFFE05B90C9FC127E1278252F7BB230>I<EC1FE0
6327 -ECFFF8010313FE010F7F4914804914C090397FF03FE09038FF800F4890380007F0D803FC
6328 -13033A07F801FBF89038F007FF380FE01F4A13FCEA1FC0495A003FEBFF0F903800FE0790
6329 -3901FC03FE007FEBF801EA7E03ECF000A2EAFE0700FC49137EAA00FE6D13FED87E0314FC
6330 -A2ECF801D87F0114F8003FEBFC03903900FE07F0903880FF0F001F90387FFFE06D6C13C0
6331 -EA0FE06E13803A07F007FE009038F801F86C6CC7127C6CB414FE6CEB800390387FF01F6D
6332 -B512FC6D14F86D14E0010314C00100EBFE00EC1FF0273A7CB830>64
6333 -D<147F4A7EA2497FA4497F14F7A401077F14E3A3010F7FA314C1A2011F7FA490383F80FE
6334 -A590387F007FA4498049133F90B6FCA34881A39038FC001F00038149130FA40007814913
6335 -07A2D87FFFEB7FFFB56CB51280A46C496C130029397DB830>I<007FB512F0B612FE6F7E
6336 -82826C813A03F8001FF815076F7E1501A26F7EA615015EA24B5A1507ED1FF0ED7FE090B6
6337 -5A5E4BC7FC6F7E16E0829039F8000FF8ED03FC6F7E1500167FA3EE3F80A6167F1700A25E
6338 -4B5A1503ED1FFC007FB6FCB75A5E16C05E6C02FCC7FC29387EB730>I<91387F803C9039
6339 -03FFF03E49EBFC7E011F13FE49EBFFFE5B9038FFE07F48EB801F3903FE000F484813075B
6340 -48481303A2484813015B123F491300A2127F90C8FC167C16005A5AAC7E7EA2167C6D14FE
6341 -123FA27F121F6D13016C6C14FCA26C6CEB03F86D13076C6CEB0FF03901FF801F6C9038E0
6342 -7FE06DB512C06D14806D1400010713FC6D13F09038007FC0273A7CB830>I<003FB512E0
6343 -4814FCB67E6F7E6C816C813A03F8007FF0ED1FF8150F6F7E6F7E15016F7EA2EE7F80A216
6344 -3F17C0161FA4EE0FE0AC161F17C0A3163F1780A2167F17005E4B5A15034B5A150F4B5AED
6345 -7FF0003FB65A485DB75A93C7FC6C14FC6C14E02B387FB730>I<007FB7FCB81280A47ED8
6346 -03F8C7123FA8EE1F0093C7FCA4157C15FEA490B5FCA6EBF800A4157C92C8FCA5EE07C0EE
6347 -0FE0A9007FB7FCB8FCA46C16C02B387EB730>I<003FB712804816C0B8FCA27E7ED801FC
6348 -C7121FA8EE0F8093C7FCA5153E157FA490B6FCA69038FC007FA4153E92C8FCAE383FFFF8
6349 -487FB5FCA27E6C5B2A387EB730>I<02FF13F00103EBC0F8010F13F1013F13FD4913FF90
6350 -B6FC4813C1EC007F4848133F4848131F49130F485A491307121F5B123F491303A2127F90
6351 -C7FC6F5A92C8FC5A5AA892B5FC4A14805CA26C7F6C6D1400ED03F8A27F003F1407A27F12
6352 -1F6D130F120F7F6C6C131FA2D803FE133F6C6C137FECC1FF6C90B5FC7F6D13FB010F13F3
6353 -0103EBC1F0010090C8FC293A7DB830>I<3B3FFF800FFFE0486D4813F0B56C4813F8A26C
6354 -496C13F06C496C13E0D803F8C7EAFE00B290B6FCA601F8C7FCB3A23B3FFF800FFFE0486D
6355 -4813F0B56C4813F8A26C496C13F06C496C13E02D387FB730>I<007FB6FCB71280A46C15
6356 -00260007F0C7FCB3B3A8007FB6FCB71280A46C1500213879B730>I<49B512F04914F85B
6357 -A27F6D14F090C7EAFE00B3B3123C127EB4FCA24A5A1403EB8007397FF01FF86CB55A5D6C
6358 -5C00075C000149C7FC38003FF025397AB730>I<D83FFF90380FFF80486D4813C0B56C5A
6359 -A26C497E6C496C1380D803F0903803F8004B5A4B5A151F4B5A5E4BC7FC15FE14014A5A5D
6360 -4A5A4A5A141F5D4A5A4AC8FC5C13F18101F37F13F790B57E14EFECC7F01483EC03F81401
6361 -01FE7F496C7E5B157F497F82151F82150F826F7EA26F7E1501821500D83FFF903803FFC0
6362 -486D4813E0B56C5AA26C497E6C496C13C02B387FB730>I<383FFFF8487FB57EA26C5B6C
6363 -5BD801FCC9FCB3B0EE0F80EE1FC0A9003FB7FC5AB8FCA27E6C16802A387EB730>I<D83F
6364 -F8ECFFE0486C4913F0486C4913F8A2007F16F06C6C4913E00007160001EF14BFEC800FA3
6365 -9039E7C01F3FA4ECE03F01E3133EA2ECF07EA201E1137CA2ECF8FCA201E013F8A214FDEC
6366 -7DF0A3147FEC3FE0A3EC1FC0A2EC070091C7FCADD83FFC903801FFE0486C4913F0B54913
6367 -F8A26C486D13F06C486D13E02D387FB730>I<D83FFC90381FFF80486C4913C0B54913E0
6368 -A26C6D6C13C06C6E13800003913801F800EBF7C0A3EBF3E0A314F013F1A214F8A213F014
6369 -FCA2147C147EA2143E143FA2141FA21581A2140F15C1A2140715E1A2140315F1A21401A2
6370 -15F91400A3157DA3153FEA3FFF481380B5EAC01FA26CEB800F6C496C5A2B387EB730>I<
6371 -90383FFFE048B512FC000714FF4815804815C04815E0EBF80001E0133FD87F80EB0FF0A2
6372 -90C71207A44815F8481403B3A96C1407A26C15F0A36D130FA26D131F6C6CEB3FE001F813
6373 -FF90B6FC6C15C06C15806C1500000114FCD8003F13E0253A7BB830>I<007FB512F0B612
6374 -FE6F7E16E0826C813903F8003FED0FFCED03FE15016F7EA2821780163FA6167F17005EA2
6375 -4B5A1503ED0FFCED3FF890B6FC5E5E16804BC7FC15F001F8C9FCB0387FFFC0B57EA46C5B
6376 -29387EB730>I<90383FFFE048B512FC000714FF4815804815C04815E0EBF80001E0133F
6377 -4848EB1FF049130F90C71207A44815F8481403B3A8147E14FE6CEBFF076C15F0EC7F87A2
6378 -EC3FC7018013CF9038C01FFFD83FE014E0EBF80F90B6FC6C15C06C15806C1500000114FC
6379 -D8003F7FEB00016E7EA21680157F16C0153F16E0151F16F0150FED07E025467BB830>I<
6380 -003FB57E4814F0B612FC15FF6C816C812603F8017F9138003FF0151F6F7E150715038215
6381 -01A515035E1507150F4B5A153F4AB45A90B65A5E93C7FC5D8182D9F8007FED3FE0151F15
6382 -0F821507A817F8EEF1FCA53A3FFF8003FB4801C0EBFFF8B56C7E17F06C496C13E06C49EB
6383 -7FC0C9EA1F002E397FB730>I<90390FF803C0D97FFF13E048B512C74814F74814FF5A38
6384 -1FF80F383FE001497E4848137F90C7123F5A48141FA2150FA37EED07C06C91C7FC7F7FEA
6385 -3FF0EA1FFEEBFFF06C13FF6C14E0000114F86C80011F13FF01031480D9003F13C0140191
6386 -38007FE0151FED0FF0A2ED07F8A2007C140312FEA56C140716F07F6DEB0FE06D131F01F8
6387 -EB3FC001FF13FF91B51280160000FD5CD8FC7F13F8D8F81F5BD878011380253A7BB830>
6388 -I<003FB712C04816E0B8FCA43AFE003F800FA8007CED07C0C791C7FCB3B1011FB5FC4980
6389 -A46D91C7FC2B387EB730>I<3B7FFFC007FFFCB56C4813FEA46C496C13FCD803F8C7EA3F
6390 -80B3B16D147F00011600A36C6C14FE6D13016D5CEC800390393FE00FF890391FF83FF06D
6391 -B55A6D5C6D5C6D91C7FC9038007FFCEC1FF02F3980B730>I<D87FFE90380FFFC0B54913
6392 -E06E5AA24A7E6C486D13C0D807F0903801FC00A26D130300035DA46C6C495AA46C6C495A
6393 -A46D131F6D5CA3EC803F013F5CA46D6C48C7FCA490380FE0FEA401075B14F1A301035BA3
6394 -14FB01015BA314FFA26D5BA46E5A6E5A2B397EB730>I<D83FFC903801FFE0486C4913F0
6395 -00FF16F8A2007F16F06C486D13E0D81FC09038001FC0000F1680A76D143F00071600A700
6396 -0390380F803E9039F01FC07EEC3FE0A3EC7FF0A2147D0001157CA29039F8FDF8FCA314F8
6397 -A300005D01F913FCA2ECF07CA201FD137DA2017D5CECE03DA3017F133FA2ECC01FA2013F
6398 -5CA2EC800F6D486C5A2D397FB730>I<3A3FFF01FFF84801837F02C77FA202835B6C0101
6399 -5B3A01FC007F806D91C7FC00005C6D5BEB7F01EC81FCEB3F8314C3011F5B14E7010F5B14
6400 -FF6D5BA26D5BA26D5BA26D90C8FCA4497FA2497FA2815B81EB0FE781EB1FC381EB3F8181
6401 -EB7F0081497F49800001143F49800003141F49800007140FD87FFEEB7FFFB590B5128080
6402 -A25C6C486D130029387DB730>I<D87FFF90381FFFC0B56C4813E0A46C496C13C0D803F8
6403 -903803F8006D1307A26C6C495AA26C6C5C151F6D5CEC803F013F5CECC07F011F91C7FCA2
6404 -90380FE0FEA214F101075BA2903803FBF8A201015B14FF6D5BA26E5AA36E5AB1903803FF
6405 -F8497F497FA26D5B6D5B2B387EB730>I<001FB612FC4815FE5AA490C7EA03FCED07F816
6406 -F0150FED1FE016C0153FED7F80003E1500C85A4A5A5D14034A5A5D140F4A5A5D143F4A5A
6407 -92C7FC5C495A5C1303495A5C130F495A5C133F495A91C8FC5B4848147C4914FE1203485A
6408 -5B120F485A5B123F485A90B6FCB7FCA46C15FC27387CB730>I<007FB5FCB61280A41500
6409 -48C8FCB3B3B3A5B6FC1580A46C140019476DBE30>I<007FB5FCB61280A47EC7123FB3B3
6410 -B3A5007FB5FCB6FCA46C140019477DBE30>93 D<1307EB1FC0EB7FF0497E000313FE000F
6411 -EBFF80003F14E0D87FFD13F039FFF07FF8EBC01FEB800F38FE0003007CEB01F00010EB00
6412 -401D0E77B730>I<007FB612F0A2B712F8A36C15F0A225077B7D30>I<EB7FF80003B5FC48
6413 -14C04880488048809038E01FFC9038C003FE14016E7E6C487F6CC77FC8123FA491B5FC13
6414 -0F137F48B6FC12075A48EB803F383FF800EA7FE0138048C7FC5AA4157F7E6C6C13FFEBC0
6415 -03263FF01FEBFF8090B712C07E6C14EF000314876CD9FE01138026003FE0C8FC2A2A7BA8
6416 -30>97 D<EA3FFC487E12FFA2127F123F1200AAEC03FE91381FFF80027F13E091B57E90B6
6417 -12FC82ECFE079138F001FF4A6C13804A137F4AEB3FC091C7121F17E049140FA217F01607
6418 -A8160FA217E07F161F6EEB3FC0A26EEB7F806E13FFDAF00313009138FC0FFE91B55A5E49
6419 -5CD97E7F13C0D93C1F90C7FC90380003FC2C3980B730>I<ECFFE0010713FC011F7F017F
6420 -7F90B612804815C048EB807F3907FC003F485A485A49EB1F804848EB0F004990C7FC127F
6421 -90C9FCA25A5AA87E7EA27F003FEC07C06DEB0FE06C7E6D131F6C6C14C0D807FE133F9039
6422 -FFC0FF806C90B5FCC615006D5B011F13F801075B01011380232A7AA830>I<913801FFE0
6423 -4A7F5CA28080EC0007AAEB03FE90381FFF874913E790B6FC5A5A481303380FFC00D81FF0
6424 -133F49131F485A150F4848130790C7FCA25AA25AA87E6C140FA27F003F141F6D133F6C7E
6425 -6D137F390FF801FF2607FE07EBFFC06CB712E06C16F06C14F76D01C713E0011F010313C0
6426 -D907FCC8FC2C397DB730>I<49B4FC010713E0011F13F8017F7F90B57E48804801811380
6427 -3A07FC007FC04848133FD81FE0EB1FE0150F484814F0491307127F90C7FCED03F85A5AB7
6428 -FCA516F048C9FC7E7EA27F003FEC01F06DEB03F86C7E6C7E6D1307D807FEEB1FF03A03FF
6429 -C07FE06C90B5FC6C15C0013F14806DEBFE00010713F8010013C0252A7CA830>I<EDFF80
6430 -020713E0021F13F05C4A13F891B5FC491387903803FE079138FC03F0903907F800C04A13
6431 -00A8003FB612C04815E0B7FCA36C15C0260007F0C7FCB3A9003FB512FE4880B71280A26C
6432 -15006C5C25397DB830>I<D903FC13FF90261FFF8713C04913DF90B712E05A5A2607FE07
6433 -138F903AF801FE07C048486C6CC7FCA2497F001F8149133FA56D137F000F92C7FC6D5BA2
6434 -6C6C485AEBFE0790B55A5D485C15C001DF5BD9C3FCC8FC01C0C9FCA37F7F6CB512F015FF
6435 -6C15C04815F0488148813A3FE0001FFE0180130148C8127F007E8100FE168048151FA56C
6436 -153F007FED7F006D5C6C6C495A01F013076CB4EB7FFC6C90B55A6C5D000115C06C6C91C7
6437 -FC011F13FC010113C02B3E7DA730>I<EA3FFC487E12FFA2127F123F1200AAEC01FE9138
6438 -0FFF80023F13E091B57E90B67EA29138FE07FCECF8039138E001FE14C0EC8000A291C7FC
6439 -A25BB3A23B3FFFF81FFFF8486D4813FCB500FE14FEA26C01FC14FC6C496C13F82F3880B7
6440 -30>I<14E0EB03F8A2497EA36D5AA2EB00E091C8FCA9381FFFF8487F5AA27E7EEA0001B3
6441 -A9003FB612C04815E0B7FCA27E6C15C023397AB830>I<EC01C0EC07F0A2EC0FF8A3EC07
6442 -F0A2EC01C091C7FCA990B512F04814F8A47EEB0003B3B3A5EC07F0A2123C007EEB0FE0B4
6443 -131FEC3FC0147F90B512806C14005C6C5B000F13F0000313C01D4E7CB830>I<EA7FF848
6444 -7EA4127F1200AB0203B512804A14C017E0A217C06E14809139001FE0004B5A4B5A4BC7FC
6445 -4A5A4A5AEC0FF84A5A4A5A4A5A4A5A01FD7F90B57E8114F7ECE3F8ECC1FCEC81FEEC00FF
6446 -497F496D7E6F7E826F7E15076F7E6F7E3B7FFFF81FFFE0B56C4813F017F8A217F06C496C
6447 -13E02D387FB730>I<387FFFF8B57EA47EEA0001B3B3A8007FB612F0B712F8A46C15F025
6448 -387BB730>I<02FC137E3B7FC3FF01FF80D8FFEF01877F90B500CF7F15DF92B57E6C010F
6449 -13872607FE07EB03F801FC13FE9039F803FC01A201F013F8A301E013F0B3A23C7FFE0FFF
6450 -07FF80B548018F13C0A46C486C01071380322881A730>I<EC01FE3A3FFC0FFF80267FFE
6451 -3F13E000FF90B57E90B67E7E6C9038FE07FCC6EBF8039138E001FE14C0EC8000A291C7FC
6452 -A25BB3A23B3FFFF81FFFF8486D4813FCB500FE14FEA26C01FC14FC6C496C13F82F2880A7
6453 -30>I<49B4FC010F13E0013F13F8497F90B57E0003ECFF8014013A07FC007FC04848EB3F
6454 -E0D81FE0EB0FF0A24848EB07F8491303007F15FC90C71201A300FEEC00FEA86C14016C15
6455 -FCA26D1303003F15F86D13076D130F6C6CEB1FF06C6CEB3FE06D137F3A07FF01FFC06C90
6456 -B512806C15006C6C13FC6D5B010F13E0010190C7FC272A7CA830>I<EC03FE3A3FFC1FFF
6457 -80267FFE7F13E000FF90B57E90B612FC6C816CEBFE07C69038F001FF4A6C13804A137F4A
6458 -EB3FC091C7121F17E049140FA217F01607A8160FA217E07F161F6EEB3FC0A26EEB7F806E
6459 -13FFDAF00313009138FC0FFE91B55A5E495C6E13C0021F90C7FCEC03FC91C9FCAD383FFF
6460 -F8487FB57EA26C5B6C5B2C3C80A730>I<49B413F8010FEBC1FC013F13F14913FD48B6FC
6461 -5A481381390FFC007F49131F4848130F491307485A491303127F90C7FC15015A5AA77E7E
6462 -15037FA26C6C1307150F6C6C131F6C6C133F01FC137F3907FF01FF6C90B5FC6C14FD6C14
6463 -F9013F13F1010F13C1903803FE0190C7FCAD92B512F84A14FCA46E14F82E3C7DA730>I<
6464 -ED07F83A3FFF803FFF486DB51280B512C302CF14C06C13DF6C9038FFFC3FD8001F13E092
6465 -38801F809238000F004A90C7FC5C5C5CA25CA45CAF003FB512FC4880B7FCA26C5C6C5C2A
6466 -287EA730>I<90381FFC1E48B5129F000714FF5A5A5A387FF007EB800100FEC7FC4880A4
6467 -6C143E007F91C7FC13E06CB4FC6C13FC6CEBFF806C14E0000114F86C6C7F01037F903800
6468 -0FFF02001380007C147F00FEEC1FC0A2150F7EA27F151F6DEB3F806D137F9039FC03FF00
6469 -90B6FC5D5D00FC14F0D8F83F13C026780FFEC7FC222A79A830>I<EB0780497E131FA900
6470 -3FB612E04815F0B7FCA36C15E026001FC0C7FCB216F8ED01FCA5ECE003010FEB07F814F0
6471 -9138FC1FF06DB512E06D14C016806D14009038007FFCEC1FF026337EB130>I<D83FFCEB
6472 -3FFC486C497E00FF14FFA2007F147F003F143F00001400B3A41501A2150315076D130F90
6473 -3A7FC07FFFF891B612FC6D15FE7F6D4913FC6D9038F87FF8010001C0C7FC2F2880A630>
6474 -I<3B3FFFC07FFF80486DB512C0B515E0A26C16C06C496C13803B01F80003F000A26D1307
6475 -00005DA26D130F017E5CA2017F131F6D5CA2EC803F011F91C7FCA26E5A010F137EA2ECE0
6476 -FE01075BA214F101035BA3903801FBF0A314FF6D5BA36E5A6E5A2B277EA630>I<3B3FFF
6477 -C01FFFE0486D4813F0B515F8A26C16F06C496C13E0D807E0C7EA3F00A26D5C0003157EA5
6478 -6D14FE00015DEC0F80EC1FC0EC3FE0A33A00FC7FF1F8A2147DA2ECFDF9017C5C14F8A301
6479 -7E13FBA290393FF07FE0A3ECE03FA2011F5C90390F800F802D277FA630>I<3A3FFF81FF
6480 -FC4801C37FB580A26C5D6C01815BC648C66CC7FC137FEC80FE90383F81FC90381FC3F8EB
6481 -0FE3ECE7F06DB45A6D5B7F6D5B92C8FC147E147F5C497F81903803F7E0EB07E790380FE3
6482 -F0ECC1F890381F81FC90383F80FE90387F007E017E137F01FE6D7E48486D7E267FFF80B5
6483 -FCB500C1148014E3A214C16C0180140029277DA630>I<3B3FFFC07FFF80486DB512C0B5
6484 -15E0A26C16C06C496C13803B01FC0003F000A2000014076D5C137E150F017F5C7F151FD9
6485 -1F805BA214C0010F49C7FCA214E00107137EA2EB03F0157C15FCEB01F85DA2EB00F9ECFD
6486 -F0147D147FA26E5AA36E5AA35DA2143F92C8FCA25C147EA2000F13FE486C5AEA3FC1EBC3
6487 -F81387EB8FF0EBFFE06C5B5C6C90C9FC6C5AEA01F02B3C7EA630>I<001FB612FC4815FE
6488 -5AA316FC90C7EA0FF8ED1FF0ED3FE0ED7FC0EDFF80003E491300C7485A4A5A4A5A4A5A4A
6489 -5A4A5A4A5A4990C7FC495A495A495A495A495A495A4948133E4890C7127F485A485A485A
6490 -485A485A48B7FCB8FCA46C15FE28277DA630>I<ED3FF0913803FFF8140F5C147F16F091
6491 -38FFF00092C7FC495A5CB3A21303495A133F383FFFF0B55A5C91C8FC14C080003F7F3800
6492 -3FF813076D7E1301B3A2806D7E15F091387FFFF016F8141F8014039138003FF025477BBE
6493 -30>I<127CA212FEB3B3B3AD127CA207476CBE30>I<EA7FE0EAFFFE6D7E8014F07EC66C7E
6494 -13076D7E1301B3A2806D7E15E091387FFFE06E13F8801407141F5C4A13E09138FFE00092
6495 -C7FC495A5CB3A21303495A137F387FFFF0B5FC14C05C49C8FCEA7FE025477BBE30>I<01
6496 -7C133848B4137C48EB80FE4813C14813C348EBEFFC397FEFFFF0D8FF8713E0010713C048
6497 -6C1380D87C0113003838007C1F0C78B730>I E
6498 -%EndDVIPSBitmapFont
6499 -%DVIPSBitmapFont: Fj cmb10 10.95 87
6500 -/Fj 87 125 df<DA07FFEB0FFC027F9038E07FFF49B500F3B51280010791B612C090261F
6501 -FE039038FC7FE0D93FF002F013F0494848EBE0FF4948485B02805C481300A24848923800
6502 -7FE06FEC3FC0F01F806F91C7FC81A9B97EA50003D900010180C7FCB3ACB5D8F83FEBFF80
6503 -A53C407FBF35>11 D<EC07FF027F13C049B512F001078090391FFE03FC90393FF001FE90
6504 -387FE0034948487E4A5A481300A2485AA36F5A6F5AED00F093C7FCA616FFB8FCA50003EB
6505 -000781B3ABB5D8F87F13FCA52E407EBF33>I<EC07FF027F13FF49B6FC130790381FFE07
6506 -90383FF00FEB7FE0EBFFC04A5A48497EA2485A8181ABB8FCA50003EB0003B3ACB500FCB5
6507 -12FCA52E407EBF33>I<913B07FF8003FF80027FD9E03F13E049B56CB512F8010702FB80
6508 -011F0103B5EA01FE90263FF8019038F800FF90267FE003495A4948484948138002804A5A
6509 -48010014805D481600497FA26F6E13006F6E5AF0007896C7FCA6F17F80BBFCA50003D900
6510 -01EB800384B3ABB5D8F83FD9FC3F13FEA547407EBF4C>I<EA0FC0EA1FE0EA3FF0EA7FF8
6511 -EAFFFCA7EA7FF8A8EA3FF0A7EA1FE0A8EA0FC0A71207C7FCA8EA0FC0EA1FE0EA3FF0EA7F
6512 -F8EAFFFCA6EA7FF8EA3FF0EA1FE0EA0FC00E4079BF1C>33 D<D80FC0137E486C13FF486C
6513 -481380486C4813C0486C4813E0A301FE14F0A3007F7F003F7F001F7FD80FDE137ED8001E
6514 -1300A2013E1301013C14E0A2017C1303A2017814C001F813074914800001140F4848EB1F
6515 -004848133EA2D81F8013FC90C75A001E5C000C146024207DBE31>I<D93F801507D9FFE0
6516 -ED1F8000037F486D153F260FF1FC157F261FF07F4BC7FC01E06DEB03FE003FD93FE0130F
6517 -01C001FCEB3FFC007F6DB65AA2031F5C00FFD90F83EBEFE0923880000F4D5A60173F4DC8
6518 -FCA217FE4C5AA24C5A4C5AA2007F4948485A4C5AA2003F49495AD9E03E91C9FC001F017E
6519 -5BD9F07C13FE380FF1FC6CB448485A6C49485AC613E090273F8007F0EB3F8090C74848EB
6520 -FFE005037F4B48487F923A3F800FF1FC94381FF07CDB7F00EBE07E037E013F133E03FEEC
6521 -C03F4A48017F7FA24A5A4A4801FFEB0F80A24A5A4A5AA24A5A4AC7FCA214FE5C1301495A
6522 -A24948027FEB1F00495AA24948023F5B4948EDE03E051F137E49C8EBF07C017E92380FF1
6523 -FC01FE6FB45A496F5B017C03005B0138EE3F8041497BC34C>37 D<EC0FE0EC3FF8ECFFFC
6524 -5B903803FC3E49487EEB0FF0131F6F7EEB3FE0A3137FA3151F93C9FCA2153E14F05D5D14
6525 -F15D90263FFBE090387FFFFCECFFC05D92C7FC6D5A4A913800FC006E5D17016D6C4A5A60
6526 -6F1307495E017F6D130F90B56C495A4894C7FCD803F96D5BD807F86D133E000F167E4848
6527 -6C6C5B003F6E5B91383FFF01007F6D5CEE83E000FF6D13C76EEBEFC06E5C16FF6E91C8FC
6528 -6E5B037F15F86D6D7E007F6E7F6FEBC0016C6C013F9038E003F092B5EAF007261FFE0791
6529 -38FC1FE06CB5D8FC7FB512C06CDAF81F14800001DAE00714006C6CD980005BD91FF8C7EA
6530 -1FF03E417CBF47>I<EA0FC0EA1FE0EA3FF0EA7FF8EAFFFCA313FEA3127F123F121FEA0F
6531 -DEEA001EA2133E133CA2137CA2137813F813F01201EA03E0EA07C0A2EA0F80EA1F00121E
6532 -120C0F207BBE19>I<147814F81301EB03F0EB07E0EB0FC0A2EB1F80133FEB7F00A213FE
6533 -A2485A1203A25B1207A2485AA3121F5BA2123FA4485AA612FFB3A2127FA66C7EA4121FA2
6534 -7F120FA36C7EA212037FA212016C7EA2137FA2EB3F80131FEB0FC0A2EB07E0EB03F0EB01
6535 -F813001478155A78C323>I<127012F87E127E7E6C7EA26C7E7F6C7EA26C7EA26C7E7FA2
6536 -12007FA2EB7F80A314C0133FA214E0A4EB1FF0A614F8B3A214F0A6EB3FE0A414C0A2137F
6537 -1480A3EBFF00A25B1201A25B485AA2485AA2485A5B485AA248C7FC127E5A5A1270155A7B
6538 -C323>I<EB01E0EB07F8A2497E13075CA3001E141E007FEC3F80903883F07FD8FFC3EBFF
6539 -C0EBE3F1EBF3F3267FFBF713806D5A001FB5EAFE00000314F0C66C1380D91FFEC7FCA290
6540 -387FFF800003B512F0001F14FE3A7FFDEFFF80497E26FFF3F313C0EBE3F1EBC3F0D87F83
6541 -EB7F80903807F83F001EEC1E00000091C7FCA380130F6D5AA2EB01E022287BC32D>I<EA
6542 -0FC0EA1FE0EA3FF0EA7FF8EAFFFCA313FEA3127F123F121FEA0FDEEA001EA2133E133CA2
6543 -137CA2137813F813F01201EA03E0EA07C0A2EA0F80EA1F00121E120C0F207B8D19>44
6544 -D<B512FEA917097F981E>I<EA0FC0EA1FE0EA3FF0EA7FF8EAFFFCA6EA7FF8EA3FF0EA1F
6545 -E0EA0FC00E0E7B8D19>I<ED0380ED07C0150FA2151F1680A2153F1600A25D157EA215FE
6546 -5DA214015DA214035DA214075DA2140F5DA2141F5DA2143F92C7FCA25C147EA214FE5CA2
6547 -13015CA213035CA313075CA2130F5CA2131F5CA2133F91C8FCA25B137EA213FE5BA21201
6548 -5BA212035BA212075BA2120F5BA2121F5BA2123F90C9FCA25A127EA212FE5AA25A127822
6549 -5B7BC32D>I<EB01FE90380FFFC0013F13F090B512FC48EB87FE3903FE01FF48486C1380
6550 -A24848EB7FC0001F15E049133FA2003F15F0A3007F15F8A500FF15FCB3A3007F15F8A600
6551 -3F15F0A36C6CEB7FE0A2000F15C06D13FF000715806C6C4813003901FF87FE6CEBFFFC01
6552 -3F13F06D5BD901FEC7FC263D7DBB2D>I<143C147CEB01FC1307131FEA03FFB5FCA4EAFC
6553 -1F1200B3B3A8007FB6FCA5203C7ABB2D>I<EB0FFC90387FFF8048B512E04814F8488039
6554 -0FF07FFE391F801FFF48486C1380387FC00701E014C0486C6C13E013F88016F0A4EA7FF0
6555 -EA3FE0EA1FC0EA0700C7FC16E05CA216C04A1380A24A13005D4A5A5D4A5A5D4A5A4A5A49
6556 -90C7FC5CEB03F8903907F001F0EB0FE014C090391F8003E0EB3F00137E5B491307485A48
6557 -B6FC4815C05AA25A5A5AB7FC1680A4243C7CBB2D>I<EB0FFC90383FFFC090B512F04880
6558 -3903F83FFC3907E00FFED80FC07F486C6C138013F801FC14C0123F13FEA5EA1FFC1680EA
6559 -0FF8D803E01400C75A5D5D4A5A5DEC7FE090381FFFC092C7FC15C015F09038003FF8EC0F
6560 -FE816E1380A216C06E13E0A316F0EA0FC0EA1FE0EA3FF0EA7FF8EAFFFCA416E0A2495A00
6561 -7F15C013F0263FC00F13801600391FF83FFE6CB55A6C5C000114E06C6C1380D90FFCC7FC
6562 -243D7CBB2D>I<ED1F80A2153F157FA215FF5C5CA25C5CA25C5CA25C91B5FC14FBEB01F3
6563 -1303EB07E314C3EB0F83131F1403133E137E137C13F8120113F0EA03E01207EA0FC01380
6564 -EA1F005A123E5A12FCB8FCA5C700071380AA010FB6FCA5283C7EBB2D>I<000E1407D80F
6565 -80133F9038F801FF90B6FC5D5DA25D5D5D158092C7FC14FC14F00180C8FCA9EB87FE9038
6566 -9FFFC090B512F0819038FC0FFC9038F007FE9038C003FF0180148016C0497EC714E0A416
6567 -F0A21207EA1FC0EA3FE0EA7FF012FF13F8A316E013F0A26C484813C01380D87E0014806C
6568 -491300391FC00FFE390FF03FFC6CB55A6C5C6C14C06C91C7FCEB1FF8243D7CBB2D>I<EC
6569 -3FE0903801FFF801077F011F7F90383FF07F90397FC01F809038FF807F48EB00FF484913
6570 -C048485AA2EA0FFCA2121FA2003F6D1380496C1300157E007F91C7FCA314309038F9FF80
6571 -D8FFFB13E090B512F881EC07FE496C7E496C1380A216C0A201F814E0A316F0A6127FA512
6572 -3F16E0A2121F16C0EA0FFC168000075B01FE14003903FF0FFE6CEBFFFC6C5C013F5B6D13
6573 -C0D903FEC7FC243D7CBB2D>I<121F7F13F090B612FCA45A16F816F016E0A216C016805A
6574 -007EC7EA3F00157E007C147C15FC4A5A4A5A485C14074A5AC75B141F4AC7FCA25C14FEA2
6575 -1301A2495AA31307A2130FA25C131FA3133FA6137FAA6D5A6D5A6D5A263F7BBD2D>I<EB
6576 -07FE90381FFFC0017F13F090B57E3901FE0FFC3903F803FE48486C7E000F6D1380A2485A
6577 -ED7FC0123FA37FA27F7F6DEBFF806D7E6E13006C13F1ECFBFE6CEBFFFC5D6C14E0A26C14
6578 -F86C806C80814815805AD807FB14C0EA0FF048486C13E0003F131F497E007F010313F080
6579 -00FF7F49137F153FA2151FA416E06C7E153F6D14C0003F147F6D14803A1FF801FF00390F
6580 -FE07FE6CB55A6C5CC65C013F13C0D907FEC7FC243D7CBB2D>I<EB07FE90383FFF8090B5
6581 -12E0488048EB0FF848486C7E48486C7E001F80497E003F1580A2127F16C0A212FF16E0A5
6582 -16F0A6127FA3003F5BA2121FA26C6C5A6C6C5A6CB6FC7E38007FFDD91FF913E0EB00C114
6583 -01A3D807E014C0EA0FF0486C5AD83FFC1480A316004A5AA249485AD81FF05B9038E03FF0
6584 -000F495A90B55A6C5C6C91C7FCC613FCEB3FE0243D7CBB2D>I<EA0FC0EA1FE0EA3FF0EA
6585 -7FF8EAFFFCA6EA7FF8EA3FF0EA1FE0EA0FC0C7FCACEA0FC0EA1FE0EA3FF0EA7FF8EAFFFC
6586 -A6EA7FF8EA3FF0EA1FE0EA0FC00E287BA719>I<EA0FC0EA1FE0EA3FF0EA7FF8EAFFFCA6
6587 -EA7FF8EA3FF0EA1FE0EA0FC0C7FCACEA0FC0EA1FE0EA3FF0127FEAFFF8A213FCA4127F12
6588 -3F121F120FEA003CA2137C1378A313F813F0120113E0120313C01207EA0F80121F130012
6589 -1E120C0E3A7BA719>I<007FB912E0BA12F0A4003F18E0CDFCB0003FB912E0BA12F0A46C
6590 -18E03C1C7BA447>61 D<EB3FFC48B512804814E0000F14F0391FF03FF8393F801FFC007F
6591 -EB0FFE13C0D8FFE013FF13F0A5EA7FE015FE383FC01FD80F0013FCC7123FEC7FF815F0EC
6592 -FFC015804913005C5C495AA25C495AA35CAA90C8FCA8EB0FC0497E497E497E497EA66D5A
6593 -6D5A6D5A6D5A20407BBF2B>63 D<ED07804B7E4B7EA34B7EA34B7EA34B7EA34A7FA34A7F
6594 -A24A8015CFA2020F801587A2021F801503A2023F80EC3E01A2027E80EC7C00A24A6D7EA2
6595 -0101814A133FA20103814A7FA249B77EA34982A29138800007011F8291C77EA2496E7F13
6596 -3EA2496E7FA201FC8249157FB500F0013FB512FCA53E3F7DBE45>65
6597 -D<B712FEEEFFE017F817FE83C69026F0001F1380040713C07013E0A27013F0A28218F8A7
6598 -18F05EA218E05E18C04C1380041F1300EE7FFC91B612F017C017F817FE913AF00007FF80
6599 -7013C07013E07013F018F8177F18FCA318FEA3173F177FA418FCA217FF18F85E18F04C13
6600 -E0160FB912C018005F17F01780373E7CBD41>I<DB7FF8130E0207B5131E023FECC03E91
6601 -B6EAF07E0103EDF9FE499038F807FF011FEBC0004990C7123FD97FFC141F4948140F4849
6602 -1407484914035C484914015A91C9FC5A187E485AA3007F173EA25BA200FF1700AE127F18
6603 -3E7FA2123FA2187E6C7E187C7E6E15FC6C6D15F86C16016EEC03F06C7F6C6DEC07E06D6C
6604 -EC0FC06DB4EC3F806D01C0EBFF0001079038F807FE6D90B55A010015F0023F5C02071480
6605 -9126007FF8C7FC37407BBE42>I<B712FCEEFFC017F017FC17FFC69026F0003F7F04077F
6606 -040113F082717E717E717E170F84831980A219C083A219E0A519F0A483A55FA419E0A519
6607 -C0A25F1980A24D1300A24D5A4D5A177F4D5A4C5B04075B043F5BB9C7FC5F17F817C004FC
6608 -C8FC3C3E7CBD46>I<B812FEA483C69038F8003F16071601828383A2EF1F80A3170FED01
6609 -F0A3EF07C0A3150394C7FCA21507151F91B5FCA5ECF81F1507150318F8A21501EF01F0A5
6610 -92C71203A218E0A21707A2170F171F18C0173F17FF1603161FB9FCA21880A3353D7CBC3C
6611 ->I<B812F8A417FCC69038F8007F161F1607160316011600A2177EA3173EA2ED03E0A217
6612 -1FA417001507A2150F153F91B5FCA5ECF83F150F1507A21503A792C8FCACB612FEA5303D
6613 -7CBC39>I<DB7FF0131C912607FFFE133C023F9038FF807C91B6EAE0FC010315F3010F90
6614 -38F80FFF49EBC0014948C7127F4948143FD9FFF0141F4849140F4816075C484914035A91
6615 -C812015A1700485AA3007F177CA25BA200FF94C7FCAC0303B612F0A2127FA27F92C7387F
6616 -FC00123FA36C7EA27E807E6C7F806C7F6C7F6D6C14FF6DB45B6DEBC0036DEBF80F010390
6617 -B512E7010015C1023FEC807C02079038FE001C9126007FF090C7FC3C407BBE47>I<B6D8
6618 -F87FB512FCA5C601F8C7387FFC00B3A491B7FCA502F8C7127FB3A7B6D8F87FB512FCA53E
6619 -3E7CBD47>I<B612F8A5C6EBF800B3B3B0B612F8A51D3E7DBD24>I<010FB61280A5D90001
6620 -EBE000B3B3A4EA1FE0EA3FF0EA7FF8A2EAFFFCA44A5BA26C48485B01F091C7FC6C48485A
6621 -391FF03FFC6CB55A6C5C000114C026001FFCC8FC293F81BD2F>I<B600F890B512F8A5C6
6622 -01F8C73803F8004D5A4D5A4D5A4D5A4DC7FC17FE4C5A4C5A4C5A4C5A4C5A4C5A4CC8FC16
6623 -FE4B5A4B5A4B5A4B5A151F4B7E4B7EA24B7E14F902FB7F91B6FC15DF039F7F158F030F7F
6624 -4A6C7F4A7E02F880816F7F83167F83707E82848284707F82848284707F177F84B6D8F80F
6625 -B512FCA53E3E7CBD47>I<B7FCA5C601F8C8FCB3AD177CA417FC17F8A41601A3160317F0
6626 -1607A2160F161F163F16FF1503B8FC17E0A42E3E7CBD37>I<B500FC93B512F86E5DA36E
6627 -5DC6F1F800A26FEC07BFA301FD6DEC0F3FA201FC6D141EA36E6C143CA36E6C1478A36E6C
6628 -14F0A26E6CEB01E0A36E6CEB03C0A36E9038800780A36E9038C00F00A26EEBE01EA36F6C
6629 -5AA36F6C5AA36F6C5AA26FB45AA36F5BA36F5BA36F90C7FCA26F5AB500FC033FB512F8A2
6630 -167CA216384D3E7CBD56>I<B500F891B512FC80A28080C6933800FC008181A28181A201
6631 -FD7F01FC7FA26E7E6E7E80826E7F80826E7F6E7FA26E7F6F7EA26F7E6F1380A26F13C06F
6632 -13E0A26F13F06F13F8A26F13FCEE7FFEA2EE3FFF82A28282A2828282A2177F173FA2171F
6633 -170FA21707B500FC1403A217011700A23E3E7CBD47>I<913801FFC0021F13FC91B67E01
6634 -0315E04901807F903A1FFE003FFCD93FF8EB0FFE49486D7E49486D7F48496D7F48834A7F
6635 -48834890C86C7EA2488349153FA2003F83A249151F007F83A400FF1880AE007F1800A36D
6636 -5DA2003F5FA36C6C4B5AA26C5F6E14FF6C5F6C6D495B6E5B6C5F6C6D495B6D6C4990C7FC
6637 -D93FFEEB3FFE6D6C6CB45A010790B512F06D5D01001580021F01FCC8FC020113C039407B
6638 -BE44>I<B712F816FF17E08317FCC6D9F0007FEE1FFF7013808218C08218E0A318F0A818
6639 -E0A318C05E18804C13005EEEFFFE91B612F85F17C04CC7FC02F8C9FCB3A4B612F8A5343E
6640 -7CBD3E>I<913801FFC0021F13FC91B67E010315E04901807F903A1FFE003FFCD93FF8EB
6641 -0FFE49486D7E49486D7F48496D7F48496D7FA24890C86C7E488349153F001F83A249151F
6642 -003F83A3007F834981A300FF1880AE007F1800A46D5D003F5FA36C6C4B5AA2000F027F5C
6643 -903AFF01FF807F6C4901E05B6C01876D485A15C16C9026CF80795B6C9026EF007F5B6DB4
6644 -6D90C7FC6D5D6D01805B01079038C0FFF06D90B55A0100ED8001021FED03800201EBCFC0
6645 -91C7EA0FE01807EFF81F94B5FCA3701400A4705BA2705B60705B715AEF1FC039517BBE44
6646 ->I<B712E016FF17C017F883C69039F0007FFE93381FFF801607707F84A2707FA284A860
6647 -A24C5BA2604C5B041F90C7FCEEFFFE91B612F817E094C8FC17C0DAF00113F06F6C7E707E
6648 -83161F83A2707FA684A6191F18E0A282F0F03FB6D8F003143E70EBF87E70EBFFFC053F13
6649 -F8050F13F0CB13C0403F7CBD45>I<D907FE133890393FFFC07890B5EAF0F84814F90007
6650 -14FF380FFE07EBF0004848133F4848131F150F007F1407491303A212FF1501A36D1300A2
6651 -7F7F6D140013FE387FFFE014FEECFFE06C14FC816CECFF806C15C06C15E016F012016C15
6652 -F86D14FC131F010114FEEB001F14019138003FFF150F81A200788012F8A281A27EA216FE
6653 -7E15036C15FC7F6DEB07F813F001FCEB1FF09039FFC07FE091B512C000FC1580D8F83F14
6654 -00D8F00713FC48C613E028407BBE33>I<003FB812FCA5D9FC03EBE01FD87FE0ED07FE01
6655 -C01501018015001300007E177EA3007C173EA400FC173F48171FA5C71600B3AF013FB612
6656 -FEA5383D7DBC3F>I<B600F890B512F8A5C601F8C8EAF800B3B3A5017F150160A280013F
6657 -1503606D6C1407010F4B5A6E4A5A6D6D133F6D6D01FFC7FC6D9038F807FE6D6CB55A6E5C
6658 -020F14E0020314809126003FFCC8FC3D3F7CBD46>I<B600F0010FB5FCA5C601F8C8EA1F
6659 -00A26E5D017F163EA26E157E013F167C6E15FC6D5EA26F13016D5EA26D6D495AA26F1307
6660 -6D5EA26F130F6D5E816D4BC7FCA26F5B027F143EA26F137E023F147C6F13FC6E5CA21681
6661 -6E5CA216C36E5C16E76E5CA216FF6E5CA36E91C8FCA26F5AA36F5AA36F5AA26F5AA36F5A
6662 -A2403F7EBD45>I<B600E0B6D8F007B51280A500019026F0000101F8C73807C00070160F
6663 -6C6D6184177F6D6C4EC7FC84173F6D6C183E177F846E187E6D92B5147C856F17FC6D4A5E
6664 -05F77F03C016016D02035E05E313E003E016036D02075E05C113F003F016076D61DC0F80
6665 -13F803F8160F6D6193391F007FFC03FC161F027F95C8FC4C14FE043E013F5BDA3FFE163E
6666 -047E14FF047C6D137EDA1FFF167C04FC15FC4C7F6E5FA24C7F6E5FA24C7F6E5FA24C7F6E
6667 -5FA24C7F6E5FA293C8127FA26F93C9FC037E81033E153E593F7EBD5E>I<003FB5D8FC0F
6668 -B512F0A5D8003F90C7380FC0006D6D495A4DC7FC6D7F6D6D137E5F6D7F4C5A6D6D485A6D
6669 -13FC4C5ADA7FFE5B160F6E6C485A6E139F04BFC8FC6E13FEA26E5B6E5BA28082806F7EA2
6670 -6F7E83A24B7F92B5FC83DA01FB7FEC03F303F17FEC07E1DA0FC07F707EEC1F804B6C7E5C
6671 -027E6D7F707F5C49486D7FA249486D7F49486D7FA249486D7F49486E7EA2B6011FB6FCA5
6672 -403E7EBD45>I<B600F80103B512C0A5C66C48C8380F80006E151F6D4CC7FC816D167E6D
6673 -7F6F5C6D5E6F13016D5E6F13036D4B5A6D7F6F495A027F5D6F131F6E92C8FC6E6D5AEEC0
6674 -7E80705A80EEF1F86E5C6E13FBEEFFE0805F815F6F90C9FC815EB3A2021FB6FCA5423E7F
6675 -BD45>I<003FB712F8A5DAC00313F09026FC000713E05B01E04913C05B49491380127F90
6676 -C74813004B5A127E4B5AA24A5B127C4A5B5C5E4A5BC7FC4A5BA24A90C7FC5C5D4A5AA249
6677 -5BA2495B5B5D4949137CA2495BA24990C7FC4915FC4A14F8495AA2485B1601485BA24849
6678 -1303485B16074849130F161F4890C7123FEEFFF04848130FB8FCA52E3E7BBD38>I<EAFF
6679 -FEA6EAFC00B3B3B3B3A7EAFFFEA60F5B78C319>I<0160130301F0EB07800001140F0003
6680 -141FD807C0EB3E00A248485B48C75A001E5C003E1301003C5C007C1303A200785CA200F8
6681 -1307485CA2D8F7E013BFD8FFF0EBFF8001F814C001FC14E001FE14F0A3007F7FA36C486C
6682 -13E06C486C13C06C48EB7F806C48EB3F00242077BE31>I<EAFFFEA6EA007EB3B3B3B3A7
6683 -EAFFFEA60F5B7FC319>I<EB0FFE90387FFFC048B512F04814FC3907FC0FFE48486C7E6D
6684 -6C7F486C7E82A26E7FA36C5A6C5AEA01E0C8FC5C49B5FC131F90B6FC000313F84813C048
6685 -1300EA1FFC485A127F5B12FF5BA45CA26C6C5A16F83B3FF807BFFF80391FFC1F3F390FFF
6686 -FE1F6C497E0001EBF80326003FE0C8FC292B7EA92C>97 D<13FFB5FCA512077EAFEC03FE
6687 -91381FFFC0027F13F091B57E9138FE0FFE9138F003FF4A7E02C014804A6C13C017E0A3EE
6688 -7FF0A317F8AC17F0A3EEFFE0A217C05D02C014806E4813006E485A9138FC1FFC01FCB55A
6689 -496C13E0D9F01F1380C7D807FCC7FC2D407EBE33>I<EB03FF011F13E0017F13F890B57E
6690 -48EB83FE3903FE01FF00075B4848481380121F13F8123FA2127F496C13006E5AEC007800
6691 -FF91C7FCAC127FA27F003FEC07C0A26C6C130F16806C6C131F000715006C6C137F6CEBC1
6692 -FE6CEBFFFC6D13F0011F5B010390C7FC222B7DA928>I<ED01FEEC01FFA5EC000F1507AF
6693 -EB01FF011F13C7017F13F790B6FC4813C148EB007F4848131F485A001F140F5B123FA248
6694 -5AA312FFAC127FA36C7EA3001F141F6C7E00074A7E6D90B512F83803FF83C690B6FC6D13
6695 -EF011F13CF903A03FE0FF8002D407DBE33>I<49B47E010F13F0013F7F90B512FE48EBC3
6696 -FF48010013804848EB7FC04848133F001F15E05B003FEC1FF0A2485A150F16F8A212FFA2
6697 -90B6FCA401F0C8FCA5127FA37F003F15F8A26C6C1301000F15F06D13036C6CEB07E06C90
6698 -38800FC06C9038F07F806C6CB512006D5B010F13F8010013C0252B7EA92A>I<EC1FF8EC
6699 -FFFE01077F491480D91FF813C0D93FE013E0EB7FC1EBFF81481301A348486C13C0ED7F80
6700 -ED3F0092C7FCAAB6FCA5000390C8FCB3ACB6FCA523407EBF1C>I<D907FE13FC90393FFF
6701 -C3FE90B5EAF7FF4891B5128048130F3907FC03FE3A0FF801FF7F001FEDFF00496C13BE16
6702 -80003F81A7001F5DA26D5A000F92C7FC6C6C485A3903FF0FFCECFFF8485CD80F3F13C0D9
6703 -07FEC8FC90CAFC5AA27FA213E090B512F015FF6C15C0826C816C8182120F4881393FE000
6704 -3FD87F80EB07FF150148C7FC81A56D5B007F5D6D13036C6C495AD81FF8EB1FF86CB4EBFF
6705 -F06C90B55A000115806C6C49C7FC010713E0293D7EA82D>I<13FFB5FCA512077EAFED7F
6706 -E0913801FFF802077F4A7F91381FC3FFDA3E031380147CEC780102F014C014E0A214C0A3
6707 -1480B3A4B5D8FE1F13FFA5303F7EBE33>I<EA01F8487E487E487E481380A66C13006C5A
6708 -6C5A6C5AC8FCA913FFB5FCA512077EB3ABB512F8A515407EBF19>I<EC1F80EC3FC0EC7F
6709 -E0ECFFF04913F8A66D13F0EC7FE0EC3FC0EC1F8091C7FCA9EC07F8EB0FFFA5EB003F141F
6710 -B3B3A2EA1F80EA3FC0EA7FE0EAFFF015F0143FA2EC7FE015C0397FE0FF80D83FC113006C
6711 -B45A6C5B6C13F0C613801D5387BF1C>I<13FFB5FCA512077EB092B512E0A592380FE000
6712 -4B5A4B5A4BC7FC15FE4A5A4A5A4A5A4A5A4A5A143FECFFE0A28181A2ECDFFCEC8FFE140F
6713 -6E7E6E7FA26E7F6E7FA26F7E6F7EA26F7E6F7EB539FC7FFFF8A52D3F7FBE30>I<13FFB5
6714 -FCA512077EB3B3AFB512FCA5163F7EBE19>I<01FFD97FE0EB3FF0B52601FFF8EBFFFC02
6715 -07D9FC037F4A6D487F91281FC3FF0FE17FDA3E03D99F017F0007017C14BE6CD97801EBBC
6716 -0002F002F88002E05CA202C05CA302805CB3A4B5D8FE1FD9FF0FEBFF80A549297EA84C>
6717 -I<01FFEB7FE0B53801FFF802077F4A7F91381FC3FFDA3E0313800007137C6CEB780102F0
6718 -14C014E0A214C0A31480B3A4B5D8FE1F13FFA530297EA833>I<49B47E010F13F0013F13
6719 -FC90B6FC48018113803A03FE007FC04848EB3FE0000F15F049131F001F15F8A24848EB0F
6720 -FCA2007F15FEA400FF15FFAB007F15FEA3003F15FC6D131F001F15F8A26C6CEB3FF00007
6721 -15E06C6CEB7FC03A01FF81FF806C90B51200013F13FC010F13F001011380282B7EA92D>
6722 -I<9038FF03FEB5381FFFC0027F13F091B57E9138FE1FFE9138F007FF0007497E6C01C014
6723 -804A6C13C017E081A217F0A2167F17F8ACEEFFF0A317E05D17C0A26E4813806E4813006E
6724 -485A9138FC1FFC91B55A16E0029F1380DA87FCC7FC0280C8FCACB512FEA52D3B7EA833>
6725 -I<49B4131E010FEBC03E013FEBE07E90B5EAF0FE48EBC1F948EB807F48EB003F485A4848
6726 -131FA2003F140F5B127F1507A2485AAC127F7FA2123F150F6C7E151F6C7E0007143F6C6C
6727 -13FF6C13C36C90B5FC6D13EF011F138F903803FE0F90C7FCAC0203B512F8A52D3B7DA830
6728 ->I<3901FE07F800FFEB0FFE91383FFF804A13C0EC7C7F9138F8FFE03807FFF06C5B5CA2
6729 -ED7FC09138803F80ED1F0092C7FCA291C8FCB3A3B6FCA523297FA827>I<90387FE1E038
6730 -03FFFB4813FF5A381FE07F383F801F387F000F007E130712FE1403A27EA26DC7FC13F013
6731 -FF6C13F014FC6C13FF15806C14C07E6C14E0000114F06C7E010313F8EB003F140F007813
6732 -0712F814037EA36C14F06C1307A29038800FE09038F03FC090B51280150000F813FC38E0
6733 -3FF01D2B7DA924>I<131FA65BA55BA25BA25A5A5A001FEBFFC0B6FCA4000790C7FCB3EC
6734 -03E0A97EEC87C0A26CEBCF806C13FF6D1300EB1FFEEB07F81B3B7EB923>I<D9FF80EB7F
6735 -C0B5EB7FFFA5000714036C80B3A55DA35D7E4B13E0DAC01E13FF6CEBE07E6DB45A6D5B01
6736 -0F13E0010101801300302A7EA833>I<B539FC1FFFE0A5000390398000F800ECC0016C5D
6737 -A2ECE0036C5D1507D97FF05BA2ECF80F013F5CA2ECFC1F011F91C7FC5D90380FFE3EA215
6738 -7E903807FF7CA215FC6D5BA26D5BA36D5BA36E5AA26E5AA36EC8FC2B287EA730>I<B500
6739 -E1B53887FFF8A50007903B801FF0003F006C6F133E150F02C0157E6C4A6C137CA26C01E0
6740 -5D4B7EA2D97FF04A5AED7FFF157DD93FF84A5A03FD138303F81387D91FFCECC7C014FD92
6741 -38F07FCFD90FFFECEF80A29238E03FFF6D93C7FCA24B7E6D5DA2ED800F6D5DA2ED00076D
6742 -5DA24A1303027E5C027C13013D287EA742>I<3B7FFFFC7FFFE0A5C69039E007E0004B5A
6743 -90387FF01FD93FF85B4BC7FC90381FFC7EEB0FFE5D6D6C5A7F5D6D5B7FA26E7E143F814A
6744 -7E14FF81497FEB03F301078002E17FEB0FC049487F6F7E90383F003F017E806F7EB500E0
6745 -B512F8A52D287FA730>I<B539FC1FFFE0A5000390398000F800ECC0016C5DA2ECE0036C
6746 -5D1507D97FF05BA2ECF80F013F5CA2ECFC1F011F91C7FC5D90380FFE3EA2157E903807FF
6747 -7CA215FC6D5BA26D5BA36D5BA36E5AA26E5AA36EC8FCA25C143EA2000E5BEA3F80387FC0
6748 -FC486C5AA2EBE1F0A2EBE3E013C7387FCFC0387D3F80D83FFFC9FC5BEA0FF8EA07E02B3B
6749 -7EA730>I<001FB61280A4D9F80F1300EBE01F01C05B49485A130048495A4A5AA2D83E01
6750 -5B5B5D495BA2C64890C7FC5B5C495A017FEB0F8014F8EBFFF0A248EBE01F48150014C048
6751 -1380A248495A485A5D48485B007F5B9038F80FFEB6FCA421287EA728>I<B812F0A42C04
6752 -809A2D>I<BE12C0A45A04809A5B>I E
6753 -%EndDVIPSBitmapFont
6754 -%DVIPSBitmapFont: Fk cmbx12 14.4 49
6755 -/Fk 49 122 df<EEFFFC031FEBFF804AB612E0020781021F9038C00FF8913A7FFE0003FC
6756 -DAFFF0EB00FE4949EB03FF4901805B4990C7487F49485CA2495A4D7F013F6F5B5CA37190
6757 -C7FC715AEF01F894C9FCA90403B512C0BAFCA526003FFCC7120783B3B3A6003FB5D8FC03
6758 -B612C0A542547DD34B>12 D<B712F0AB240B7F9F2D>45 D<EA07F0487E487E487E487EB5
6759 -1280A76C13006C5A6C5A6C5A6C5A1111769025>I<913803FFC0023F13FC91B6FC010315
6760 -C0010F018113F0903A1FFC003FF849486D7E49486D7E49486D7E48496D138048496D13C0
6761 -A24817E04890C813F0A34817F8A24817FC49157FA3007F17FEA600FF17FFB3A5007F17FE
6762 -A6003F17FCA26D15FFA26C17F8A36C17F0A26C6D4913E0A26C6D4913C06C17806E5B6C6D
6763 -4913006D6C495AD91FFCEB3FF8903A0FFF81FFF06D90B55A01011580D9003F01FCC7FC02
6764 -0313C0384F7BCD43>48 D<157815FC14031407141F14FF130F0007B5FCB6FCA2147F13F0
6765 -EAF800C7FCB3B3B3A6007FB712FEA52F4E76CD43>I<EC3FFE0103B512E0010F14FC013F
6766 -14FF90B712C048D9C07F7F2703FE000F13F8D807F801037FD80FE06D7F48486D7F484880
6767 -01F01680486C6E13C07F486C6E13E07FA27013F0A56C5AA26C5AEA0FF0EA03C0C914E05E
6768 -A218C05E1880A24C13005F4C5A4B5B5F4B5B5F4B5B4B90C7FC4B5A5E4B5AED7FE04B5A4A
6769 -5B4A48C8FC4A5A5D4A48EB01F04A5AEC3F804AC7FC02FEEC03E0495A495A495A495AD91F
6770 -80140749C8FC013E150F017FB7FC90B812C05A5A5A5A5A5A5AB9FC1880A4344E79CD43>
6771 -I<91380FFFC091B512FC0107ECFF80011F15E090263FF8077F9026FF800113FC4848C76C
6772 -7ED803F86E7E491680D807FC8048B416C080486D15E0A4805CA36C17C06C5B6C90C75AD8
6773 -01FC1680C9FC4C13005FA24C5A4B5B4B5B4B13C04B5BDBFFFEC7FC91B512F816E016FCEE
6774 -FF80DA000713E0030113F89238007FFE707E7013807013C018E07013F0A218F8A27013FC
6775 -A218FEA2EA03E0EA0FF8487E487E487EB57EA318FCA25E18F891C7FC6C17F0495C6C4816
6776 -E001F04A13C06C484A1380D80FF84A13006CB44A5A6CD9F0075BC690B612F06D5D011F15
6777 -80010302FCC7FCD9001F1380374F7ACD43>I<177C17FEA2160116031607160FA2161F16
6778 -3F167FA216FF5D5DA25D5DED1FBFED3F3F153E157C15FCEC01F815F0EC03E01407EC0FC0
6779 -1580EC1F005C147E147C5C1301495A495A5C495A131F49C7FC133E5B13FC485A5B485A12
6780 -07485A485A90C8FC123E127E5ABA12C0A5C96C48C7FCAF020FB712C0A53A4F7CCE43>I<
6781 -D80380150ED807E0157E01FEEC03FED9FFF0137F91B65A5F5F5F5F5F94C7FC5E5E16F016
6782 -C093C8FC15F801E190C9FC01E0CAFCABEC0FFF027F13F001E3B512FE01E76E7E9026FFF8
6783 -077FDAC0017F49C713F8496E7E49143F4981496E7E6C481680C9FC18C08218E0A418F0A3
6784 -EA0FE0487E487E487E487EA418E0A35B6C484A13C05B491680003EC85A003F17006C6C4A
6785 -5A6D5D6C6C4A5AD807F8495BD803FE01075B2701FFC03F5B6C90B65A013F4AC7FC6D14F8
6786 -010314C09026007FF8C8FC344F79CD43>I<ED0FFF92B512E0020780021F14FC91397FFE
6787 -03FE903A01FFF0007F4901C0EB3F804990C7121F4948EC7FC0494814FF49484913E04948
6788 -5B01FF5C485BA2485B5AA2486F13C04A6D1380486F1300177E94C7FC5AA291CAFC5AA215
6789 -08913801FFF8020713FFB54814C04A14F04AC66C7E023C6D7E4A6D7E4A6D7E7013804A15
6790 -C0A24A15E07013F05C18F8A491C714FCA37EA67EA46C17F880A27E18F06C5D18E06C6D15
6791 -C07E6E4913806C6D15006D6C495A6D6CEB7FFC6DB448485A6D90B55A010315C0010092C7
6792 -FC023F13FC020713C0364F7ACD43>I<121F7F7FEBFF8091B81280A45A1900606060A260
6793 -6060485F0180C86CC7FC007EC95A4C5A007C4B5A5F4C5A160F4C5A484B5A4C5A94C8FC16
6794 -FEC812014B5A5E4B5A150F4B5AA24B5AA24B5A15FFA24A90C9FCA25C5D1407A2140FA25D
6795 -141FA2143FA4147F5DA314FFA55BAC6D5BA2EC3FC06E5A395279D043>I<913807FFC002
6796 -7F13FC0103B67E010F15E090261FFC0113F8903A3FE0003FFCD97F80EB0FFE49C76C7E48
6797 -488048486E1380000717C04980120F18E0177FA2121F7FA27F7F6E14FF02E015C014F802
6798 -FE4913806C7FDBC00313009238F007FE6C02F85B9238FE1FF86C9138FFBFF06CEDFFE017
6799 -806C4BC7FC6D806D81010F15E06D81010115FC010781011F81491680EBFFE748018115C0
6800 -48D9007F14E04848011F14F048487F48481303030014F8484880161F4848020713FC1601
6801 -824848157F173FA2171FA2170FA218F8A27F007F17F06D151FA26C6CED3FE0001F17C06D
6802 -157F6C6CEDFF806C6C6C010313006C01E0EB0FFE6C01FCEBFFFC6C6CB612F06D5D010F15
6803 -80010102FCC7FCD9000F13C0364F7ACD43>I<91B5FC010F14F8017F14FF90B712C00003
6804 -D9C00F7F2707FC00017FD80FE06D7F48486E7E48C87FD87FE06E7E7F7F486C1680A66C5A
6805 -18006C485C6C5AC9485A5F4B5B4B5B4B5B4B5B4B90C7FC16FC4B5A4B5A16C04B5A93C8FC
6806 -4A5A5D14035D5D14075DA25D140FA25DAB91CAFCAAEC1FC04A7EECFFF8497FA2497FA76D
6807 -5BA26D5BEC3FE06E5A315479D340>63 D<BA7E19FCF1FF801AF01AFCD8000701F0C7000F
6808 -13FF060014C0071F7F070713F807017F737F747E747F747F86747F747F8886888688A275
6809 -7EA31D8087A21DC0A51DE0A387A963A31DC0A51D80A2631D00A3515AA2646264505B6264
6810 -505B505B5090C7FCF2FFFE4F5B07075B071F5B96B512C0060F91C8FCBB5A1AF01AC007FC
6811 -C9FC19805B527CD167>68 D<BC1280A5D8000701F8C7000114C0F0001F19071901851A7F
6812 -1A3F1A1FA2F20FE0A21A07A31A03A318F81BF01A01A497C7FC1701A317031707170F177F
6813 -92B6FCA59238F8007F170F170717031701A317001B3EA31B7CA395C8FCA21BFCA21BF8A2
6814 -1A01A31A031BF01A071A0FA21A1F1A3FF27FE0F101FF1907191F0603B5FCBCFCA21BC0A3
6815 -4F517CD058>I<BB12FEA5D8000701F8C700077FF0007F191F190785858586861B80A21A
6816 -1FA31A0FA41BC006F81307A497C7FCA31701A317031707170F177F92B6FCA59238F8007F
6817 -170F170717031701A31700A795C9FCB3B812F8A54A517CD055>I<B8D8C003B8FCA5D800
6818 -0701F8C9001FEBE000B3AE92BAFCA503F8C9121FB3B1B8D8C003B8FCA560527CD169>72
6819 -D<B812C0A5D8000701F8C7FCB3B3B3B2B812C0A52A527CD132>I<027FB71280A591C76C
6820 -90C7FCB3B3B3EA07F0EA1FFC487E487EA2B57EA44C5AA34A485B7E49495BD83FF8495BD8
6821 -1FE05DD80FFC011F5B2707FF807F90C8FC000190B512FC6C6C14F0011F14C0010101F8C9
6822 -FC39537DD145>I<B812F8A5D8000701F8CAFCB3B3A91A7CA41AFC1AF8A51901A31903A2
6823 -19071AF0190FA2191F193F197F19FF180360183F4DB5FCBB12E0A546527CD151>76
6824 -D<B600FC073FB512FE6F61A26F96B6FCA2D80007F5C00070EF01EFA202EF6DEF03CFA202
6825 -E76DEF078FA202E36DEF0F0FA202E16D171EA302E06D173CA26F6C1778A26F6C17F0A26F
6826 -6DED01E0A26F6DED03C0A36F6DED0780A26F6DED0F00A26F6D151EA26F6D5DA3706C5DA2
6827 -706C5DA2706D495AA2706D495AA2706D495AA3706D49C7FCA2706D131EA2706D5BA2716C
6828 -5BA3716C5BA271EB81E0A271EBC3C0A271EBE780A27101FFC8FCA3715BA2715BA2725AA2
6829 -725AA2D93FFC6F5AB74DB712FEA2725AA2725A77527CD180>I<BAFC19F819FF1AE086D8
6830 -000701F0C7001F13FC060113FF726C13807313C0070F13E01BF0857313F81BFCA27313FE
6831 -A41BFFA81BFEA31BFC61A21BF84F13F04F13E0614F13C04F13004E485A061F5B92B812F0
6832 -1AC04FC7FC19E003F8CBFCB3AEB812C0A550527CD15C>80 D<B912F0F0FF8019F819FF1A
6833 -C0D8000701F0C714F0060F7F060113FE727F737F737F85737F87A2737FA387A863A26163
6834 -63A24F5B4F5B4F90C8FC4F5A06035B060F13F095B512C092B8C9FC19F819E019F89226F0
6835 -000313FE9439007FFF80727F727F727F727F727F8684A28684A787A71D1C75133EA38575
6836 -137E73157C7513FC731401B86C6D9038F803F807039038FE07F07390B512E0736C14C008
6837 -0F1400CEEA7FFC5F537CD164>82 D<91260FFF80130791B500F85B010702FF5B011FEDC0
6838 -3F49EDF07F9026FFFC006D5A4801E0EB0FFD4801800101B5FC4848C87E48488149150F00
6839 -1F824981123F4981007F82A28412FF84A27FA26D82A27F7F6D93C7FC14C06C13F014FF15
6840 -F86CECFF8016FC6CEDFFC017F06C16FC6C16FF6C17C06C836C836D826D82010F82130301
6841 -0082021F16801400030F15C0ED007F040714E01600173F050F13F08383A200788200F882
6842 -A3187FA27EA219E07EA26CEFFFC0A27F6D4B13806D17006D5D01FC4B5A01FF4B5A02C04A
6843 -5A02F8EC7FF0903B1FFFC003FFE0486C90B65AD8FC0393C7FC48C66C14FC48010F14F048
6844 -D9007F90C8FC3C5479D24B>I<003FBC1280A59126C0003F9038C0007F49C71607D87FF8
6845 -060113C001E08449197F49193F90C8171FA2007E1A0FA3007C1A07A500FC1BE0481A03A6
6846 -C994C7FCB3B3AC91B912F0A553517BD05E>I<B800C00103B612FCA5D8000701F8CAEBF0
6847 -00F31F80B3B3B11B3FA26D97C7FC81637F1B7E6D6D17FE505A6E7E505A6E6D15076E4D5A
6848 -6E6D4B5A6E6D4B5A6E01F84B5A6E6DDA03FFC8FC6E6CB46CEB0FFE6F9039F001FFF8030F
6849 -90B65A030316C0DB007F92C9FC040F14F8DC007F13805E537CD167>I<B700FC017FB600
6850 -FE91B612F0A5D8003F01C0C8001F01E0C9EBF8006F71EE0FC06D7161876F1C1F6D7196C7
6851 -FC6F8373606D1E3E6F836D7160876F1CFC6D666F4B801F016D66704A806E525A88704A17
6852 -076E059F5F70021F80080F160F6E6570023F806EDC3E074CC8FC8870027E5F6EDC7C0316
6853 -3E7002FC804F6C167E6E1C7C700101814F6C16FC6E745B70010317016E4C6D5D060716C0
6854 -0580496D14036F63DDC00F16E04F6D14076F07F05BDDE01F170F6F92C76C5D1DF8DDF03E
6855 -6E141F6F98C9FCDDF87E16FC067C6E5C6FF1FE3EDDFCFC177E6F4A6E147C1DFFDDFFF06E
6856 -14FC6F62A24E816F62A270496F5BA24E817061A295C97E7061A270487090CAFCA3704870
6857 -5AA24D1601040360A27048705A84537DD18B>87 D<EC7FFF0107B512F0013F14FE90B77E
6858 -48D9E00F7F2703FE000113F0486C6D7F6EEB3FFC48826E131F83707FA36C496D7FA26C90
6859 -C7FC6C5AC9FCA6037FB5FC020FB6FC91B7FC01071487013FEBF0074913803901FFFC0048
6860 -13F0485B485B485B4890C7FC5A5BA2485AA45EA26D5C007F151D163D6C6C02797F6C6D01
6861 -F113F86C9026C003E1EBFFE06C9026F81FC014F06C90B5487EC6ED001F011F01FC010713
6862 -E0010101E090C8FC3C387CB641>97 D<EB3FF0B5FCA51203C6FCB3A4923801FFE0030F13
6863 -FE033FEBFFC092B612F002F301017F913AF7F8003FFEDAFFE0EB0FFF03806D7F92C76C7F
6864 -4A6E7F4A824A6E7FA2727EA285A28584A31A80AC1A00A44E5AA36118FF616E4A5BA26E4A
6865 -5B6E4A5B6F495BDACFC04990C7FCDA87F0EB7FFC913A03FE03FFF849C6B612E0496D1480
6866 -49011F01FCC8FC90C7000313C041547BD24B>I<913801FFF8021FEBFF8091B612F00103
6867 -15FC010F9038C00FFE903A1FFE0001FFD97FFC491380D9FFF05B4817C048495B5C5A485B
6868 -A2486F138091C7FC486F1300705A4892C8FC5BA312FFAD127F7FA27EA2EF03E06C7F1707
6869 -6C6D15C07E6E140F6CEE1F806C6DEC3F006C6D147ED97FFE5C6D6CEB03F8010F9038E01F
6870 -F0010390B55A01001580023F49C7FC020113E033387CB63C>I<4DB47E0407B5FCA5EE00
6871 -1F1707B3A4913801FFE0021F13FC91B6FC010315C7010F9038E03FE74990380007F7D97F
6872 -FC0101B5FC49487F4849143F484980485B83485B5A91C8FC5AA3485AA412FFAC127FA36C
6873 -7EA37EA26C7F5F6C6D5C7E6C6D5C6C6D49B5FC6D6C4914E0D93FFED90FEFEBFF80903A0F
6874 -FFC07FCF6D90B5128F0101ECFE0FD9003F13F8020301C049C7FC41547CD24B>I<913803
6875 -FFC0023F13FC49B6FC010715C04901817F903A3FFC007FF849486D7E49486D7E4849130F
6876 -48496D7E48178048497F18C0488191C7FC4817E0A248815B18F0A212FFA490B8FCA318E0
6877 -49CAFCA6127FA27F7EA218E06CEE01F06E14037E6C6DEC07E0A26C6DEC0FC06C6D141F6C
6878 -6DEC3F806D6CECFF00D91FFEEB03FE903A0FFFC03FF8010390B55A010015C0021F49C7FC
6879 -020113F034387CB63D>I<ED3FFC0203B5FC020F14C0023F14E09139FFF81FF0499038C0
6880 -3FF849EB807F49903800FFFC495A495AA2495AA2EE7FF8495AEE3FF0EE0FC093C7FCAEB7
6881 -12E0A526007FF8C8FCB3B3A7007FB512FEA52E547CD329>I<DA3FFF14FF0103B5D8F007
6882 -13C0010FDAFC1F13E0013FECFF7F90267FFC0F9038FF9FF09026FFE001EBF83F48496C13
6883 -E0484990387FF01F4890C7D83FF813E0489338FC0FC0F0078048486E6CC7FCA2003F82A9
6884 -001F5EA26C6C4A5AA26C5E6C6D495A6C6D495A6C6D485BDAFC0F5B4890B6C8FCD803EF14
6885 -FC01C314F02607C03F90C9FC91CBFCA2120FA37FA213F813FE90B7FC6C16F817FF18C06C
6886 -836C836C836D828448B9FC12074848C700031480D81FF8EC003F4848150748486F13C083
6887 -485A83A56D5D007F18806D5D003F18006C6C4B5AD80FFEED1FFC6C6C6CEC7FF86C01E049
6888 -485A6C01FE011F5B6C6CB71280010F03FCC7FC010115E0D9000F01FCC8FC3C4F7CB543>
6889 -I<EB3FF0B5FCA51203C6FCB3A4EE1FFC93B512C0030314F0030F8092391FE07FFC92393F
6890 -001FFE037C8003F07FDAF1E081ECF3C0DAF7807F8502FFC7FC5CA25CA45CB3ACB6D8F807
6891 -B612C0A542537BD24B>I<137F497E000313E0487FA2487FA76C5BA26C5BC613806DC7FC
6892 -90C8FCADEB3FF0B5FCA512017EB3B3A6B612E0A51B547BD325>I<EB3FF0B5FCA51203C6
6893 -FCB3A54CB512F8A59339003FFE00EF1FF0EF3FC04D5A4DC7FCEE03FEEE07F84C5A4C5AEE
6894 -7FC04CC8FC4B5A4B5AED0FF8ED1FE04B7E4B7EECF1FF02F37F02F77F91B6FC83159F030F
6895 -7F02FE80DAF8077F4A7E6F7F6F7F83707E82707F84707F707F82707F84707F177F717E4D
6896 -13C0B6D8F003B6FCA540537CD247>107 D<EB3FF0B5FCA512017EB3B3B3B1B612F0A51C
6897 -537BD225>I<D93FF0D91FFCEDFFE0B591B500C0010713FE030302F0011F6D7E030F6E01
6898 -7F8092271FE07FFCD9FF037F922A3F001FFE01F8007F0003027C9126FF03E080C602F06D
6899 -D90780137FDAF1E0038FC77FDAF3C0159EDAF7806D01BC143F07FC8102FFC75C4A5EA24A
6900 -5EA44A5EB3ACB6D8F807B6D8C03FB512FEA567367BB570>I<D93FF0EB1FFCB591B512C0
6901 -030314F0030F8092391FE07FFC92393F001FFE0003027C80C602F07FDAF1E081ECF3C0DA
6902 -F7807F8502FFC7FC5CA25CA45CB3ACB6D8F807B612C0A542367BB54B>I<913801FFE002
6903 -1F13FE91B612C0010315F0010F9038807FFC903A1FFC000FFED97FF86D6C7E49486D7F48
6904 -496D7F48496D7F4A147F48834890C86C7EA24883A248486F7EA3007F1880A400FF18C0AC
6905 -007F1880A3003F18006D5DA26C5FA26C5F6E147F6C5F6C6D4A5A6C6D495B6C6D495B6D6C
6906 -495BD93FFE011F90C7FC903A0FFF807FFC6D90B55A010015C0023F91C8FC020113E03A38
6907 -7CB643>I<903A3FF001FFE0B5010F13FE033FEBFFC092B612F002F301017F913AF7F800
6908 -7FFE0003D9FFE0EB1FFFC602806D7F92C76C7F4A824A6E7F4A6E7FA2717FA285187F85A4
6909 -721380AC1A0060A36118FFA2615F616E4A5BA26E4A5B6E4A5B6F495B6F4990C7FC03F0EB
6910 -FFFC9126FBFE075B02F8B612E06F1480031F01FCC8FC030313C092CBFCB1B612F8A5414D
6911 -7BB54B>I<90397FE003FEB590380FFF80033F13E04B13F09238FE1FF89139E1F83FFC00
6912 -03D9E3E013FEC6ECC07FECE78014EF150014EE02FEEB3FFC5CEE1FF8EE0FF04A90C7FCA5
6913 -5CB3AAB612FCA52F367CB537>114 D<903903FFF00F013FEBFE1F90B7FC120348EB003F
6914 -D80FF81307D81FE0130148487F4980127F90C87EA24881A27FA27F01F091C7FC13FCEBFF
6915 -C06C13FF15F86C14FF16C06C15F06C816C816C81C681013F1580010F15C01300020714E0
6916 -EC003F030713F015010078EC007F00F8153F161F7E160FA27E17E07E6D141F17C07F6DEC
6917 -3F8001F8EC7F0001FEEB01FE9039FFC00FFC6DB55AD8FC1F14E0D8F807148048C601F8C7
6918 -FC2C387CB635>I<143EA6147EA414FEA21301A313031307A2130F131F133F13FF5A000F
6919 -90B6FCB8FCA426003FFEC8FCB3A9EE07C0AB011FEC0F8080A26DEC1F0015806DEBC03E6D
6920 -EBF0FC6DEBFFF86D6C5B021F5B020313802A4D7ECB34>I<D93FF8913801FFC0B50207B5
6921 -FCA50003ED001FC61607B3AE5FA35FA2017F5D173B177B6D6C14F3DC01E313F06D6CD907
6922 -C3EBFFC0903A0FFFC03F836D90B51203010114FE6D6C13F8020701E091C7FC42377BB54B
6923 ->I<B600F00107B5FCA5000101F8C8EA7FE06C6DED3F00A2017F163E6E157E013F167C6E
6924 -15FC6D5E6F13016D5E8117036D5E6F13076D5E6F130F6D5E6F131F6D93C7FC815F6E6C13
6925 -3E177E023F147C6F13FC6E5C16816E5C16C3A26EEBE3E016E76E5C16FF6E5CA26E91C8FC
6926 -A26F5AA36F5AA26F5AA26F5AA26F5A6F5A40367DB447>I<B6D8E07FB5D8C003B512C0A5
6927 -000101F0C701F0C7381FF8006E027FED07E06C715DA26E023F150F017F705DA26E181F01
6928 -3F4B6C92C7FC6E606D70143E94B5FC6F177E6D4A6E137C03C001F315FC6D715B160303E0
6929 -01E114016D020702E05B03F013C06D71485A160F03F8D9807F13076D05F85B93381F003F
6930 -03FC160F027F4902FC5BDBFE3E011F131F023F04FE90C8FC167EDBFF7C010F5B6E01FCEC
6931 -FF3E4C6D137E6E5FA24C7F6E5F4C7F6E5FA24C7F6E5F4C147FA26E5F93C8123F6F5EA203
6932 -3E6FC9FC5A367DB461>I<B600F00107B5FCA5C601F8C8EA7FE06EED3F00A26D6C153E18
6933 -7E013F167C6E15FC6D5E6F13016D5E6F13036D5E8117076D6D5C170F6D6D5C171F6D93C7
6934 -FC6F5B027F143E6F137E023F147C6F13FCA26E6D5A16816EEBC1F016C36E5C16E76E5C16
6935 -FF6E5CA26E91C8FCA36F5AA26F5AA26F5AA26F5AA26F5AA35E150F5E151F93C9FC5DD81F
6936 -C0133E486C137E486C137C486C13FC5D14015D14034A5A6C48485A49485A263FC07FCAFC
6937 -EB81FE6CB45A6C13F000035BC690CBFC404D7DB447>121 D E
6938 -%EndDVIPSBitmapFont
6939 -%DVIPSBitmapFont: Fl cmr10 10.95 51
6940 -/Fl 51 122 df<EC03FE91383FFF809138FE03E0903903F800F0D90FE013384948137C90
6941 -393F8001FE90387F00035B5BA2485A6F5AED007093C7FCAA16FEB7FCA33901FC00031501
6942 -1500B3AC486C497EB5D8F87F13FCA32E407EBF33>12 D<1430147014E0EB01C0EB038013
6943 -07EB0F00131E133E133C5B13F85B12015B1203A2485AA2120F5BA2121F90C7FCA25AA312
6944 -3E127EA6127C12FCB2127C127EA6123E123FA37EA27F120FA27F1207A26C7EA212017F12
6945 -007F13787F133E131E7FEB07801303EB01C0EB00E014701430145A77C323>40
6946 -D<12C07E12707E7E121E7E6C7E7F12036C7E7F12007F1378137CA27FA2133F7FA2148013
6947 -0FA214C0A3130714E0A6130314F0B214E01307A614C0130FA31480A2131F1400A25B133E
6948 -A25BA2137813F85B12015B485A12075B48C7FC121E121C5A5A5A5A145A7BC323>I<B512
6949 -FEA617067F961E>45 D<121EEA7F80A2EAFFC0A4EA7F80A2EA1E000A0A798919>I<EB01
6950 -FE90380FFFC090383F03F090387C00F849137C48487F48487F4848EB0F80A2000F15C048
6951 -48EB07E0A3003F15F0A290C712034815F8A64815FCB3A26C15F8A56C6CEB07F0A3001F15
6952 -E0A36C6CEB0FC0A26C6CEB1F80000315006C6C133E6C6C5B017C5B90383F03F090380FFF
6953 -C0D901FEC7FC263F7DBC2D>48 D<EB01C013031307131F137FEA07FFB5FC139FEAF81F12
6954 -00B3B3ACEB7FF0B612F8A31D3D78BC2D>I<EB07FC90383FFF8090B512E03903F01FF839
6955 -07C007FC390F0001FE001E6D7E001C1580003CEC7FC05AED3FE01270B4FC6DEB1FF07FA5
6956 -6C5A6CC7FC120CC813E0153FA216C0157F168015FF16004A5A5D4A5A4A5A5D4A5A4A5A4A
6957 -C7FC147E147C5C495A495A495A495A49C71270133E133C5B4914E0485A485A485A48C712
6958 -0148B6FCA25A4815C0B7FCA3243D7CBC2D>I<EB07FC90383FFF809038F80FE03901E003
6959 -F839078001FCD80F007F000E6D7E001E1580D81F80137F486C14C07FA27F5BA2121F6C5A
6960 -C8138015FF1600A24A5AA24A5A5DEC07E04A5A023FC7FCEB1FFCECFF809038000FE0EC07
6961 -F86E7E6E7E6E7E1680ED7FC0A216E0153FA216F0A2120C123F487E487EA316E0A249137F
6962 -6CC713C01278EDFF807E6C4913006C495A3907C007FC3903F80FF0C6B55A013F1380D907
6963 -F8C7FC243F7CBC2D>I<150E151E153EA2157EA215FE1401A21403EC077E1406140E141C
6964 -A214381470A214E0EB01C0A2EB0380EB0700A2130E5BA25B5BA25B5B1201485A90C7FC5A
6965 -120E120C121C5AA25A5AB8FCA3C8EAFE00AC4A7E49B6FCA3283E7EBD2D>I<00061403D8
6966 -0780131F01F813FE90B5FC5D5D5D15C092C7FC14FCEB3FE090C9FCACEB01FE90380FFF80
6967 -90383E03E090387001F8496C7E49137E497F90C713800006141FC813C0A216E0150FA316
6968 -F0A3120C127F7F12FFA416E090C7121F12FC007015C012780038EC3F80123C6CEC7F0000
6969 -1F14FE6C6C485A6C6C485A3903F80FE0C6B55A013F90C7FCEB07F8243F7CBC2D>I<EC1F
6970 -E0ECFFF8903803F03E90380FC00F90391F000780133E017EEB1FC049133F4848137F1203
6971 -5B12074848EB3F80ED1F00001F91C7FC5BA2123FA3485AA214FE903887FF8039FF8F07E0
6972 -90389C01F09038B800FC01B0137E13F0497F16804914C0A2ED1FE0A34914F0A5127FA612
6973 -3F6D14E0A2121FED3FC0A26C6C1480A20007EC7F006C6C137E6C6C5B6C6C485A90387E07
6974 -F06DB45A010F1380D903FCC7FC243F7CBC2D>I<1238123C123F90B612FCA316F85A16F0
6975 -16E00078C712010070EC03C0ED078016005D48141E151C153C5DC8127015F04A5A5D1403
6976 -4A5A92C7FC5C141EA25CA2147C147814F8A213015C1303A31307A3130F5CA2131FA6133F
6977 -AA6D5A0107C8FC26407BBD2D>I<EB03FC90381FFF8090387C07E09038F001F83901E000
6978 -7C48487F48487F48C7FCED0F80121E16C0003E1407A4123FA26DEB0F807F6C6C131F6D14
6979 -0001FC133E6C6C5B9038FF80786C6D5A6CEBF3E06CEBFF806C91C7FC133F6D13C06D7F01
6980 -3F13F801787F48486C7E3903E01FFF48486C1380260F800313C048487E489038007FE000
6981 -3E143F007E141F007CEC0FF01507481403A31501A46C15E0007C1403A2007E15C06C1407
6982 -6CEC0F806DEB1F006C6C133ED807F05B3901FC03F86CB512E0011F1380D903FCC7FC243F
6983 -7CBC2D>I<EB03FCEB1FFF90387E07C09038FC03F048486C7E48486C7E4848137C000F14
6984 -7E4848137F81003F15805B007F15C0A2151F12FF16E0A516F0A5127F153FA36C7EA2001F
6985 -147F120F6C6C13FF6D13DF000313013900F8039F90387E0F1FD91FFE13E0EB07F090C7FC
6986 -A2ED3FC0A41680157FD80F801400487E486C13FEA24A5A5D49485AEB8007391E000FE000
6987 -1F495A260FC07FC7FC3803FFFE6C13F838003FC0243F7CBC2D>I<121EEA7F80A2EAFFC0
6988 -A4EA7F80A2EA1E00C7FCB3121EEA7F80A2EAFFC0A4EA7F80A2EA1E000A2779A619>I<DB
6989 -3FF01306912603FFFE130E020F9038FF801E913A3FF007E03E9139FF8000F8D903FEC7EA
6990 -7C7ED907F8EC1EFE4948140FD93FE0140749481403495A91C81201484815001203484816
6991 -7E5B000F173EA24848161EA2123F5B180E127FA349160012FFAC127F7F180EA2123FA27F
6992 -001F171E181C6C7EA20007173C6D16386C6C1678000117706C6C16F06EEC01E06D6C15C0
6993 -6D6C1403D90FF0EC07806D6CEC1F00D903FE143E902600FF8013F891393FF007F0020FB5
6994 -12C0020391C7FC9138003FF037427BBF42>67 D<B712FCEEFF8017E000019039C0001FF8
6995 -6C6C48EB03FEEE00FF717E717EEF0FE084717E717E170184717EA21980187F19C0A3F03F
6996 -E0A519F0AB19E0A5F07FC0A21980A218FF19004D5AA24D5A6017074D5A4D5AEF7FC04DC7
6997 -FCEE03FE48486CEB1FF8B85A178004FCC8FC3C3E7DBD45>I<B912E0A300019038C00001
6998 -6C6C48EB001FEF0FF01703A217011700A31870A418381638A41800A21678A216F8150115
6999 -0791B5FCA3EC8007150115001678A21638A2180EA3181C93C7FCA4183C1838A21878A318
7000 -F8EF01F0A21707170F173F48486CEB03FFB912E0A3373E7DBD3E>I<B6D8C01FB512F8A3
7001 -000101E0C7383FFC0026007F80EC0FF0B3A691B7FCA30280C7120FB3A92601FFE0EC3FFC
7002 -B6D8C01FB512F8A33D3E7DBD44>72 D<B612F0A3C6EBF000EB3FC0B3B3B2EBFFF0B612F0
7003 -A31C3E7EBD21>I<011FB512FCA3D9000713006E5A1401B3B3A6123FEA7F80EAFFC0A44A
7004 -5A1380D87F005B007C130700385C003C495A6C495A6C495A2603E07EC7FC3800FFF8EB3F
7005 -C026407CBD2F>I<B612F8A3000101E0C9FC38007F80B3B0EF0380A517071800A45FA35F
7006 -A25F5F5F4C5A160748486C133FB8FCA3313E7DBD39>76 D<B500C093B512C0A300016D4B
7007 -EBE000D8007F1880D977F0ED03BFA3D973F8ED073FA3D971FC150EA2D970FE151CA3027F
7008 -1538A36E6C1470A36E6C14E0A26E6CEB01C0A36E6CEB0380A36E6CEB0700A26E6C130EA3
7009 -6E6C5BA3037F5BA26F6C5AA36F6C5AA392380FE1C0A3923807F380A26FB4C7FCA36F5AA2
7010 -13F8486C6D5AD807FFEFFFE0B500F80178017FEBFFC0A34A3E7CBD53>I<B56C91B512F8
7011 -8080D8007F030713006EEC01FC6E6E5A1870EB77FCEB73FEA2EB71FF01707FA26E7E6E7E
7012 -A26E7E6E7EA26E7E6E7EA26E7E6E7FA26F7E6F7EA26F7E6F7EA26F7E6F7EA26F7E6F1380
7013 -A2EE7FC0EE3FE0A2EE1FF0EE0FF8A2EE07FCEE03FEA2EE01FF7013F0A2177F173FA2171F
7014 -170FA2170701F81503487ED807FF1501B500F81400A218703D3E7DBD44>I<B712F8EEFF
7015 -8017E000019039C0003FF86C6C48EB07FCEE01FE707EEF7F80EF3FC018E0A2EF1FF0A218
7016 -F8A818F0A2EF3FE0A218C0EF7F80EFFF004C5AEE07FCEE3FF091B612C04CC7FC0280C9FC
7017 -B3A73801FFE0B612C0A3353E7DBD3E>80 D<D907FC131890391FFF8038017FEBE0783901
7018 -FC03F83A03F0007CF8D807C0133F4848130F001F140748C7FC003E1403007E1401A2007C
7019 -140012FC1678A46C1538A27EA26C6C14007F7FEA3FF8EBFF806C13F86CEBFF806C14F06C
7020 -14FC6C14FF6C15C0013F14E0010714F0EB007F020713F89138007FFC150FED07FE150315
7021 -01ED00FFA200E0157FA3163FA27EA3163E7E167E6C157C6C15FC6C15F86D13016DEB03F0
7022 -6DEB07E0D8F9FCEB0FC03AF07F803F8090391FFFFE00D8E00713F839C0007FC028427BBF
7023 -33>83 D<003FB91280A3903AF0007FE001018090393FC0003F48C7ED1FC0007E1707127C
7024 -00781703A300701701A548EF00E0A5C81600B3B14B7E4B7E0107B612FEA33B3D7DBC42>
7025 -I<B66C0103B51280A3000101F0C8EBF8006C6C48ED3FC0725A013F041EC7FC6D7E606D6C
7026 -15386D6C1578606D6C5D6E14016D5E6D6D1303606E6C49C8FC6E6C5B170E6E6C131E171C
7027 -6E6C5B6E6C137817706E6C13F06F5B6E13016EEB83C05FED7FC7DB3FE7C9FC16EFED1FFE
7028 -5E150F6F5AB3A4ED1FFC020FB512FCA3413E7FBD44>89 D<EB0FF8EBFFFE3903F01F8039
7029 -078007E0000F6D7E9038E001F8D81FF07F6E7EA3157F6C5AEA0380C8FCA4EC1FFF0103B5
7030 -FC90381FF87FEB7F803801FC00EA07F8EA0FE0485A485AA248C7FCEE038012FEA315FFA3
7031 -007F5BEC03BF3B3F80071F8700261FC00E13CF3A07F03C0FFE3A01FFF807FC3A003FC001
7032 -F0292A7DA82D>97 D<EA01FC12FFA3120712031201B1EC03FC91381FFF8091387C07E090
7033 -39FDE001F09039FFC000FC4A137E91C77E49158049141F17C0EE0FE0A217F0A2160717F8
7034 -AA17F0A2160FA217E0161F17C06D1580EE3F006D5C6E13FE9039F3C001F89039F1E003F0
7035 -9039E0780FC09026C03FFFC7FCC7EA07F82D407EBE33>I<49B4FC010F13E090383F00F8
7036 -017C131E4848131F4848137F0007ECFF80485A5B121FA24848EB7F00151C007F91C7FCA2
7037 -90C9FC5AAB6C7EA3003FEC01C07F001F140316806C6C13076C6C14000003140E6C6C131E
7038 -6C6C137890383F01F090380FFFC0D901FEC7FC222A7DA828>I<ED01FC15FFA315071503
7039 -1501B114FF010713E190381F80F990387E003D49131FD803F81307485A49130348481301
7040 -121F123F5B127FA290C7FCA25AAA7E7FA2123FA26C7E000F14037F000714076C6C497E6C
7041 -6C497ED8007C017913F890383F01F190380FFFC1903A01FE01FC002D407DBE33>I<EB01
7042 -FE90380FFFC090383F03F09038FC01F848486C7E4848137E48487F000F158049131F001F
7043 -15C04848130FA2127F16E090C7FCA25AA290B6FCA290C9FCA67EA27F123F16E06C7E1501
7044 -000F15C06C6C13036DEB07806C6C1400C66C131E017E5B90381F80F8903807FFE0010090
7045 -C7FC232A7EA828>I<EC1FC0EC7FF8903801F83C903807E07E90380FC0FFEB1FC1EB3F81
7046 -1401137FEC00FE01FE137C1500AEB6FCA3C648C7FCB3AE487E007F13FFA320407EBF1C>
7047 -I<167C903903F801FF903A1FFF078F8090397E0FDE1F9038F803F83803F001A23B07E000
7048 -FC0600000F6EC7FC49137E001F147FA8000F147E6D13FE00075C6C6C485AA23901F803E0
7049 -3903FE0FC026071FFFC8FCEB03F80006CAFC120EA3120FA27F7F6CB512E015FE6C6E7E6C
7050 -15E06C810003813A0FC0001FFC48C7EA01FE003E140048157E825A82A46C5D007C153E00
7051 -7E157E6C5D6C6C495A6C6C495AD803F0EB0FC0D800FE017FC7FC90383FFFFC010313C029
7052 -3D7EA82D>I<EA01FC12FFA3120712031201B1EC01FE913807FFC091381E07E091387803
7053 -F09138E001F8D9FDC07F148001FF6D7E91C7FCA25BA25BB3A6486C497EB5D8F87F13FCA3
7054 -2E3F7DBE33>I<EA01E0EA07F8A2487EA46C5AA2EA01E0C8FCACEA01FC127FA312071203
7055 -1201B3AC487EB512F0A3143E7DBD1A>I<EA01FC12FFA3120712031201B3B3B1487EB512
7056 -F8A3153F7DBE1A>108 D<2701F801FE14FF00FF902707FFC00313E0913B1E07E00F03F0
7057 -913B7803F03C01F80007903BE001F87000FC2603F9C06D487F000101805C01FBD900FF14
7058 -7F91C75B13FF4992C7FCA2495CB3A6486C496CECFF80B5D8F87FD9FC3F13FEA347287DA7
7059 -4C>I<3901F801FE00FF903807FFC091381E07E091387803F000079038E001F82603F9C0
7060 -7F0001138001FB6D7E91C7FC13FF5BA25BB3A6486C497EB5D8F87F13FCA32E287DA733>
7061 -I<14FF010713E090381F81F890387E007E01F8131F4848EB0F804848EB07C04848EB03E0
7062 -000F15F04848EB01F8A2003F15FCA248C812FEA44815FFA96C15FEA36C6CEB01FCA3001F
7063 -15F86C6CEB03F0A26C6CEB07E06C6CEB0FC06C6CEB1F80D8007EEB7E0090383F81FC9038
7064 -0FFFF0010090C7FC282A7EA82D>I<3901FC03FC00FF90381FFF8091387C0FE09039FDE0
7065 -03F03A07FFC001FC6C496C7E6C90C7127F49EC3F805BEE1FC017E0A2EE0FF0A3EE07F8AA
7066 -EE0FF0A4EE1FE0A2EE3FC06D1580EE7F007F6E13FE9138C001F89039FDE007F09039FC78
7067 -0FC0DA3FFFC7FCEC07F891C9FCAD487EB512F8A32D3A7EA733>I<3901F807E000FFEB1F
7068 -F8EC787CECE1FE3807F9C100031381EA01FB1401EC00FC01FF1330491300A35BB3A5487E
7069 -B512FEA31F287EA724>114 D<90383FC0603901FFF8E03807C03F381F000F003E130700
7070 -3C1303127C0078130112F81400A27E7E7E6D1300EA7FF8EBFFC06C13F86C13FE6C7F6C14
7071 -80000114C0D8003F13E0010313F0EB001FEC0FF800E01303A214017E1400A27E15F07E14
7072 -016C14E06CEB03C0903880078039F3E01F0038E0FFFC38C01FE01D2A7DA824>I<131CA6
7073 -133CA4137CA213FCA2120112031207001FB512C0B6FCA2D801FCC7FCB3A215E0A9120090
7074 -38FE01C0A2EB7F03013F138090381F8700EB07FEEB01F81B397EB723>I<D801FC14FE00
7075 -FF147FA3000714030003140100011400B3A51501A31503120015076DEB06FF017E010E13
7076 -806D4913FC90381FC078903807FFE00100903880FE002E297DA733>I<B539E00FFFE0A3
7077 -2707FE000313006C48EB00FC5E00015D7F00005DA26D13016D5CA26D6C485AA2ECC00701
7078 -1F91C7FCA290380FE00EA2ECF01E0107131CA26D6C5AA2ECFC7801011370A2ECFEF00100
7079 -5BA2EC7FC0A36E5AA26EC8FCA3140E2B287EA630>I<B53BC3FFFE03FFF8A3290FFE003F
7080 -E00013C06C486D48EB3F806C4817006D010F141E00016F131C15076D163C00004A6C1338
7081 -A2017F5E4B7E151DD93F805DED3DFC1538D91FC04A5AED78FE9238707E03D90FE0017F5B
7082 -EDE03F02F0140701070387C7FC9138F1C01F02F9148F010315CE9138FB800F02FF14DE6D
7083 -15FCED00076D5DA24A1303027E5CA2027C1301023C5C023813003D287EA642>I<B539F0
7084 -1FFFE0A30003D9C00F1300C690388007F8D97F0013E002805BD93FC05B011F49C7FC9038
7085 -0FE00EECF01E6D6C5A01035B6D6C5A6E5AEB00FF6E5A6E5A81141F814A7E81147BECF1FC
7086 -903801E1FEECC0FF01037F49486C7ED90F007F011E6D7E013E130F496D7E01FC80486C80
7087 -000F4A7EB539803FFFF8A32D277FA630>I<B539E00FFFE0A32707FE000313006C48EB01
7088 -FC6F5A00015D7F00005DA2017F495AA2EC8003013F5CA26D6C48C7FCA26E5A010F130EA2
7089 -6D6C5AA2ECF83C01031338A26D6C5AA2ECFEF001005BA2EC7FC0A36E5AA36EC8FCA2140E
7090 -A2141E141C143C1438A2147800181370127EB45BA2495AA248485AD87E07C9FCEA780EEA
7091 -3C3CEA1FF8EA07E02B3A7EA630>I E
7092 -%EndDVIPSBitmapFont
7093 -%DVIPSBitmapFont: Fm cmbx12 20.736 9
7094 -/Fm 9 123 df<92380FFFE04AB67E020F15F0027F15FE49B87E4917E0010F17F8013F83
7095 -49D9C01F14FF9027FFFC0001814801E06D6C80480180021F804890C86C8048486F804848
7096 -6F8001FF6F804801C06E8002F081486D18806E816E18C0B5821BE06E81A37214F0A56C5B
7097 -A36C5B6C5B6C5B000313C0C690C9FC90CA15E060A34E14C0A21B80601B0060626295B55A
7098 -5F624D5C624D5C4D91C7FC614D5B4D13F04D5B6194B55A4C49C8FC4C5B4C5B4C13E04C5B
7099 -604C90C9FCEE7FFC4C5A4B5B4B5B4B0180EC0FF04B90C8FC4B5A4B5A4B48ED1FE0EDFFE0
7100 -4A5B4A5B4A90C9FC4A48163F4A5ADA3FF017C05D4A48167F4A5A4990CA12FFD903FC1607
7101 -49BAFC5B4919805B5B90BBFC5A5A5A5A481A005A5ABCFCA462A44C7176F061>50
7102 -D<92383FFFF80207B612E0027F15FC49B87E010717E0011F83499026F0007F13FC4948C7
7103 -000F7F90B502036D7E486E6D806F6D80727F486E6E7F8486727FA28684A26C5C72806C5C
7104 -6D90C8FC6D5AEB0FF8EB03E090CAFCA70507B6FC041FB7FC0303B8FC157F0203B9FC021F
7105 -ECFE0391B612800103ECF800010F14C04991C7FC017F13FC90B512F04814C0485C4891C8
7106 -FC485B5A485B5C5A5CA2B5FC5CA360A36E5DA26C5F6E5D187E6C6D846E4A48806C6D4A48
7107 -14FC6C6ED90FF0ECFFFC6C02E090263FE07F14FE00019139FC03FFC06C91B6487E013F4B
7108 -487E010F4B1307010303F01301D9003F0280D9003F13FC020101F8CBFC57507ACE5E>97
7109 -D<903801FFFCB6FCA8C67E131F7FB3ADF0FFFC050FEBFFE0057F14FE0403B77E040F16E0
7110 -043F16F84CD9007F13FE9226FDFFF001077F92B500C001018094C86C13E004FC6F7F4C6F
7111 -7F04E06F7F4C6F7F5E747F93C915804B7014C0A27414E0A21DF087A21DF8A31DFC87A41D
7112 -FEAF1DFCA4631DF8A31DF098B5FC1DE0A25014C0A26F1980501400705D705F704B5B505B
7113 -704B5B04FC4B5BDBE7FE92B55A9226C3FF8001035C038101E0011F49C7FC9226807FFC90
7114 -B55A4B6CB712F04A010F16C04A010393C8FC4A010015F84A023F14C090C9000301F0C9FC
7115 -5F797AF76C>I<97380FFFE00607B6FCA8F00003190086B3AD93383FFF800307B512F803
7116 -3F14FF4AB712C0020716F0021F16FC027F9039FE007FFE91B500F0EB0FFF010302800101
7117 -90B5FC4949C87E49498149498149498149498190B548814884484A8192CAFC5AA2485BA2
7118 -5A5C5AA35A5CA4B5FCAF7EA4807EA37EA2807EA26C7F616C6E5D6C606C80616D6D5D6D6D
7119 -5D6D6D92B67E6D6D4A15FC010301FF0207EDFFFE6D02C0EB3FFE6D6C9039FC01FFF86E90
7120 -B65A020F16C002031600DA007F14FC030F14E09226007FFEC749C7FC5F797AF76C>100
7121 -D<EB01FCEB07FF011F13C0497F497F90B57EA24880A24880A76C5CA26C5CA26D5B6D5B6D
7122 -5B010790C8FCEB01FC90CAFCB2903801FFFC007FB5FCA8C67E131F7FB3B3B3A5B81280A8
7123 -297979F835>105 D<903801FFFCB6FCA8C67E131F7FB3B3B3B3B3ABB812C0A82A7879F7
7124 -35>108 D<902601FFF891380FFFE0B692B512FE05036E7E050F15E0053F15F84D819327
7125 -01FFF01F7F4CD900077FDC07FC6D80C66CDA0FF06D80011FDA1FC07F6D4A48824CC8FC04
7126 -7E6F7F5EEDF9F85E03FB707F5E15FF5EA25EA293C9FCA45DB3B3A6B8D8E003B81280A861
7127 -4E79CD6C>110 D<902601FFFCEC7FFEB6020FB512F0057F14FE4CB712C0040716F0041F
7128 -82047F16FE93B5C66C7F92B500F0010F14C0C66C0380010380011F4AC76C806D4A6E8004
7129 -F06F7F4C6F7F4C6F7F4C8193C915804B7014C0861DE0A27414F0A27414F8A47513FCA575
7130 -13FEAF5113FCA598B512F8A31DF0621DE0621DC0621D806F5E701800704B5B505B704B5B
7131 -7092B55A04FC4A5C704A5C706C010F5C05E0013F49C7FC9227FE7FFC01B55A70B712F004
7132 -0F16C0040393C8FC040015F8053F14C0050301F0C9FC94CCFCB3A6B812E0A85F6F7ACD6C
7133 ->112 D<0007BA12FE1AFFA503E0C76C13FE4AC8B512FC4801F04A14F84A5C4A17F091C8
7134 -4814E04D14C0495D4918804D1400494B5B94B5FC61494A5C4C5C5E61001F4B5C494A5C5E
7135 -96C7FC4C5B93B55A5DC85D4B5C4B5C5D604B5C4B91C8FC5D5F92B55A4A5C5C4D14FF4A5C
7136 -4A5C5C5F4A91C75A4A4915FE91B5FC5E495C495C4917035E495C495C49170793C8FC4949
7137 -ED0FFC90B55A48181F5D484A153F484A157F4818FF4B1403484A140F4891C8123F480407
7138 -B5FC92B8FCBB12F8A57E484D7BCC56>122 D E
7139 -%EndDVIPSBitmapFont
7140 -end
7141 -%%EndProlog
7142 -%%BeginSetup
7143 -%%Feature: *Resolution 600dpi
7144 -TeXDict begin
7145 -%%PaperSize: A4
7146 -
7147 -%%EndSetup
7148 -%%Page: 1 1
7149 -1 0 bop 150 1318 a Fm(bzip2)64 b(and)g(libbzip2)p 150
7150 -1418 3600 34 v 2010 1515 a Fl(a)31 b(program)f(and)g(library)e(for)i
7151 -(data)h(compression)2198 1623 y(cop)m(yrigh)m(t)f(\(C\))h(1996-2002)j
7152 -(Julian)28 b(Sew)m(ard)2394 1731 y(v)m(ersion)i(1.0.2)i(of)f(30)g
7153 -(Decem)m(b)s(er)g(2001)150 5091 y Fk(Julian)46 b(Sew)l(ard)p
7154 -150 5141 3600 17 v eop
7155 -%%Page: 1 2
7156 -1 1 bop 3705 -116 a Fl(1)150 299 y(The)40 b(follo)m(wing)f(text)i(is)f
7157 -(the)h(License)f(for)g(this)f(soft)m(w)m(are.)73 b(Y)-8
7158 -b(ou)41 b(should)d(\014nd)h(it)h(iden)m(tical)f(to)i(that)150
7159 -408 y(con)m(tained)31 b(in)e(the)h(\014le)g(LICENSE)f(in)g(the)h
7160 -(source)h(distribution.)150 565 y Fj(||||||)f(ST)-8 b(AR)g(T)30
7161 -b(OF)h(THE)f(LICENSE)f(||||||)150 722 y(This)24 b(program,)i
7162 -Fi(bzip2)p Fj(,)f(and)f(asso)s(ciated)h(library)g Fi(libbzip2)p
7163 -Fj(,)e(are)i(Cop)m(yrigh)m(t)h(\(C\))f(1996-2002)j(Julian)150
7164 -832 y(R)i(Sew)m(ard.)41 b(All)30 b(righ)m(ts)h(reserv)m(ed.)150
7165 -989 y(Redistribution)46 b(and)f(use)g(in)g(source)h(and)f(binary)f
7166 -(forms,)50 b(with)45 b(or)h(without)g(mo)s(di\014cation,)j(are)150
7167 -1098 y(p)s(ermitted)31 b(pro)m(vided)f(that)h(the)g(follo)m(wing)g
7168 -(conditions)g(are)g(met:)225 1255 y Fh(\017)60 b Fj(Redistributions)44
7169 -b(of)g(source)g(co)s(de)f(m)m(ust)h(retain)g(the)g(ab)s(o)m(v)m(e)h
7170 -(cop)m(yrigh)m(t)g(notice,)k(this)43 b(list)i(of)330
7171 -1365 y(conditions)31 b(and)e(the)i(follo)m(wing)h(disclaimer.)225
7172 -1499 y Fh(\017)60 b Fj(The)32 b(origin)g(of)g(this)g(soft)m(w)m(are)h
7173 -(m)m(ust)f(not)g(b)s(e)f(misrepresen)m(ted;)j(y)m(ou)e(m)m(ust)g(not)g
7174 -(claim)g(that)h(y)m(ou)330 1609 y(wrote)d(the)f(original)h(soft)m(w)m
7175 -(are.)42 b(If)29 b(y)m(ou)g(use)g(this)g(soft)m(w)m(are)i(in)d(a)h(pro)
7176 -s(duct,)g(an)g(ac)m(kno)m(wledgmen)m(t)330 1718 y(in)h(the)h(pro)s
7177 -(duct)e(do)s(cumen)m(tation)j(w)m(ould)e(b)s(e)f(appreciated)j(but)d
7178 -(is)i(not)g(required.)225 1853 y Fh(\017)60 b Fj(Altered)36
7179 -b(source)g(v)m(ersions)g(m)m(ust)f(b)s(e)f(plainly)i(mark)m(ed)f(as)g
7180 -(suc)m(h,)i(and)d(m)m(ust)h(not)h(b)s(e)f(misrepre-)330
7181 -1962 y(sen)m(ted)c(as)f(b)s(eing)g(the)h(original)h(soft)m(w)m(are.)225
7182 -2097 y Fh(\017)60 b Fj(The)25 b(name)g(of)g(the)g(author)g(ma)m(y)h
7183 -(not)f(b)s(e)f(used)h(to)g(endorse)g(or)h(promote)g(pro)s(ducts)e
7184 -(deriv)m(ed)h(from)330 2206 y(this)30 b(soft)m(w)m(are)i(without)f(sp)s
7185 -(eci\014c)f(prior)g(written)h(p)s(ermission.)150 2388
7186 -y(THIS)36 b(SOFTW)-10 b(ARE)35 b(IS)h(PR)m(O)m(VIDED)g(BY)f(THE)h(A)m
7187 -(UTHOR)h(\\AS)f(IS")g(AND)f(ANY)h(EXPRESS)150 2498 y(OR)29
7188 -b(IMPLIED)g(W)-10 b(ARRANTIES,)28 b(INCLUDING,)h(BUT)g(NOT)g(LIMITED)g
7189 -(TO,)h(THE)e(IMPLIED)150 2607 y(W)-10 b(ARRANTIES)60
7190 -b(OF)h(MER)m(CHANT)-8 b(ABILITY)61 b(AND)g(FITNESS)f(F)m(OR)i(A)f(P)-8
7191 -b(AR)g(TICULAR)150 2717 y(PURPOSE)40 b(ARE)g(DISCLAIMED.)f(IN)i(NO)g
7192 -(EVENT)f(SHALL)f(THE)i(A)m(UTHOR)g(BE)f(LIABLE)150 2827
7193 -y(F)m(OR)d(ANY)f(DIRECT,)g(INDIRECT,)g(INCIDENT)-8 b(AL,)37
7194 -b(SPECIAL,)d(EXEMPLAR)-8 b(Y,)36 b(OR)h(CON-)150 2936
7195 -y(SEQUENTIAL)30 b(D)m(AMA)m(GES)h(\(INCLUDING,)h(BUT)e(NOT)i(LIMITED)f
7196 -(TO,)h(PR)m(OCUREMENT)150 3046 y(OF)55 b(SUBSTITUTE)e(GOODS)i(OR)f(SER)
7197 --10 b(VICES;)53 b(LOSS)g(OF)i(USE,)f(D)m(A)-8 b(T)g(A,)55
7198 -b(OR)g(PR)m(OFITS;)150 3155 y(OR)e(BUSINESS)d(INTERR)m(UPTION\))k(HO)m
7199 -(WEVER)e(CA)m(USED)f(AND)h(ON)h(ANY)f(THEOR)-8 b(Y)150
7200 -3265 y(OF)71 b(LIABILITY,)f(WHETHER)g(IN)h(CONTRA)m(CT,)g(STRICT)g
7201 -(LIABILITY,)e(OR)i(TOR)-8 b(T)150 3374 y(\(INCLUDING)45
7202 -b(NEGLIGENCE)g(OR)g(OTHER)-10 b(WISE\))45 b(ARISING)g(IN)g(ANY)g(W)-10
7203 -b(A)i(Y)44 b(OUT)i(OF)150 3484 y(THE)i(USE)f(OF)h(THIS)g(SOFTW)-10
7204 -b(ARE,)47 b(EVEN)g(IF)h(AD)m(VISED)e(OF)i(THE)g(POSSIBILITY)f(OF)150
7205 -3594 y(SUCH)30 b(D)m(AMA)m(GE.)150 3750 y(Julian)g(Sew)m(ard,)g(Cam)m
7206 -(bridge,)h(UK.)150 3907 y Fi(jseward@acm.org)150 4064
7207 -y(bzip2)p Fj(/)p Fi(libbzip2)c Fj(v)m(ersion)k(1.0.2)i(of)d(30)h(Decem)
7208 -m(b)s(er)g(2001.)150 4221 y(||||||)f(END)g(OF)g(THE)g(LICENSE)f(||||||)
7209 -150 4378 y(W)-8 b(eb)31 b(sites:)150 4535 y Fi
7210 -(http://sources.redhat.co)o(m/bz)o(ip2)150 4691 y
7211 -(http://www.cacheprof.org)150 4848 y Fj(P)-8 b(A)g(TENTS:)40
7212 -b(T)-8 b(o)40 b(the)f(b)s(est)g(of)g(m)m(y)h(kno)m(wledge,)i
7213 -Fi(bzip2)c Fj(do)s(es)h(not)g(use)g(an)m(y)h(paten)m(ted)g(algorithms.)
7214 -150 4958 y(Ho)m(w)m(ev)m(er,)31 b(I)c(do)h(not)g(ha)m(v)m(e)g(the)g
7215 -(resources)h(a)m(v)-5 b(ailable)29 b(to)f(carry)g(out)g(a)g(full)f
7216 -(paten)m(t)i(searc)m(h.)40 b(Therefore)150 5067 y(I)30
7217 -b(cannot)h(giv)m(e)h(an)m(y)f(guaran)m(tee)g(of)g(the)g(ab)s(o)m(v)m(e)
7218 -g(statemen)m(t.)p eop
7219 -%%Page: 2 3
7220 -2 2 bop 150 -116 a Fl(Chapter)30 b(1:)41 b(In)m(tro)s(duction)2591
7221 -b(2)150 299 y Fg(1)80 b(In)l(tro)t(duction)150 555 y
7222 -Fi(bzip2)40 b Fj(compresses)h(\014les)g(using)g(the)g(Burro)m
7223 -(ws-Wheeler)h(blo)s(c)m(k-sorting)h(text)f(compression)f(algo-)150
7224 -665 y(rithm,)54 b(and)49 b(Hu\013man)f(co)s(ding.)98
7225 -b(Compression)49 b(is)h(generally)h(considerably)e(b)s(etter)h(than)f
7226 -(that)150 775 y(ac)m(hiev)m(ed)43 b(b)m(y)f(more)g(con)m(v)m(en)m
7227 -(tional)i(LZ77/LZ78-based)e(compressors,)j(and)40 b(approac)m(hes)i
7228 -(the)g(p)s(er-)150 884 y(formance)31 b(of)f(the)h(PPM)g(family)f(of)h
7229 -(statistical)i(compressors.)150 1041 y Fi(bzip2)g Fj(is)h(built)h(on)f
7230 -(top)h(of)f Fi(libbzip2)p Fj(,)f(a)i(\015exible)f(library)h(for)f
7231 -(handling)g(compressed)g(data)h(in)f(the)150 1151 y Fi(bzip2)29
7232 -b Fj(format.)41 b(This)30 b(man)m(ual)g(describ)s(es)g(b)s(oth)f(ho)m
7233 -(w)i(to)g(use)f(the)g(program)h(and)e(ho)m(w)h(to)h(w)m(ork)g(with)150
7234 -1260 y(the)26 b(library)f(in)m(terface.)41 b(Most)26
7235 -b(of)f(the)h(man)m(ual)f(is)g(dev)m(oted)i(to)f(this)f(library)-8
7236 -b(,)27 b(not)f(the)g(program,)g(whic)m(h)150 1370 y(is)k(go)s(o)s(d)h
7237 -(news)e(if)i(y)m(our)f(in)m(terest)i(is)f(only)f(in)g(the)h(program.)
7238 -150 1527 y(Chapter)45 b(2)h(describ)s(es)e(ho)m(w)i(to)g(use)f
7239 -Fi(bzip2)p Fj(;)51 b(this)46 b(is)f(the)h(only)f(part)g(y)m(ou)h(need)f
7240 -(to)h(read)f(if)h(y)m(ou)150 1636 y(just)39 b(w)m(an)m(t)g(to)h(kno)m
7241 -(w)f(ho)m(w)h(to)f(op)s(erate)h(the)g(program.)67 b(Chapter)38
7242 -b(3)i(describ)s(es)e(the)i(programming)150 1746 y(in)m(terfaces)27
7243 -b(in)f(detail,)i(and)d(Chapter)g(4)h(records)g(some)g(miscellaneous)h
7244 -(notes)f(whic)m(h)g(I)g(though)m(t)g(ough)m(t)150 1855
7245 -y(to)31 b(b)s(e)f(recorded)h(somewhere.)p eop
7246 -%%Page: 3 4
7247 -3 3 bop 150 -116 a Fl(Chapter)30 b(2:)41 b(Ho)m(w)31
7248 -b(to)g(use)f Fi(bzip2)2375 b Fl(3)150 299 y Fg(2)80 b(Ho)l(w)53
7249 -b(to)g(use)g Ff(bzip2)150 566 y Fj(This)30 b(c)m(hapter)h(con)m(tains)h
7250 -(a)e(cop)m(y)h(of)g(the)g Fi(bzip2)d Fj(man)i(page,)h(and)f(nothing)g
7251 -(else.)390 818 y Fe(NAME)570 1004 y Fi(bzip2)p Fj(,)f
7252 -Fi(bunzip2)g Fj(-)h(a)h(blo)s(c)m(k-sorting)h(\014le)e(compressor,)h
7253 -(v1.0.2)570 1136 y Fi(bzcat)e Fj(-)i(decompresses)f(\014les)h(to)g
7254 -(stdout)570 1267 y Fi(bzip2recover)c Fj(-)k(reco)m(v)m(ers)h(data)f
7255 -(from)f(damaged)g(bzip2)h(\014les)390 1519 y Fe(SYNOPSIS)570
7256 -1706 y Fi(bzip2)e Fj([)i(-cdfkqstvzVL123456789)j(])d([)g(\014lenames)f
7257 -(...)41 b(])570 1837 y Fi(bunzip2)28 b Fj([)j(-fkvsVL)f(])g([)h
7258 -(\014lenames)f(...)41 b(])570 1968 y Fi(bzcat)29 b Fj([)i(-s)f(])h([)g
7259 -(\014lenames)f(...)41 b(])570 2100 y Fi(bzip2recover)27
7260 -b Fj(\014lename)390 2352 y Fe(DESCRIPTION)390 2538 y
7261 -Fi(bzip2)e Fj(compresses)i(\014les)f(using)g(the)h(Burro)m(ws-Wheeler)g
7262 -(blo)s(c)m(k)f(sorting)i(text)f(compres-)390 2642 y(sion)39
7263 -b(algorithm,)k(and)38 b(Hu\013man)h(co)s(ding.)67 b(Compression)39
7264 -b(is)g(generally)i(considerably)390 2746 y(b)s(etter)23
7265 -b(than)g(that)g(ac)m(hiev)m(ed)h(b)m(y)f(more)g(con)m(v)m(en)m(tional)i
7266 -(LZ77/LZ78-based)e(compressors,)390 2850 y(and)k(approac)m(hes)i(the)f
7267 -(p)s(erformance)g(of)h(the)f(PPM)h(family)f(of)h(statistical)h
7268 -(compressors.)390 3001 y(The)c(command-line)g(options)g(are)g(delib)s
7269 -(erately)h(v)m(ery)f(similar)h(to)f(those)h(of)f(GNU)g
7270 -Fi(gzip)p Fj(,)390 3104 y(but)k(they)g(are)h(not)g(iden)m(tical.)390
7271 -3255 y Fi(bzip2)e Fj(exp)s(ects)j(a)f(list)h(of)f(\014le)g(names)f(to)i
7272 -(accompan)m(y)g(the)f(command-line)g(\015ags.)43 b(Eac)m(h)390
7273 -3359 y(\014le)d(is)h(replaced)g(b)m(y)f(a)g(compressed)h(v)m(ersion)g
7274 -(of)f(itself,)k(with)d(the)f(name)g Fi(original_)390
7275 -3463 y(name.bz2)p Fj(.)45 b(Eac)m(h)33 b(compressed)g(\014le)g(has)f
7276 -(the)h(same)g(mo)s(di\014cation)g(date,)h(p)s(ermissions,)390
7277 -3567 y(and,)47 b(when)c(p)s(ossible,)k(o)m(wnership)c(as)h(the)g
7278 -(corresp)s(onding)g(original,)49 b(so)44 b(that)g(these)390
7279 -3671 y(prop)s(erties)37 b(can)g(b)s(e)g(correctly)i(restored)f(at)g
7280 -(decompression)f(time.)62 b(File)39 b(name)d(han-)390
7281 -3774 y(dling)e(is)g(naiv)m(e)h(in)f(the)g(sense)g(that)h(there)f(is)g
7282 -(no)g(mec)m(hanism)g(for)h(preserving)f(original)390
7283 -3878 y(\014le)41 b(names,)i(p)s(ermissions,)g(o)m(wnerships)d(or)h
7284 -(dates)g(in)g(\014lesystems)g(whic)m(h)f(lac)m(k)i(these)390
7285 -3982 y(concepts,)32 b(or)e(ha)m(v)m(e)i(serious)e(\014le)h(name)f
7286 -(length)h(restrictions,)h(suc)m(h)e(as)g(MS-DOS.)390
7287 -4133 y Fi(bzip2)24 b Fj(and)i Fi(bunzip2)d Fj(will)k(b)m(y)f(default)f
7288 -(not)i(o)m(v)m(erwrite)h(existing)f(\014les.)39 b(If)26
7289 -b(y)m(ou)g(w)m(an)m(t)h(this)390 4237 y(to)k(happ)s(en,)e(sp)s(ecify)h
7290 -(the)h Fi(-f)e Fj(\015ag.)390 4388 y(If)k(no)f(\014le)h(names)f(are)i
7291 -(sp)s(eci\014ed,)e Fi(bzip2)g Fj(compresses)h(from)f(standard)g(input)g
7292 -(to)i(stan-)390 4491 y(dard)d(output.)44 b(In)32 b(this)f(case,)i
7293 -Fi(bzip2)e Fj(will)h(decline)g(to)h(write)f(compressed)g(output)f(to)i
7294 -(a)390 4595 y(terminal,)e(as)g(this)f(w)m(ould)g(b)s(e)g(en)m(tirely)i
7295 -(incomprehensible)e(and)g(therefore)h(p)s(oin)m(tless.)390
7296 -4746 y Fi(bunzip2)j Fj(\(or)j Fi(bzip2)29 b(-d)p Fj(\))36
7297 -b(decompresses)g(all)h(sp)s(eci\014ed)e(\014les.)58 b(Files)37
7298 -b(whic)m(h)f(w)m(ere)h(not)390 4850 y(created)f(b)m(y)e
7299 -Fi(bzip2)g Fj(will)g(b)s(e)g(detected)j(and)c(ignored,)k(and)c(a)i(w)m
7300 -(arning)g(issued.)52 b Fi(bzip2)390 4954 y Fj(attempts)29
7301 -b(to)f(guess)g(the)g(\014lename)f(for)h(the)g(decompressed)f(\014le)h
7302 -(from)f(that)h(of)g(the)g(com-)390 5058 y(pressed)i(\014le)g(as)h
7303 -(follo)m(ws:)570 5209 y Fi(filename.bz2)57 b Fj(b)s(ecomes)31
7304 -b Fi(filename)570 5340 y(filename.bz)58 b Fj(b)s(ecomes)30
7305 -b Fi(filename)p eop
7306 -%%Page: 4 5
7307 -4 4 bop 150 -116 a Fl(Chapter)30 b(2:)41 b(Ho)m(w)31
7308 -b(to)g(use)f Fi(bzip2)2375 b Fl(4)570 299 y Fi(filename.tbz2)27
7309 -b Fj(b)s(ecomes)j Fi(filename.tar)570 470 y(filename.tbz)57
7310 -b Fj(b)s(ecomes)31 b Fi(filename.tar)570 641 y(anyothername)57
7311 -b Fj(b)s(ecomes)31 b Fi(anyothername.out)390 859 y Fj(If)i(the)g
7312 -(\014le)f(do)s(es)h(not)g(end)f(in)g(one)i(of)e(the)h(recognised)h
7313 -(endings,)f Fi(.bz2)p Fj(,)g Fi(.bz)p Fj(,)f Fi(.tbz2)g
7314 -Fj(or)390 963 y Fi(.tbz)p Fj(,)h Fi(bzip2)g Fj(complains)g(that)h(it)h
7315 -(cannot)f(guess)f(the)h(name)g(of)f(the)h(original)h(\014le,)g(and)390
7316 -1067 y(uses)30 b(the)h(original)g(name)f(with)h Fi(.out)e
7317 -Fj(app)s(ended.)390 1218 y(As)g(with)h(compression,)h(supplying)e(no)h
7318 -(\014lenames)f(causes)i(decompression)f(from)g(stan-)390
7319 -1321 y(dard)f(input)h(to)h(standard)f(output.)390 1472
7320 -y Fi(bunzip2)h Fj(will)j(correctly)i(decompress)d(a)h(\014le)f(whic)m
7321 -(h)g(is)h(the)g(concatenation)h(of)f(t)m(w)m(o)h(or)390
7322 -1576 y(more)i(compressed)g(\014les.)61 b(The)37 b(result)g(is)g(the)g
7323 -(concatenation)i(of)e(the)g(corresp)s(onding)390 1680
7324 -y(uncompressed)c(\014les.)52 b(In)m(tegrit)m(y)37 b(testing)e(\()p
7325 -Fi(-t)p Fj(\))f(of)h(concatenated)h(compressed)e(\014les)g(is)390
7326 -1784 y(also)d(supp)s(orted.)390 1935 y(Y)-8 b(ou)38 b(can)g(also)g
7327 -(compress)g(or)g(decompress)g(\014les)f(to)i(the)f(standard)f(output)g
7328 -(b)m(y)h(giving)390 2039 y(the)44 b Fi(-c)e Fj(\015ag.)79
7329 -b(Multiple)44 b(\014les)g(ma)m(y)f(b)s(e)g(compressed)g(and)f
7330 -(decompressed)h(lik)m(e)i(this.)390 2142 y(The)31 b(resulting)h
7331 -(outputs)e(are)i(fed)f(sequen)m(tially)h(to)g(stdout.)43
7332 -b(Compression)31 b(of)g(m)m(ultiple)390 2246 y(\014les)43
7333 -b(in)g(this)g(manner)g(generates)i(a)e(stream)h(con)m(taining)g(m)m
7334 -(ultiple)h(compressed)e(\014le)390 2350 y(represen)m(tations.)48
7335 -b(Suc)m(h)32 b(a)g(stream)h(can)f(b)s(e)g(decompressed)g(correctly)j
7336 -(only)d(b)m(y)g Fi(bzip2)390 2454 y Fj(v)m(ersion)h(0.9.0)h(or)f
7337 -(later.)48 b(Earlier)33 b(v)m(ersions)g(of)g Fi(bzip2)e
7338 -Fj(will)i(stop)g(after)g(decompressing)390 2558 y(the)e(\014rst)f
7339 -(\014le)g(in)g(the)h(stream.)390 2709 y Fi(bzcat)e Fj(\(or)i
7340 -Fi(bzip2)e(-dc)p Fj(\))h(decompresses)g(all)h(sp)s(eci\014ed)f(\014les)
7341 -g(to)i(the)e(standard)g(output.)390 2860 y Fi(bzip2)c
7342 -Fj(will)j(read)e(argumen)m(ts)i(from)e(the)h(en)m(vironmen)m(t)h(v)-5
7343 -b(ariables)28 b Fi(BZIP2)f Fj(and)g Fi(BZIP)p Fj(,)g(in)390
7344 -2963 y(that)21 b(order,)i(and)d(will)h(pro)s(cess)f(them)h(b)s(efore)g
7345 -(an)m(y)f(argumen)m(ts)h(read)g(from)f(the)h(command)390
7346 -3067 y(line.)41 b(This)30 b(giv)m(es)i(a)e(con)m(v)m(enien)m(t)j(w)m(a)
7347 -m(y)e(to)g(supply)e(default)i(argumen)m(ts.)390 3218
7348 -y(Compression)e(is)h(alw)m(a)m(ys)h(p)s(erformed,)e(ev)m(en)h(if)g(the)
7349 -g(compressed)f(\014le)h(is)g(sligh)m(tly)h(larger)390
7350 -3322 y(than)24 b(the)h(original.)40 b(Files)25 b(of)f(less)h(than)f(ab)
7351 -s(out)g(one)h(h)m(undred)d(b)m(ytes)j(tend)g(to)g(get)h(larger,)390
7352 -3426 y(since)33 b(the)g(compression)f(mec)m(hanism)h(has)f(a)h(constan)
7353 -m(t)g(o)m(v)m(erhead)h(in)e(the)h(region)g(of)g(50)390
7354 -3529 y(b)m(ytes.)50 b(Random)33 b(data)h(\(including)f(the)h(output)f
7355 -(of)g(most)h(\014le)g(compressors\))g(is)f(co)s(ded)390
7356 -3633 y(at)e(ab)s(out)f(8.05)i(bits)e(p)s(er)g(b)m(yte,)h(giving)h(an)e
7357 -(expansion)g(of)g(around)f(0.5\045.)390 3784 y(As)f(a)h(self-c)m(hec)m
7358 -(k)i(for)e(y)m(our)g(protection,)i Fi(bzip2)d Fj(uses)g(32-bit)i(CR)m
7359 -(Cs)f(to)g(mak)m(e)h(sure)e(that)390 3888 y(the)43 b(decompressed)g(v)m
7360 -(ersion)h(of)f(a)g(\014le)f(is)h(iden)m(tical)i(to)f(the)f(original.)79
7361 -b(This)43 b(guards)390 3992 y(against)h(corruption)f(of)h(the)f
7362 -(compressed)g(data,)k(and)42 b(against)i(undetected)g(bugs)e(in)390
7363 -4096 y Fi(bzip2)33 b Fj(\(hop)s(efully)i(v)m(ery)g(unlik)m(ely\).)55
7364 -b(The)35 b(c)m(hances)h(of)f(data)g(corruption)g(going)h(unde-)390
7365 -4199 y(tected)e(is)f(microscopic,)h(ab)s(out)e(one)h(c)m(hance)g(in)g
7366 -(four)f(billion)g(for)h(eac)m(h)g(\014le)g(pro)s(cessed.)390
7367 -4303 y(Be)j(a)m(w)m(are,)k(though,)d(that)g(the)g(c)m(hec)m(k)h(o)s
7368 -(ccurs)e(up)s(on)f(decompression,)j(so)f(it)f(can)h(only)390
7369 -4407 y(tell)28 b(y)m(ou)e(that)h(something)g(is)g(wrong.)39
7370 -b(It)27 b(can't)g(help)f(y)m(ou)h(reco)m(v)m(er)i(the)d(original)i
7371 -(uncom-)390 4511 y(pressed)f(data.)40 b(Y)-8 b(ou)27
7372 -b(can)g(use)h Fi(bzip2recover)23 b Fj(to)29 b(try)e(to)i(reco)m(v)m(er)
7373 -g(data)f(from)f(damaged)390 4614 y(\014les.)390 4766
7374 -y(Return)42 b(v)-5 b(alues:)65 b(0)42 b(for)h(a)f(normal)g(exit,)47
7375 -b(1)c(for)f(en)m(vironmen)m(tal)i(problems)e(\(\014le)h(not)390
7376 -4869 y(found,)29 b(in)m(v)-5 b(alid)30 b(\015ags,)g(I/O)h(errors,)g
7377 -(&c\),)f(2)h(to)f(indicate)h(a)f(corrupt)g(compressed)g(\014le,)h(3)390
7378 -4973 y(for)f(an)g(in)m(ternal)i(consistency)f(error)g(\(eg,)h(bug\))e
7379 -(whic)m(h)g(caused)g Fi(bzip2)f Fj(to)i(panic.)390 5304
7380 -y Fe(OPTIONS)p eop
7381 -%%Page: 5 6
7382 -5 5 bop 150 -116 a Fl(Chapter)30 b(2:)41 b(Ho)m(w)31
7383 -b(to)g(use)f Fi(bzip2)2375 b Fl(5)390 299 y Fi(-c)30
7384 -b(--stdout)870 403 y Fj(Compress)g(or)g(decompress)h(to)g(standard)e
7385 -(output.)390 550 y Fi(-d)h(--decompress)870 653 y Fj(F)-8
7386 -b(orce)42 b(decompression.)72 b Fi(bzip2)p Fj(,)43 b
7387 -Fi(bunzip2)38 b Fj(and)i Fi(bzcat)g Fj(are)h(really)h(the)870
7388 -757 y(same)26 b(program,)i(and)d(the)h(decision)h(ab)s(out)f(what)g
7389 -(actions)h(to)g(tak)m(e)h(is)e(done)870 861 y(on)j(the)h(basis)f(of)g
7390 -(whic)m(h)h(name)f(is)g(used.)40 b(This)29 b(\015ag)g(o)m(v)m(errides)i
7391 -(that)f(mec)m(h-)870 965 y(anism,)g(and)g(forces)h(bzip2)f(to)h
7392 -(decompress.)390 1112 y Fi(-z)f(--compress)870 1215 y
7393 -Fj(The)37 b(complemen)m(t)h(to)g Fi(-d)p Fj(:)54 b(forces)37
7394 -b(compression,)j(regardless)d(of)h(the)f(in-)870 1319
7395 -y(v)m(ok)-5 b(ation)32 b(name.)390 1466 y Fi(-t)e(--test)66
7396 -b Fj(Chec)m(k)26 b(in)m(tegrit)m(y)i(of)e(the)g(sp)s(eci\014ed)f
7397 -(\014le\(s\),)i(but)e(don't)h(decompress)g(them.)870
7398 -1570 y(This)39 b(really)h(p)s(erforms)f(a)g(trial)h(decompression)g
7399 -(and)e(thro)m(ws)i(a)m(w)m(a)m(y)h(the)870 1674 y(result.)390
7400 -1821 y Fi(-f)30 b(--force)870 1924 y Fj(F)-8 b(orce)27
7401 -b(o)m(v)m(erwrite)h(of)e(output)g(\014les.)39 b(Normally)-8
7402 -b(,)28 b Fi(bzip2)c Fj(will)j(not)f(o)m(v)m(erwrite)870
7403 -2028 y(existing)i(output)e(\014les.)40 b(Also)27 b(forces)g
7404 -Fi(bzip2)f Fj(to)h(break)g(hard)f(links)g(to)i(\014les,)870
7405 -2132 y(whic)m(h)i(it)h(otherwise)g(w)m(ouldn't)g(do.)870
7406 -2257 y Fi(bzip2)h Fj(normally)h(declines)h(to)f(decompress)h(\014les)f
7407 -(whic)m(h)f(don't)i(ha)m(v)m(e)g(the)870 2361 y(correct)39
7408 -b(magic)g(header)e(b)m(ytes.)63 b(If)38 b(forced)g(\()p
7409 -Fi(-f)p Fj(\),)h(ho)m(w)m(ev)m(er,)i(it)e(will)f(pass)870
7410 -2465 y(suc)m(h)30 b(\014les)g(through)g(unmo)s(di\014ed.)39
7411 -b(This)30 b(is)h(ho)m(w)f(GNU)h Fi(gzip)e Fj(b)s(eha)m(v)m(es.)390
7412 -2612 y Fi(-k)h(--keep)66 b Fj(Keep)34 b(\(don't)g(delete\))h(input)d
7413 -(\014les)i(during)e(compression)i(or)f(decompres-)870
7414 -2716 y(sion.)390 2863 y Fi(-s)d(--small)870 2966 y Fj(Reduce)35
7415 -b(memory)g(usage,)i(for)e(compression,)i(decompression)e(and)f(test-)
7416 -870 3070 y(ing.)40 b(Files)29 b(are)f(decompressed)g(and)f(tested)i
7417 -(using)f(a)g(mo)s(di\014ed)f(algorithm)870 3174 y(whic)m(h)32
7418 -b(only)g(requires)h(2.5)g(b)m(ytes)g(p)s(er)f(blo)s(c)m(k)g(b)m(yte.)48
7419 -b(This)32 b(means)f(an)m(y)i(\014le)870 3278 y(can)d(b)s(e)f
7420 -(decompressed)g(in)h(2300k)h(of)f(memory)-8 b(,)31 b(alb)s(eit)f(at)g
7421 -(ab)s(out)f(half)h(the)870 3381 y(normal)g(sp)s(eed.)870
7422 -3507 y(During)35 b(compression,)j Fi(-s)d Fj(selects)j(a)e(blo)s(c)m(k)
7423 -h(size)f(of)h(200k,)h(whic)m(h)e(limits)870 3611 y(memory)43
7424 -b(use)f(to)h(around)e(the)i(same)f(\014gure,)k(at)d(the)f(exp)s(ense)g
7425 -(of)h(y)m(our)870 3714 y(compression)32 b(ratio.)47 b(In)31
7426 -b(short,)i(if)e(y)m(our)i(mac)m(hine)f(is)g(lo)m(w)g(on)g(memory)g(\(8)
7427 -870 3818 y(megab)m(ytes)39 b(or)e(less\),)j(use)d(-s)g(for)g(ev)m
7428 -(erything.)62 b(See)38 b(MEMOR)-8 b(Y)37 b(MAN-)870 3922
7429 -y(A)m(GEMENT)31 b(b)s(elo)m(w.)390 4069 y Fi(-q)f(--quiet)870
7430 -4173 y Fj(Suppress)h(non-essen)m(tial)j(w)m(arning)f(messages.)49
7431 -b(Messages)34 b(p)s(ertaining)f(to)870 4276 y(I/O)e(errors)g(and)e
7432 -(other)i(critical)i(ev)m(en)m(ts)f(will)e(not)h(b)s(e)f(suppressed.)390
7433 -4423 y Fi(-v)g(--verbose)870 4527 y Fj(V)-8 b(erb)s(ose)25
7434 -b(mo)s(de)f({)h(sho)m(w)f(the)h(compression)g(ratio)g(for)g(eac)m(h)g
7435 -(\014le)g(pro)s(cessed.)870 4631 y(F)-8 b(urther)27 b
7436 -Fi(-v)p Fj('s)g(increase)h(the)g(v)m(erb)s(osit)m(y)g(lev)m(el,)i(sp)s
7437 -(ewing)d(out)g(lots)h(of)g(infor-)870 4735 y(mation)j(whic)m(h)f(is)g
7438 -(primarily)h(of)f(in)m(terest)i(for)f(diagnostic)g(purp)s(oses.)390
7439 -4882 y Fi(-L)f(--license)e(-V)h(--version)870 4985 y
7440 -Fj(Displa)m(y)i(the)f(soft)m(w)m(are)i(v)m(ersion,)g(license)f(terms)g
7441 -(and)e(conditions.)390 5132 y Fi(-1)h(\(or)f(--fast\))g(to)g(-9)h(\(or)
7442 -g(--best\))870 5236 y Fj(Set)h(the)g(blo)s(c)m(k)g(size)g(to)h(100)g
7443 -(k,)e(200)i(k)f(..)41 b(900)32 b(k)f(when)e(compressing.)42
7444 -b(Has)870 5340 y(no)37 b(e\013ect)i(when)d(decompressing.)62
7445 -b(See)37 b(MEMOR)-8 b(Y)38 b(MANA)m(GEMENT)p eop
7446 -%%Page: 6 7
7447 -6 6 bop 150 -116 a Fl(Chapter)30 b(2:)41 b(Ho)m(w)31
7448 -b(to)g(use)f Fi(bzip2)2375 b Fl(6)870 299 y Fj(b)s(elo)m(w.)83
7449 -b(The)44 b Fi(--fast)f Fj(and)g Fi(--best)g Fj(aliases)i(are)g
7450 -(primarily)f(for)g(GNU)870 403 y Fi(gzip)27 b Fj(compatibilit)m(y)-8
7451 -b(.)43 b(In)28 b(particular,)i Fi(--fast)d Fj(do)s(esn't)h(mak)m(e)i
7452 -(things)e(sig-)870 506 y(ni\014can)m(tly)d(faster.)40
7453 -b(And)23 b Fi(--best)g Fj(merely)i(selects)h(the)f(default)g(b)s(eha)m
7454 -(viour.)390 674 y Fi(--)384 b Fj(T)-8 b(reats)38 b(all)f(subsequen)m(t)
7455 -f(argumen)m(ts)g(as)h(\014le)f(names,)i(ev)m(en)f(if)f(they)h(start)870
7456 -778 y(with)31 b(a)h(dash.)42 b(This)31 b(is)h(so)f(y)m(ou)h(can)f
7457 -(handle)g(\014les)g(with)h(names)f(b)s(eginning)870 881
7458 -y(with)f(a)h(dash,)e(for)i(example:)41 b Fi(bzip2)29
7459 -b(--)h(-myfilename)p Fj(.)390 1049 y Fi(--repetitive-fast)390
7460 -1185 y(--repetitive-best)870 1288 y Fj(These)j(\015ags)g(are)g
7461 -(redundan)m(t)f(in)h(v)m(ersions)g(0.9.5)i(and)d(ab)s(o)m(v)m(e.)49
7462 -b(They)33 b(pro-)870 1392 y(vided)g(some)h(coarse)h(con)m(trol)g(o)m(v)
7463 -m(er)g(the)f(b)s(eha)m(viour)f(of)h(the)g(sorting)g(algo-)870
7464 -1496 y(rithm)j(in)g(earlier)h(v)m(ersions,)i(whic)m(h)d(w)m(as)g
7465 -(sometimes)h(useful.)61 b(0.9.5)39 b(and)870 1600 y(ab)s(o)m(v)m(e)31
7466 -b(ha)m(v)m(e)f(an)g(impro)m(v)m(ed)g(algorithm)h(whic)m(h)e(renders)g
7467 -(these)h(\015ags)g(irrel-)870 1704 y(ev)-5 b(an)m(t.)390
7468 -1964 y Fe(MEMOR)-10 b(Y)40 b(MANA)m(GEMENT)390 2151 y
7469 -Fi(bzip2)23 b Fj(compresses)i(large)h(\014les)e(in)g(blo)s(c)m(ks.)40
7470 -b(The)24 b(blo)s(c)m(k)h(size)h(a\013ects)g(b)s(oth)e(the)g(compres-)
7471 -390 2255 y(sion)38 b(ratio)g(ac)m(hiev)m(ed,)k(and)36
7472 -b(the)i(amoun)m(t)g(of)g(memory)g(needed)f(for)h(compression)g(and)390
7473 -2358 y(decompression.)57 b(The)35 b(\015ags)h Fi(-1)f
7474 -Fj(through)g Fi(-9)g Fj(sp)s(ecify)g(the)h(blo)s(c)m(k)g(size)h(to)f(b)
7475 -s(e)f(100,000)390 2462 y(b)m(ytes)25 b(through)f(900,000)j(b)m(ytes)e
7476 -(\(the)h(default\))e(resp)s(ectiv)m(ely)-8 b(.)41 b(A)m(t)25
7477 -b(decompression)g(time,)390 2566 y(the)k(blo)s(c)m(k)h(size)g(used)f
7478 -(for)g(compression)g(is)g(read)h(from)f(the)g(header)g(of)g(the)h
7479 -(compressed)390 2670 y(\014le,)j(and)f Fi(bunzip2)f Fj(then)h(allo)s
7480 -(cates)i(itself)g(just)e(enough)g(memory)h(to)g(decompress)g(the)390
7481 -2773 y(\014le.)40 b(Since)27 b(blo)s(c)m(k)h(sizes)h(are)f(stored)g(in)
7482 -f(compressed)g(\014les,)h(it)h(follo)m(ws)f(that)g(the)g(\015ags)g
7483 -Fi(-1)390 2877 y Fj(to)j Fi(-9)f Fj(are)h(irrelev)-5
7484 -b(an)m(t)32 b(to)f(and)f(so)g(ignored)h(during)e(decompression.)390
7485 -3028 y(Compression)h(and)f(decompression)i(requiremen)m(ts,)g(in)f(b)m
7486 -(ytes,)i(can)e(b)s(e)g(estimated)i(as:)869 3179 y Fi(Compression:)140
7487 -b(400k)46 b(+)i(\()f(8)h(x)f(block)f(size)h(\))869 3387
7488 -y(Decompression:)d(100k)i(+)i(\()f(4)h(x)f(block)f(size)h(\),)g(or)1585
7489 -3491 y(100k)f(+)i(\()f(2.5)g(x)g(block)g(size)f(\))390
7490 -3642 y Fj(Larger)27 b(blo)s(c)m(k)f(sizes)h(giv)m(e)h(rapidly)e
7491 -(diminishing)f(marginal)i(returns.)39 b(Most)27 b(of)f(the)h(com-)390
7492 -3745 y(pression)e(comes)i(from)f(the)g(\014rst)f(t)m(w)m(o)i(or)f
7493 -(three)h(h)m(undred)d(k)h(of)h(blo)s(c)m(k)g(size,)i(a)e(fact)h(w)m
7494 -(orth)390 3849 y(b)s(earing)32 b(in)g(mind)f(when)g(using)h
7495 -Fi(bzip2)f Fj(on)h(small)g(mac)m(hines.)47 b(It)32 b(is)h(also)f(imp)s
7496 -(ortan)m(t)h(to)390 3953 y(appreciate)f(that)g(the)f(decompression)g
7497 -(memory)g(requiremen)m(t)h(is)f(set)g(at)h(compression)390
7498 -4057 y(time)f(b)m(y)f(the)h(c)m(hoice)h(of)f(blo)s(c)m(k)g(size.)390
7499 -4208 y(F)-8 b(or)43 b(\014les)f(compressed)h(with)f(the)g(default)h
7500 -(900k)g(blo)s(c)m(k)g(size,)k Fi(bunzip2)40 b Fj(will)j(require)390
7501 -4311 y(ab)s(out)28 b(3700)i(kb)m(ytes)f(to)h(decompress.)40
7502 -b(T)-8 b(o)29 b(supp)s(ort)e(decompression)i(of)g(an)m(y)f(\014le)h(on)
7503 -f(a)h(4)390 4415 y(megab)m(yte)h(mac)m(hine,)g Fi(bunzip2)c
7504 -Fj(has)i(an)h(option)g(to)g(decompress)g(using)f(appro)m(ximately)390
7505 -4519 y(half)33 b(this)g(amoun)m(t)h(of)f(memory)-8 b(,)35
7506 -b(ab)s(out)d(2300)j(kb)m(ytes.)50 b(Decompression)34
7507 -b(sp)s(eed)e(is)h(also)390 4623 y(halv)m(ed,)h(so)f(y)m(ou)g(should)e
7508 -(use)i(this)f(option)h(only)g(where)g(necessary)-8 b(.)48
7509 -b(The)33 b(relev)-5 b(an)m(t)34 b(\015ag)390 4727 y(is)c
7510 -Fi(-s)p Fj(.)390 4878 y(In)i(general,)i(try)f(and)e(use)h(the)h
7511 -(largest)h(blo)s(c)m(k)f(size)g(memory)g(constrain)m(ts)g(allo)m(w,)i
7512 -(since)390 4981 y(that)43 b(maximises)g(the)g(compression)f(ac)m(hiev)m
7513 -(ed.)79 b(Compression)42 b(and)g(decompression)390 5085
7514 -y(sp)s(eed)30 b(are)g(virtually)h(una\013ected)g(b)m(y)f(blo)s(c)m(k)h
7515 -(size.)390 5236 y(Another)24 b(signi\014can)m(t)i(p)s(oin)m(t)e
7516 -(applies)g(to)i(\014les)e(whic)m(h)g(\014t)h(in)f(a)g(single)h(blo)s(c)
7517 -m(k)g({)g(that)g(means)390 5340 y(most)g(\014les)f(y)m(ou'd)h(encoun)m
7518 -(ter)g(using)f(a)g(large)i(blo)s(c)m(k)f(size.)39 b(The)25
7519 -b(amoun)m(t)f(of)h(real)g(memory)p eop
7520 -%%Page: 7 8
7521 -7 7 bop 150 -116 a Fl(Chapter)30 b(2:)41 b(Ho)m(w)31
7522 -b(to)g(use)f Fi(bzip2)2375 b Fl(7)390 299 y Fj(touc)m(hed)36
7523 -b(is)g(prop)s(ortional)g(to)g(the)g(size)h(of)f(the)g(\014le,)h(since)f
7524 -(the)g(\014le)g(is)f(smaller)i(than)e(a)390 403 y(blo)s(c)m(k.)48
7525 -b(F)-8 b(or)33 b(example,)h(compressing)f(a)g(\014le)f(20,000)j(b)m
7526 -(ytes)f(long)f(with)f(the)h(\015ag)g Fi(-9)f Fj(will)390
7527 -506 y(cause)26 b(the)g(compressor)f(to)i(allo)s(cate)g(around)e(7600k)i
7528 -(of)f(memory)-8 b(,)27 b(but)e(only)g(touc)m(h)i(400k)390
7529 -610 y Fi(+)h Fj(20000)i(*)f(8)g(=)f(560)h(kb)m(ytes)g(of)g(it.)40
7530 -b(Similarly)-8 b(,)30 b(the)f(decompressor)f(will)h(allo)s(cate)h
7531 -(3700k)390 714 y(but)g(only)g(touc)m(h)h(100k)h Fi(+)e
7532 -Fj(20000)j(*)d(4)h(=)f(180)i(kb)m(ytes.)390 865 y(Here)39
7533 -b(is)f(a)g(table)h(whic)m(h)f(summarises)f(the)i(maxim)m(um)e(memory)h
7534 -(usage)h(for)f(di\013eren)m(t)390 969 y(blo)s(c)m(k)c(sizes.)50
7535 -b(Also)33 b(recorded)g(is)h(the)f(total)i(compressed)e(size)h(for)g(14)
7536 -g(\014les)f(of)g(the)h(Cal-)390 1073 y(gary)39 b(T)-8
7537 -b(ext)39 b(Compression)f(Corpus)g(totalling)i(3,141,622)i(b)m(ytes.)65
7538 -b(This)38 b(column)h(giv)m(es)390 1176 y(some)g(feel)f(for)h(ho)m(w)f
7539 -(compression)g(v)-5 b(aries)39 b(with)f(blo)s(c)m(k)g(size.)65
7540 -b(These)38 b(\014gures)g(tend)g(to)390 1280 y(understate)28
7541 -b(the)g(adv)-5 b(an)m(tage)29 b(of)f(larger)h(blo)s(c)m(k)g(sizes)f
7542 -(for)g(larger)h(\014les,)g(since)f(the)g(Corpus)390 1384
7543 -y(is)i(dominated)h(b)m(y)f(smaller)h(\014les.)1107 1535
7544 -y Fi(Compress)141 b(Decompress)g(Decompress)f(Corpus)773
7545 -1639 y(Flag)238 b(usage)285 b(usage)332 b(-s)48 b(usage)237
7546 -b(Size)821 1846 y(-1)286 b(1200k)332 b(500k)429 b(350k)285
7547 -b(914704)821 1950 y(-2)h(2000k)332 b(900k)429 b(600k)285
7548 -b(877703)821 2054 y(-3)h(2800k)f(1300k)428 b(850k)285
7549 -b(860338)821 2158 y(-4)h(3600k)f(1700k)380 b(1100k)285
7550 -b(846899)821 2261 y(-5)h(4400k)f(2100k)380 b(1350k)285
7551 -b(845160)821 2365 y(-6)h(5200k)f(2500k)380 b(1600k)285
7552 -b(838626)821 2469 y(-7)h(6100k)f(2900k)380 b(1850k)285
7553 -b(834096)821 2573 y(-8)h(6800k)f(3300k)380 b(2100k)285
7554 -b(828642)821 2676 y(-9)h(7600k)f(3700k)380 b(2350k)285
7555 -b(828642)390 2992 y Fe(RECO)m(VERING)38 b(D)m(A)-10 b(T)g(A)40
7556 -b(FR)m(OM)h(D)m(AMA)m(GED)f(FILES)390 3179 y Fi(bzip2)24
7557 -b Fj(compresses)i(\014les)g(in)f(blo)s(c)m(ks,)i(usually)e(900kb)m
7558 -(ytes)j(long.)40 b(Eac)m(h)25 b(blo)s(c)m(k)h(is)g(handled)390
7559 -3283 y(indep)s(enden)m(tly)-8 b(.)42 b(If)31 b(a)g(media)g(or)h
7560 -(transmission)f(error)g(causes)g(a)g(m)m(ulti-blo)s(c)m(k)i
7561 -Fi(.bz2)d Fj(\014le)390 3387 y(to)35 b(b)s(ecome)f(damaged,)i(it)e(ma)m
7562 -(y)h(b)s(e)e(p)s(ossible)h(to)h(reco)m(v)m(er)h(data)f(from)f(the)g
7563 -(undamaged)390 3491 y(blo)s(c)m(ks)d(in)f(the)h(\014le.)390
7564 -3642 y(The)g(compressed)g(represen)m(tation)i(of)f(eac)m(h)g(blo)s(c)m
7565 -(k)g(is)f(delimited)h(b)m(y)f(a)h(48-bit)g(pattern,)390
7566 -3745 y(whic)m(h)27 b(mak)m(es)g(it)h(p)s(ossible)e(to)i(\014nd)d(the)j
7567 -(blo)s(c)m(k)f(b)s(oundaries)e(with)i(reasonable)h(certain)m(t)m(y)-8
7568 -b(.)390 3849 y(Eac)m(h)33 b(blo)s(c)m(k)g(also)h(carries)g(its)f(o)m
7569 -(wn)g(32-bit)h(CR)m(C,)f(so)g(damaged)g(blo)s(c)m(ks)h(can)f(b)s(e)f
7570 -(distin-)390 3953 y(guished)e(from)g(undamaged)f(ones.)390
7571 -4104 y Fi(bzip2recover)36 b Fj(is)j(a)g(simple)f(program)h(whose)g
7572 -(purp)s(ose)f(is)h(to)g(searc)m(h)h(for)f(blo)s(c)m(ks)g(in)390
7573 -4208 y Fi(.bz2)33 b Fj(\014les,)j(and)e(write)h(eac)m(h)h(blo)s(c)m(k)f
7574 -(out)g(in)m(to)g(its)g(o)m(wn)g Fi(.bz2)e Fj(\014le.)54
7575 -b(Y)-8 b(ou)34 b(can)h(then)f(use)390 4311 y Fi(bzip2)29
7576 -b(-t)23 b Fj(to)h(test)h(the)f(in)m(tegrit)m(y)i(of)d(the)h(resulting)g
7577 -(\014les,)h(and)e(decompress)g(those)h(whic)m(h)390 4415
7578 -y(are)31 b(undamaged.)390 4566 y Fi(bzip2recover)40 b
7579 -Fj(tak)m(es)45 b(a)f(single)g(argumen)m(t,)j(the)d(name)g(of)f(the)h
7580 -(damaged)g(\014le,)j(and)390 4670 y(writes)33 b(a)f(n)m(um)m(b)s(er)f
7581 -(of)h(\014les)h Fi(rec00001file.bz2)p Fj(,)28 b Fi(rec00002file.bz2)p
7582 -Fj(,)g(etc,)34 b(con)m(tain-)390 4774 y(ing)29 b(the)g(extracted)i(blo)
7583 -s(c)m(ks.)40 b(The)29 b(output)g(\014lenames)g(are)g(designed)g(so)g
7584 -(that)g(the)g(use)g(of)390 4878 y(wildcards)h(in)f(subsequen)m(t)h(pro)
7585 -s(cessing)g({)h(for)f(example,)h Fi(bzip2)e(-dc)g(rec*file.bz2)e(>)390
7586 -4981 y(recovered_data)f Fj({)31 b(pro)s(cesses)g(the)f(\014les)h(in)f
7587 -(the)h(correct)h(order.)390 5132 y Fi(bzip2recover)37
7588 -b Fj(should)i(b)s(e)h(of)h(most)f(use)g(dealing)h(with)f(large)i
7589 -Fi(.bz2)d Fj(\014les,)k(as)d(these)390 5236 y(will)31
7590 -b(con)m(tain)i(man)m(y)e(blo)s(c)m(ks.)43 b(It)32 b(is)f(clearly)h
7591 -(futile)g(to)g(use)f(it)g(on)g(damaged)g(single-blo)s(c)m(k)390
7592 -5340 y(\014les,)g(since)g(a)g(damaged)f(blo)s(c)m(k)h(cannot)h(b)s(e)e
7593 -(reco)m(v)m(ered.)43 b(If)31 b(y)m(ou)g(wish)f(to)h(minimise)g(an)m(y)p
7594 -eop
7595 -%%Page: 8 9
7596 -8 8 bop 150 -116 a Fl(Chapter)30 b(2:)41 b(Ho)m(w)31
7597 -b(to)g(use)f Fi(bzip2)2375 b Fl(8)390 299 y Fj(p)s(oten)m(tial)36
7598 -b(data)f(loss)f(through)g(media)h(or)g(transmission)f(errors,)i(y)m(ou)
7599 -e(migh)m(t)i(consider)390 403 y(compressing)31 b(with)f(a)g(smaller)h
7600 -(blo)s(c)m(k)g(size.)390 711 y Fe(PERF)m(ORMANCE)39 b(NOTES)390
7601 -897 y Fj(The)c(sorting)i(phase)e(of)g(compression)h(gathers)g(together)
7602 -i(similar)e(strings)g(in)f(the)h(\014le.)390 1001 y(Because)51
7603 -b(of)g(this,)57 b(\014les)51 b(con)m(taining)h(v)m(ery)f(long)h(runs)d
7604 -(of)j(rep)s(eated)f(sym)m(b)s(ols,)56 b(lik)m(e)390 1105
7605 -y Fi(")p Fj(aabaabaabaab)c(...)p Fi(")h Fj(\(rep)s(eated)g(sev)m(eral)h
7606 -(h)m(undred)c(times\))k(ma)m(y)f(compress)f(more)390
7607 -1209 y(slo)m(wly)33 b(than)f(normal.)45 b(V)-8 b(ersions)33
7608 -b(0.9.5)g(and)e(ab)s(o)m(v)m(e)i(fare)g(m)m(uc)m(h)f(b)s(etter)g(than)g
7609 -(previous)390 1312 y(v)m(ersions)54 b(in)g(this)g(resp)s(ect.)111
7610 -b(The)54 b(ratio)h(b)s(et)m(w)m(een)g(w)m(orst-case)g(and)e(a)m(v)m
7611 -(erage-case)390 1416 y(compression)39 b(time)g(is)g(in)f(the)h(region)h
7612 -(of)e(10:1.)67 b(F)-8 b(or)40 b(previous)e(v)m(ersions,)k(this)c
7613 -(\014gure)390 1520 y(w)m(as)j(more)g(lik)m(e)g(100:1.)74
7614 -b(Y)-8 b(ou)40 b(can)h(use)f(the)h Fi(-vvvv)e Fj(option)i(to)g(monitor)
7615 -g(progress)g(in)390 1624 y(great)32 b(detail,)f(if)g(y)m(ou)f(w)m(an)m
7616 -(t.)390 1775 y(Decompression)h(sp)s(eed)e(is)i(una\013ected)g(b)m(y)f
7617 -(these)h(phenomena.)390 1926 y Fi(bzip2)g Fj(usually)i(allo)s(cates)i
7618 -(sev)m(eral)f(megab)m(ytes)g(of)f(memory)g(to)h(op)s(erate)g(in,)f(and)
7619 -f(then)390 2030 y(c)m(harges)37 b(all)f(o)m(v)m(er)h(it)f(in)f(a)h
7620 -(fairly)g(random)f(fashion.)55 b(This)36 b(means)f(that)h(p)s
7621 -(erformance,)390 2133 y(b)s(oth)f(for)g(compressing)h(and)e
7622 -(decompressing,)j(is)f(largely)g(determined)g(b)m(y)f(the)h(sp)s(eed)
7623 -390 2237 y(at)27 b(whic)m(h)e(y)m(our)h(mac)m(hine)h(can)f(service)h
7624 -(cac)m(he)g(misses.)39 b(Because)27 b(of)f(this,)h(small)f(c)m(hanges)
7625 -390 2341 y(to)31 b(the)f(co)s(de)h(to)g(reduce)f(the)h(miss)e(rate)i
7626 -(ha)m(v)m(e)g(b)s(een)f(observ)m(ed)h(to)g(giv)m(e)g(disprop)s(ortion-)
7627 -390 2445 y(ately)i(large)h(p)s(erformance)e(impro)m(v)m(emen)m(ts.)47
7628 -b(I)33 b(imagine)g Fi(bzip2)d Fj(will)j(p)s(erform)e(b)s(est)h(on)390
7629 -2548 y(mac)m(hines)f(with)f(v)m(ery)h(large)g(cac)m(hes.)390
7630 -2856 y Fe(CA)-14 b(VEA)k(TS)390 3043 y Fj(I/O)45 b(error)f(messages)h
7631 -(are)f(not)h(as)f(helpful)f(as)h(they)g(could)g(b)s(e.)81
7632 -b Fi(bzip2)43 b Fj(tries)i(hard)390 3147 y(to)37 b(detect)g(I/O)f
7633 -(errors)h(and)d(exit)j(cleanly)-8 b(,)39 b(but)c(the)h(details)h(of)f
7634 -(what)f(the)h(problem)g(is)390 3251 y(sometimes)c(seem)e(rather)h
7635 -(misleading.)390 3402 y(This)c(man)m(ual)f(page)i(p)s(ertains)e(to)i(v)
7636 -m(ersion)g(1.0.2)h(of)e Fi(bzip2)p Fj(.)38 b(Compressed)26
7637 -b(data)i(created)390 3505 y(b)m(y)22 b(this)h(v)m(ersion)g(is)f(en)m
7638 -(tirely)i(forw)m(ards)f(and)e(bac)m(kw)m(ards)i(compatible)g(with)f
7639 -(the)h(previous)390 3609 y(public)g(releases,)k(v)m(ersions)d(0.1pl2,)i
7640 -(0.9.0,)h(0.9.5,)g(1.0.0)f(and)d(1.0.1,)k(but)c(with)g(the)h(follo)m
7641 -(w-)390 3713 y(ing)h(exception:)39 b(0.9.0)27 b(and)c(ab)s(o)m(v)m(e)j
7642 -(can)f(correctly)i(decompress)d(m)m(ultiple)i(concatenated)390
7643 -3817 y(compressed)36 b(\014les.)59 b(0.1pl2)37 b(cannot)g(do)f(this;)k
7644 -(it)d(will)f(stop)h(after)g(decompressing)f(just)390
7645 -3921 y(the)31 b(\014rst)f(\014le)g(in)g(the)h(stream.)390
7646 -4072 y Fi(bzip2recover)19 b Fj(v)m(ersions)j(prior)g(to)h(this)f(one,)i
7647 -(1.0.2,)h(used)c(32-bit)j(in)m(tegers)f(to)g(represen)m(t)390
7648 -4175 y(bit)32 b(p)s(ositions)g(in)f(compressed)h(\014les,)g(so)g(it)g
7649 -(could)g(not)g(handle)f(compressed)h(\014les)f(more)390
7650 -4279 y(than)39 b(512)h(megab)m(ytes)h(long.)68 b(V)-8
7651 -b(ersion)39 b(1.0.2)i(and)d(ab)s(o)m(v)m(e)j(uses)d(64-bit)j(in)m(ts)e
7652 -(on)h(some)390 4383 y(platforms)e(whic)m(h)g(supp)s(ort)f(them)i(\(GNU)
7653 -g(supp)s(orted)e(targets,)42 b(and)c(Windo)m(ws\).)64
7654 -b(T)-8 b(o)390 4487 y(establish)27 b(whether)g(or)f(not)i
7655 -Fi(bzip2recover)23 b Fj(w)m(as)k(built)f(with)h(suc)m(h)f(a)h
7656 -(limitation,)j(run)25 b(it)390 4591 y(without)33 b(argumen)m(ts.)50
7657 -b(In)33 b(an)m(y)g(ev)m(en)m(t)i(y)m(ou)e(can)h(build)e(y)m(ourself)h
7658 -(an)g(unlimited)g(v)m(ersion)390 4694 y(if)28 b(y)m(ou)h(can)g
7659 -(recompile)h(it)f(with)f Fi(MaybeUInt64)e Fj(set)j(to)g(b)s(e)f(an)g
7660 -(unsigned)g(64-bit)i(in)m(teger.)390 5002 y Fe(A)m(UTHOR)390
7661 -5189 y Fj(Julian)g(Sew)m(ard,)g Fi(jseward@acm.org)p
7662 -Fj(.)390 5340 y Fi(http://sources.redhat.co)o(m/bz)o(ip2)p
7663 -eop
7664 -%%Page: 9 10
7665 -9 9 bop 150 -116 a Fl(Chapter)30 b(2:)41 b(Ho)m(w)31
7666 -b(to)g(use)f Fi(bzip2)2375 b Fl(9)390 299 y Fj(The)22
7667 -b(ideas)h(em)m(b)s(o)s(died)f(in)g Fi(bzip2)f Fj(are)i(due)e(to)j(\(at)
7668 -f(least\))h(the)f(follo)m(wing)g(p)s(eople:)37 b(Mic)m(hael)390
7669 -403 y(Burro)m(ws)45 b(and)g(Da)m(vid)h(Wheeler)g(\(for)g(the)g(blo)s(c)
7670 -m(k)h(sorting)f(transformation\),)51 b(Da)m(vid)390 506
7671 -y(Wheeler)42 b(\(again,)j(for)c(the)h(Hu\013man)e(co)s(der\),)45
7672 -b(P)m(eter)e(F)-8 b(en)m(wic)m(k)43 b(\(for)e(the)h(structured)390
7673 -610 y(co)s(ding)34 b(mo)s(del)h(in)f(the)g(original)i
7674 -Fi(bzip)p Fj(,)e(and)g(man)m(y)g(re\014nemen)m(ts\),)i(and)e(Alistair)h
7675 -(Mof-)390 714 y(fat,)45 b(Radford)d(Neal)g(and)f(Ian)h(Witten)h(\(for)f
7676 -(the)h(arithmetic)g(co)s(der)f(in)g(the)g(original)390
7677 -818 y Fi(bzip)p Fj(\).)d(I)26 b(am)h(m)m(uc)m(h)g(indebted)f(for)h
7678 -(their)g(help,)g(supp)s(ort)e(and)h(advice.)40 b(See)27
7679 -b(the)g(man)m(ual)390 922 y(in)k(the)h(source)f(distribution)h(for)f(p)
7680 -s(oin)m(ters)h(to)g(sources)f(of)h(do)s(cumen)m(tation.)44
7681 -b(Christian)390 1025 y(v)m(on)27 b(Ro)s(ques)f(encouraged)g(me)h(to)g
7682 -(lo)s(ok)g(for)f(faster)h(sorting)g(algorithms,)h(so)e(as)h(to)g(sp)s
7683 -(eed)390 1129 y(up)32 b(compression.)50 b(Bela)34 b(Lubkin)d
7684 -(encouraged)j(me)g(to)g(impro)m(v)m(e)g(the)g(w)m(orst-case)h(com-)390
7685 -1233 y(pression)e(p)s(erformance.)51 b(The)34 b Fi(bz*)f
7686 -Fj(scripts)h(are)g(deriv)m(ed)g(from)g(those)g(of)g(GNU)h
7687 -Fi(gzip)p Fj(.)390 1337 y(Man)m(y)40 b(p)s(eople)f(sen)m(t)h(patc)m
7688 -(hes,)i(help)s(ed)c(with)h(p)s(ortabilit)m(y)i(problems,)g(len)m(t)f
7689 -(mac)m(hines,)390 1440 y(ga)m(v)m(e)32 b(advice)f(and)f(w)m(ere)h
7690 -(generally)h(helpful.)p eop
7691 -%%Page: 10 11
7692 -10 10 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29
7693 -b(with)g Fi(libbzip2)1881 b Fl(10)150 299 y Fg(3)80 b(Programming)53
7694 -b(with)h Ff(libbzip2)150 568 y Fj(This)30 b(c)m(hapter)h(describ)s(es)f
7695 -(the)h(programming)f(in)m(terface)i(to)g Fi(libbzip2)p
7696 -Fj(.)150 725 y(F)-8 b(or)33 b(general)g(bac)m(kground)f(information,)h
7697 -(particularly)f(ab)s(out)g(memory)g(use)g(and)f(p)s(erformance)h(as-)
7698 -150 834 y(p)s(ects,)f(y)m(ou'd)f(b)s(e)g(w)m(ell)h(advised)f(to)i(read)
7699 -e(Chapter)g(2)h(as)f(w)m(ell.)150 1124 y Fk(3.1)68 b(T)-11
7700 -b(op-lev)l(el)46 b(structure)150 1316 y Fi(libbzip2)32
7701 -b Fj(is)i(a)g(\015exible)h(library)f(for)g(compressing)g(and)g
7702 -(decompressing)g(data)h(in)e(the)i Fi(bzip2)e Fj(data)150
7703 -1426 y(format.)38 b(Although)22 b(pac)m(k)-5 b(aged)24
7704 -b(as)e(a)g(single)h(en)m(tit)m(y)-8 b(,)26 b(it)d(helps)f(to)h(regard)f
7705 -(the)h(library)f(as)g(three)h(separate)150 1535 y(parts:)41
7706 -b(the)30 b(lo)m(w)h(lev)m(el)i(in)m(terface,)f(and)d(the)i(high)f(lev)m
7707 -(el)i(in)m(terface,)h(and)c(some)i(utilit)m(y)h(functions.)150
7708 -1692 y(The)37 b(structure)g(of)g Fi(libbzip2)p Fj('s)e(in)m(terfaces)j
7709 -(is)f(similar)g(to)h(that)f(of)g(Jean-loup)g(Gailly's)i(and)d(Mark)150
7710 -1802 y(Adler's)30 b(excellen)m(t)j Fi(zlib)c Fj(library)-8
7711 -b(.)150 1959 y(All)29 b(externally)h(visible)g(sym)m(b)s(ols)e(ha)m(v)m
7712 -(e)i(names)f(b)s(eginning)f Fi(BZ2_)p Fj(.)39 b(This)29
7713 -b(is)g(new)f(in)h(v)m(ersion)h(1.0.)41 b(The)150 2068
7714 -y(in)m(ten)m(tion)32 b(is)f(to)g(minimise)f(p)s(ollution)h(of)f(the)h
7715 -(namespaces)f(of)h(library)f(clien)m(ts.)150 2321 y Fe(3.1.1)63
7716 -b(Lo)m(w-lev)m(el)39 b(summary)150 2514 y Fj(This)52
7717 -b(in)m(terface)i(pro)m(vides)e(services)h(for)f(compressing)g(and)g
7718 -(decompressing)g(data)g(in)g(memory)-8 b(.)150 2623 y(There's)42
7719 -b(no)g(pro)m(vision)g(for)g(dealing)g(with)f(\014les,)k(streams)d(or)g
7720 -(an)m(y)g(other)g(I/O)h(mec)m(hanisms,)h(just)150 2733
7721 -y(straigh)m(t)51 b(memory-to-memory)g(w)m(ork.)98 b(In)48
7722 -b(fact,)55 b(this)49 b(part)h(of)f(the)h(library)f(can)g(b)s(e)f
7723 -(compiled)150 2843 y(without)31 b(inclusion)f(of)g Fi(stdio.h)p
7724 -Fj(,)f(whic)m(h)h(ma)m(y)h(b)s(e)f(helpful)f(for)i(em)m(b)s(edded)e
7725 -(applications.)150 2999 y(The)h(lo)m(w-lev)m(el)k(part)c(of)h(the)f
7726 -(library)g(has)g(no)h(global)g(v)-5 b(ariables)31 b(and)e(is)i
7727 -(therefore)g(thread-safe.)150 3156 y(Six)26 b(routines)h(mak)m(e)h(up)e
7728 -(the)h(lo)m(w)g(lev)m(el)i(in)m(terface:)41 b Fi(BZ2_bzCompressInit)p
7729 -Fj(,)22 b Fi(BZ2_bzCompress)p Fj(,)i(and)150 3266 y Fi
7730 -(BZ2_bzCompressEnd)i Fj(for)k(compression,)h(and)f(a)g(corresp)s
7731 -(onding)g(trio)h Fi(BZ2_bzDecompressInit)p Fj(,)150 3375
7732 -y Fi(BZ2_bzDecompress)36 b Fj(and)j Fi(BZ2_bzDecompressEnd)c
7733 -Fj(for)41 b(decompression.)70 b(The)40 b Fi(*Init)f Fj(functions)150
7734 -3485 y(allo)s(cate)k(memory)e(for)g(compression/decompression)h(and)e
7735 -(do)h(other)h(initialisations,)k(whilst)41 b(the)150
7736 -3595 y Fi(*End)29 b Fj(functions)h(close)i(do)m(wn)e(op)s(erations)h
7737 -(and)e(release)j(memory)-8 b(.)150 3751 y(The)35 b(real)h(w)m(ork)f(is)
7738 -g(done)g(b)m(y)g Fi(BZ2_bzCompress)d Fj(and)i Fi(BZ2_bzDecompress)p
7739 -Fj(.)50 b(These)36 b(compress)f(and)150 3861 y(decompress)28
7740 -b(data)g(from)f(a)h(user-supplied)e(input)h(bu\013er)g(to)h(a)g
7741 -(user-supplied)e(output)i(bu\013er.)39 b(These)150 3971
7742 -y(bu\013ers)31 b(can)g(b)s(e)g(an)m(y)h(size;)h(arbitrary)f(quan)m
7743 -(tities)h(of)f(data)g(are)g(handled)e(b)m(y)i(making)f(rep)s(eated)h
7744 -(calls)150 4080 y(to)g(these)g(functions.)43 b(This)31
7745 -b(is)g(a)h(\015exible)f(mec)m(hanism)h(allo)m(wing)g(a)g(consumer-pull)
7746 -f(st)m(yle)h(of)g(activit)m(y)-8 b(,)150 4190 y(or)31
7747 -b(pro)s(ducer-push,)d(or)j(a)f(mixture)h(of)f(b)s(oth.)150
7748 -4443 y Fe(3.1.2)63 b(High-lev)m(el)41 b(summary)150 4635
7749 -y Fj(This)c(in)m(terface)i(pro)m(vides)e(some)h(handy)e(wrapp)s(ers)f
7750 -(around)i(the)g(lo)m(w-lev)m(el)j(in)m(terface)f(to)f(facilitate)150
7751 -4745 y(reading)25 b(and)f(writing)h Fi(bzip2)f Fj(format)h(\014les)g
7752 -(\()p Fi(.bz2)f Fj(\014les\).)39 b(The)25 b(routines)h(pro)m(vide)f(ho)
7753 -s(oks)g(to)g(facilitate)150 4854 y(reading)42 b(\014les)f(in)g(whic)m
7754 -(h)h(the)g Fi(bzip2)e Fj(data)i(stream)g(is)f(em)m(b)s(edded)g(within)g
7755 -(some)h(larger-scale)i(\014le)150 4964 y(structure,)31
7756 -b(or)g(where)f(there)h(are)g(m)m(ultiple)g Fi(bzip2)e
7757 -Fj(data)h(streams)h(concatenated)i(end-to-end.)150 5121
7758 -y(F)-8 b(or)31 b(reading)g(\014les,)f Fi(BZ2_bzReadOpen)p
7759 -Fj(,)d Fi(BZ2_bzRead)p Fj(,)h Fi(BZ2_bzReadClose)e Fj(and)150
7760 -5230 y Fi(BZ2_bzReadGetUnused)18 b Fj(are)23 b(supplied.)37
7761 -b(F)-8 b(or)24 b(writing)f(\014les,)i Fi(BZ2_bzWriteOpen)p
7762 -Fj(,)20 b Fi(BZ2_bzWrite)g Fj(and)150 5340 y Fi(BZ2_bzWriteFinish)26
7763 -b Fj(are)k(a)m(v)-5 b(ailable.)p eop
7764 -%%Page: 11 12
7765 -11 11 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29
7766 -b(with)g Fi(libbzip2)1881 b Fl(11)150 299 y Fj(As)32
7767 -b(with)h(the)g(lo)m(w-lev)m(el)j(library)-8 b(,)33 b(no)g(global)h(v)-5
7768 -b(ariables)33 b(are)g(used)f(so)h(the)g(library)g(is)g(p)s(er)f(se)h
7769 -(thread-)150 408 y(safe.)62 b(Ho)m(w)m(ev)m(er,)41 b(if)c(I/O)h(errors)
7770 -g(o)s(ccur)f(whilst)g(reading)h(or)f(writing)h(the)f(underlying)g
7771 -(compressed)150 518 y(\014les,)j(y)m(ou)e(ma)m(y)h(ha)m(v)m(e)f(to)h
7772 -(consult)g Fi(errno)d Fj(to)j(determine)f(the)h(cause)f(of)g(the)g
7773 -(error.)64 b(In)37 b(that)i(case,)150 628 y(y)m(ou'd)30
7774 -b(need)h(a)f(C)g(library)g(whic)m(h)g(correctly)j(supp)s(orts)c
7775 -Fi(errno)g Fj(in)h(a)g(m)m(ultithreaded)h(en)m(vironmen)m(t.)150
7776 -784 y(T)-8 b(o)77 b(mak)m(e)f(the)g(library)g(a)f(little)j(simpler)e
7777 -(and)e(more)j(p)s(ortable,)87 b Fi(BZ2_bzReadOpen)72
7778 -b Fj(and)150 894 y Fi(BZ2_bzWriteOpen)34 b Fj(require)39
7779 -b(y)m(ou)g(to)g(pass)f(them)h(\014le)f(handles)g(\()p
7780 -Fi(FILE*)p Fj(s\))f(whic)m(h)h(ha)m(v)m(e)i(previously)150
7781 -1004 y(b)s(een)56 b(op)s(ened)g(for)h(reading)f(or)h(writing)g(resp)s
7782 -(ectiv)m(ely)-8 b(.)122 b(That)57 b(a)m(v)m(oids)h(p)s(ortabilit)m(y)f
7783 -(problems)150 1113 y(asso)s(ciated)33 b(with)g(\014le)f(op)s(erations)h
7784 -(and)e(\014le)i(attributes,)h(whilst)e(not)h(b)s(eing)f(m)m(uc)m(h)g
7785 -(of)h(an)f(imp)s(osition)150 1223 y(on)e(the)h(programmer.)150
7786 -1474 y Fe(3.1.3)63 b(Utilit)m(y)40 b(functions)h(summary)150
7787 -1666 y Fj(F)-8 b(or)43 b(v)m(ery)h(simple)e(needs,)k
7788 -Fi(BZ2_bzBuffToBuffCompres)o(s)36 b Fj(and)42 b Fi
7789 -(BZ2_bzBuffToBuffDecompres)o(s)150 1776 y Fj(are)26 b(pro)m(vided.)39
7790 -b(These)26 b(compress)f(data)h(in)f(memory)h(from)f(one)h(bu\013er)f
7791 -(to)h(another)g(bu\013er)f(in)g(a)g(single)150 1885 y(function)37
7792 -b(call.)62 b(Y)-8 b(ou)38 b(should)e(assess)h(whether)g(these)h
7793 -(functions)f(ful\014ll)f(y)m(our)i(memory-to-memory)150
7794 -1995 y(compression/decompression)22 b(requiremen)m(ts)g(b)s(efore)f(in)
7795 -m(v)m(esting)i(e\013ort)f(in)f(understanding)f(the)h(more)150
7796 -2105 y(general)31 b(but)f(more)h(complex)g(lo)m(w-lev)m(el)i(in)m
7797 -(terface.)150 2261 y(Y)-8 b(oshiok)j(a)47 b(Tsuneo)g(\()p
7798 -Fi(QWF00133@niftyserve.or.jp)40 b Fj(/)47 b Fi
7799 -(tsuneo-y@is.aist-nara.ac)o(.jp)p Fj(\))40 b(has)150
7800 -2371 y(con)m(tributed)f(some)f(functions)g(to)h(giv)m(e)h(b)s(etter)e
7801 -Fi(zlib)f Fj(compatibilit)m(y)-8 b(.)67 b(These)38 b(functions)g(are)g
7802 -Fi(BZ2_)150 2481 y(bzopen)p Fj(,)g Fi(BZ2_bzread)p Fj(,)f
7803 -Fi(BZ2_bzwrite)p Fj(,)g Fi(BZ2_bzflush)p Fj(,)g Fi(BZ2_bzclose)p
7804 -Fj(,)g Fi(BZ2_bzerror)e Fj(and)i Fi(BZ2_)150 2590 y(bzlibVersion)p
7805 -Fj(.)44 b(Y)-8 b(ou)33 b(ma)m(y)g(\014nd)e(these)i(functions)g(more)g
7806 -(con)m(v)m(enien)m(t)i(for)e(simple)f(\014le)h(reading)g(and)150
7807 -2700 y(writing,)d(than)g(those)g(in)f(the)h(high-lev)m(el)i(in)m
7808 -(terface.)42 b(These)30 b(functions)f(are)h(not)g(\(y)m(et\))i
7809 -(o\016cially)f(part)150 2809 y(of)h(the)g(library)-8
7810 -b(,)33 b(and)e(are)h(minimally)g(do)s(cumen)m(ted)g(here.)45
7811 -b(If)31 b(they)h(break,)h(y)m(ou)f(get)h(to)g(k)m(eep)f(all)h(the)150
7812 -2919 y(pieces.)42 b(I)30 b(hop)s(e)g(to)h(do)s(cumen)m(t)f(them)h(prop)
7813 -s(erly)e(when)h(time)h(p)s(ermits.)150 3076 y(Y)-8 b(oshiok)j(a)27
7814 -b(also)g(con)m(tributed)g(mo)s(di\014cations)g(to)g(allo)m(w)h(the)e
7815 -(library)h(to)g(b)s(e)f(built)g(as)g(a)h(Windo)m(ws)f(DLL.)150
7816 -3362 y Fk(3.2)68 b(Error)45 b(handling)150 3554 y Fj(The)22
7817 -b(library)g(is)g(designed)g(to)i(reco)m(v)m(er)g(cleanly)f(in)f(all)h
7818 -(situations,)i(including)c(the)i(w)m(orst-case)h(situation)150
7819 -3664 y(of)k(decompressing)g(random)f(data.)40 b(I'm)27
7820 -b(not)h(100\045)h(sure)e(that)i(it)f(can)g(alw)m(a)m(ys)g(do)g(this,)g
7821 -(so)g(y)m(ou)g(migh)m(t)150 3774 y(w)m(an)m(t)i(to)g(add)e(a)i(signal)f
7822 -(handler)g(to)h(catc)m(h)g(segmen)m(tation)i(violations)f(during)d
7823 -(decompression)h(if)h(y)m(ou)150 3883 y(are)c(feeling)g(esp)s(ecially)g
7824 -(paranoid.)39 b(I)25 b(w)m(ould)g(b)s(e)g(in)m(terested)i(in)e(hearing)
7825 -g(more)h(ab)s(out)f(the)h(robustness)150 3993 y(of)31
7826 -b(the)f(library)h(to)g(corrupted)f(compressed)g(data.)150
7827 -4150 y(V)-8 b(ersion)38 b(1.0)h(is)e(m)m(uc)m(h)h(more)g(robust)f(in)g
7828 -(this)h(resp)s(ect)g(than)f(0.9.0)i(or)f(0.9.5.)64 b(In)m(v)m
7829 -(estigations)40 b(with)150 4259 y(Chec)m(k)m(er)30 b(\(a)f(to)s(ol)h
7830 -(for)f(detecting)h(problems)f(with)f(memory)h(managemen)m(t,)i(similar)
7831 -e(to)h(Purify\))e(indi-)150 4369 y(cate)34 b(that,)g(at)f(least)g(for)g
7832 -(the)g(few)f(\014les)g(I)h(tested,)h(all)f(single-bit)h(errors)e(in)g
7833 -(the)h(decompressed)g(data)150 4478 y(are)28 b(caugh)m(t)h(prop)s(erly)
7834 --8 b(,)29 b(with)f(no)g(segmen)m(tation)i(faults,)f(no)f(reads)g(of)g
7835 -(uninitialised)g(data)g(and)g(no)g(out)150 4588 y(of)j(range)h(reads)f
7836 -(or)h(writes.)44 b(So)31 b(it's)h(certainly)h(m)m(uc)m(h)e(impro)m(v)m
7837 -(ed,)i(although)e(I)h(w)m(ouldn't)f(claim)h(it)g(to)150
7838 -4698 y(b)s(e)e(totally)i(b)s(om)m(bpro)s(of.)150 4854
7839 -y(The)24 b(\014le)g Fi(bzlib.h)e Fj(con)m(tains)j(all)f(de\014nitions)g
7840 -(needed)g(to)g(use)g(the)g(library)-8 b(.)39 b(In)24
7841 -b(particular,)i(y)m(ou)e(should)150 4964 y(de\014nitely)31
7842 -b(not)f(include)h Fi(bzlib_private.h)p Fj(.)150 5121
7843 -y(In)38 b Fi(bzlib.h)p Fj(,)g(the)g(v)-5 b(arious)38
7844 -b(return)g(v)-5 b(alues)38 b(are)g(de\014ned.)62 b(The)38
7845 -b(follo)m(wing)i(list)f(is)f(not)g(in)m(tended)g(as)150
7846 -5230 y(an)33 b(exhaustiv)m(e)h(description)g(of)g(the)g(circumstances)g
7847 -(in)f(whic)m(h)g(a)h(giv)m(en)g(v)-5 b(alue)34 b(ma)m(y)g(b)s(e)f
7848 -(returned)g({)150 5340 y(those)h(descriptions)f(are)h(giv)m(en)g
7849 -(later.)50 b(Rather,)34 b(it)g(is)f(in)m(tended)g(to)h(con)m(v)m(ey)h
7850 -(the)e(rough)g(meaning)g(of)p eop
7851 -%%Page: 12 13
7852 -12 12 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29
7853 -b(with)g Fi(libbzip2)1881 b Fl(12)150 299 y Fj(eac)m(h)35
7854 -b(return)f(v)-5 b(alue.)53 b(The)34 b(\014rst)g(\014v)m(e)h(actions)g
7855 -(are)g(normal)f(and)f(not)i(in)m(tended)f(to)i(denote)f(an)e(error)150
7856 -408 y(situation.)150 592 y Fi(BZ_OK)240 b Fj(The)30 b(requested)h
7857 -(action)h(w)m(as)e(completed)i(successfully)-8 b(.)150
7858 -756 y Fi(BZ_RUN_OK)150 866 y(BZ_FLUSH_OK)150 975 y(BZ_FINISH_OK)630
7859 -1085 y Fj(In)22 b Fi(BZ2_bzCompress)p Fj(,)e(the)j(requested)g
7860 -(\015ush/\014nish/nothing-sp)s(ecial)e(action)j(w)m(as)e(com-)630
7861 -1194 y(pleted)31 b(successfully)-8 b(.)150 1358 y Fi(BZ_STREAM_END)630
7862 -1468 y Fj(Compression)38 b(of)g(data)h(w)m(as)f(completed,)j(or)e(the)f
7863 -(logical)j(stream)e(end)e(w)m(as)h(detected)630 1577
7864 -y(during)29 b(decompression.)150 1761 y(The)h(follo)m(wing)i(return)e
7865 -(v)-5 b(alues)31 b(indicate)g(an)f(error)h(of)f(some)h(kind.)150
7866 -1945 y Fi(BZ_CONFIG_ERROR)630 2055 y Fj(Indicates)46
7867 -b(that)h(the)f(library)f(has)h(b)s(een)f(improp)s(erly)g(compiled)h(on)
7868 -g(y)m(our)g(platform)630 2164 y({)k(a)h(ma)5 b(jor)50
7869 -b(con\014guration)h(error.)100 b(Sp)s(eci\014cally)-8
7870 -b(,)56 b(it)51 b(means)e(that)i Fi(sizeof\(char\))p Fj(,)630
7871 -2274 y Fi(sizeof\(short\))43 b Fj(and)i Fi(sizeof\(int\))e
7872 -Fj(are)k(not)g(1,)k(2)46 b(and)g(4)h(resp)s(ectiv)m(ely)-8
7873 -b(,)52 b(as)47 b(they)630 2384 y(should)26 b(b)s(e.)38
7874 -b(Note)29 b(that)e(the)g(library)f(should)g(still)h(w)m(ork)g(prop)s
7875 -(erly)f(on)h(64-bit)h(platforms)630 2493 y(whic)m(h)43
7876 -b(follo)m(w)h(the)g(LP64)f(programming)h(mo)s(del)e({)i(that)g(is,)i
7877 -(where)d Fi(sizeof\(long\))630 2603 y Fj(and)32 b Fi(sizeof\(void*\))e
7878 -Fj(are)j(8.)50 b(Under)32 b(LP64,)j Fi(sizeof\(int\))30
7879 -b Fj(is)j(still)h(4,)h(so)e Fi(libbzip2)p Fj(,)630 2712
7880 -y(whic)m(h)d(do)s(esn't)g(use)h(the)f Fi(long)f Fj(t)m(yp)s(e,)i(is)g
7881 -(OK.)150 2876 y Fi(BZ_SEQUENCE_ERROR)630 2986 y Fj(When)41
7882 -b(using)g(the)h(library)-8 b(,)45 b(it)d(is)g(imp)s(ortan)m(t)g(to)g
7883 -(call)h(the)f(functions)f(in)g(the)h(correct)630 3095
7884 -y(sequence)25 b(and)f(with)g(data)h(structures)g(\(bu\013ers)f(etc\))i
7885 -(in)f(the)g(correct)h(states.)40 b Fi(libbzip2)630 3205
7886 -y Fj(c)m(hec)m(ks)25 b(as)e(m)m(uc)m(h)g(as)g(it)h(can)f(to)h(ensure)f
7887 -(this)g(is)g(happ)s(ening,)g(and)g(returns)f Fi(BZ_SEQUENCE_)630
7888 -3314 y(ERROR)35 b Fj(if)i(not.)59 b(Co)s(de)36 b(whic)m(h)h(complies)g
7889 -(precisely)h(with)e(the)h(function)f(seman)m(tics,)k(as)630
7890 -3424 y(detailed)c(b)s(elo)m(w,)h(should)e(nev)m(er)g(receiv)m(e)j(this)
7891 -d(v)-5 b(alue;)38 b(suc)m(h)d(an)g(ev)m(en)m(t)i(denotes)f(buggy)630
7892 -3534 y(co)s(de)31 b(whic)m(h)f(y)m(ou)g(should)g(in)m(v)m(estigate.)150
7893 -3697 y Fi(BZ_PARAM_ERROR)630 3807 y Fj(Returned)41 b(when)f(a)h
7894 -(parameter)h(to)g(a)g(function)f(call)h(is)f(out)h(of)f(range)h(or)f
7895 -(otherwise)630 3917 y(manifestly)35 b(incorrect.)55 b(As)34
7896 -b(with)g Fi(BZ_SEQUENCE_ERROR)p Fj(,)d(this)k(denotes)g(a)f(bug)g(in)h
7897 -(the)630 4026 y(clien)m(t)24 b(co)s(de.)38 b(The)22 b(distinction)h(b)s
7898 -(et)m(w)m(een)f Fi(BZ_PARAM_ERROR)d Fj(and)i Fi(BZ_SEQUENCE_ERROR)630
7899 -4136 y Fj(is)30 b(a)h(bit)f(hazy)-8 b(,)32 b(but)d(still)j(w)m(orth)e
7900 -(making.)150 4300 y Fi(BZ_MEM_ERROR)630 4409 y Fj(Returned)44
7901 -b(when)g(a)h(request)g(to)g(allo)s(cate)i(memory)e(failed.)83
7902 -b(Note)46 b(that)g(the)f(quan-)630 4519 y(tit)m(y)d(of)f(memory)f
7903 -(needed)g(to)i(decompress)e(a)g(stream)h(cannot)g(b)s(e)f(determined)h
7904 -(un)m(til)630 4628 y(the)f(stream's)h(header)e(has)h(b)s(een)f(read.)69
7905 -b(So)39 b Fi(BZ2_bzDecompress)d Fj(and)j Fi(BZ2_bzRead)630
7906 -4738 y Fj(ma)m(y)29 b(return)f Fi(BZ_MEM_ERROR)d Fj(ev)m(en)30
7907 -b(though)e(some)h(of)g(the)g(compressed)g(data)g(has)f(b)s(een)630
7908 -4847 y(read.)76 b(The)42 b(same)g(is)g(not)g(true)g(for)h(compression;)
7909 -48 b(once)43 b Fi(BZ2_bzCompressInit)37 b Fj(or)630 4957
7910 -y Fi(BZ2_bzWriteOpen)26 b Fj(ha)m(v)m(e)32 b(successfully)e(completed,)
7911 -i Fi(BZ_MEM_ERROR)27 b Fj(cannot)k(o)s(ccur.)150 5121
7912 -y Fi(BZ_DATA_ERROR)630 5230 y Fj(Returned)d(when)g(a)h(data)g(in)m
7913 -(tegrit)m(y)i(error)e(is)g(detected)h(during)d(decompression.)41
7914 -b(Most)630 5340 y(imp)s(ortan)m(tly)-8 b(,)32 b(this)e(means)g(when)f
7915 -(stored)i(and)e(computed)h(CR)m(Cs)g(for)g(the)h(data)f(do)h(not)p
7916 -eop
7917 -%%Page: 13 14
7918 -13 13 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29
7919 -b(with)g Fi(libbzip2)1881 b Fl(13)630 299 y Fj(matc)m(h.)41
7920 -b(This)28 b(v)-5 b(alue)28 b(is)h(also)g(returned)e(up)s(on)g
7921 -(detection)j(of)f(an)m(y)f(other)h(anomaly)g(in)f(the)630
7922 -408 y(compressed)i(data.)150 560 y Fi(BZ_DATA_ERROR_MAGIC)630
7923 -670 y Fj(As)j(a)g(sp)s(ecial)g(case)h(of)f Fi(BZ_DATA_ERROR)p
7924 -Fj(,)d(it)k(is)f(sometimes)h(useful)f(to)h(kno)m(w)f(when)f(the)630
7925 -779 y(compressed)c(stream)g(do)s(es)g(not)g(start)g(with)g(the)g
7926 -(correct)i(magic)e(b)m(ytes)h(\()p Fi('B')h('Z')f('h')p
7927 -Fj(\).)150 931 y Fi(BZ_IO_ERROR)630 1040 y Fj(Returned)h(b)m(y)h
7928 -Fi(BZ2_bzRead)d Fj(and)h Fi(BZ2_bzWrite)f Fj(when)i(there)h(is)g(an)f
7929 -(error)h(reading)g(or)630 1150 y(writing)e(in)f(the)h(compressed)g
7930 -(\014le,)g(and)f(b)m(y)h Fi(BZ2_bzReadOpen)24 b Fj(and)k
7931 -Fi(BZ2_bzWriteOpen)630 1259 y Fj(for)h(attempts)i(to)f(use)f(a)h
7932 -(\014le)f(for)h(whic)m(h)f(the)h(error)f(indicator)i(\(viz,)f
7933 -Fi(ferror\(f\))p Fj(\))e(is)h(set.)630 1369 y(On)h(receipt)i(of)f
7934 -Fi(BZ_IO_ERROR)p Fj(,)c(the)k(caller)h(should)e(consult)h
7935 -Fi(errno)e Fj(and/or)h Fi(perror)f Fj(to)630 1479 y(acquire)i(op)s
7936 -(erating-system)h(sp)s(eci\014c)e(information)h(ab)s(out)f(the)g
7937 -(problem.)150 1630 y Fi(BZ_UNEXPECTED_EOF)630 1740 y
7938 -Fj(Returned)j(b)m(y)g Fi(BZ2_bzRead)e Fj(when)h(the)i(compressed)f
7939 -(\014le)h(\014nishes)e(b)s(efore)h(the)h(logical)630
7940 -1849 y(end)c(of)g(stream)h(is)g(detected.)150 2001 y
7941 -Fi(BZ_OUTBUFF_FULL)630 2110 y Fj(Returned)d(b)m(y)g Fi
7942 -(BZ2_bzBuffToBuffCompress)22 b Fj(and)27 b Fi
7943 -(BZ2_bzBuffToBuffDecompres)o(s)630 2220 y Fj(to)k(indicate)h(that)f
7944 -(the)f(output)g(data)h(will)g(not)g(\014t)f(in)m(to)h(the)g(output)f
7945 -(bu\013er)g(pro)m(vided.)150 2492 y Fk(3.3)68 b(Lo)l(w-lev)l(el)47
7946 -b(in)l(terface)150 2766 y Fe(3.3.1)63 b Fd(BZ2_bzCompressInit)390
7947 -2953 y Fi(typedef)533 3057 y(struct)46 b({)676 3161 y(char)h(*next_in;)
7948 -676 3264 y(unsigned)f(int)h(avail_in;)676 3368 y(unsigned)f(int)h
7949 -(total_in_lo32;)676 3472 y(unsigned)f(int)h(total_in_hi32;)676
7950 -3680 y(char)g(*next_out;)676 3783 y(unsigned)f(int)h(avail_out;)676
7951 -3887 y(unsigned)f(int)h(total_out_lo32;)676 3991 y(unsigned)f(int)h
7952 -(total_out_hi32;)676 4198 y(void)g(*state;)676 4406 y(void)g
7953 -(*\(*bzalloc\)\(void)c(*,int,int\);)676 4510 y(void)k
7954 -(\(*bzfree\)\(void)d(*,void)i(*\);)676 4614 y(void)h(*opaque;)533
7955 -4717 y(})533 4821 y(bz_stream;)390 5029 y(int)g(BZ2_bzCompressInit)c
7956 -(\()k(bz_stream)e(*strm,)1583 5132 y(int)i(blockSize100k,)1583
7957 -5236 y(int)g(verbosity,)1583 5340 y(int)g(workFactor)e(\);)p
7958 -eop
7959 -%%Page: 14 15
7960 -14 14 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29
7961 -b(with)g Fi(libbzip2)1881 b Fl(14)150 456 y Fj(Prepares)31
7962 -b(for)g(compression.)42 b(The)30 b Fi(bz_stream)e Fj(structure)j(holds)
7963 -g(all)g(data)g(p)s(ertaining)g(to)g(the)g(com-)150 565
7964 -y(pression)k(activit)m(y)-8 b(.)59 b(A)35 b Fi(bz_stream)d
7965 -Fj(structure)k(should)e(b)s(e)h(allo)s(cated)i(and)e(initialised)h
7966 -(prior)f(to)i(the)150 675 y(call.)65 b(The)38 b(\014elds)g(of)g
7967 -Fi(bz_stream)e Fj(comprise)i(the)h(en)m(tiret)m(y)h(of)f(the)f
7968 -(user-visible)h(data.)64 b Fi(state)37 b Fj(is)h(a)150
7969 -784 y(p)s(oin)m(ter)31 b(to)g(the)g(priv)-5 b(ate)31
7970 -b(data)f(structures)h(required)f(for)h(compression.)150
7971 -941 y(Custom)36 b(memory)g(allo)s(cators)i(are)f(supp)s(orted,)f(via)h
7972 -(\014elds)e Fi(bzalloc)p Fj(,)h Fi(bzfree)p Fj(,)g(and)g
7973 -Fi(opaque)p Fj(.)56 b(The)150 1051 y(v)-5 b(alue)32 b
7974 -Fi(opaque)e Fj(is)i(passed)f(to)i(as)f(the)g(\014rst)g(argumen)m(t)g
7975 -(to)h(all)f(calls)h(to)g Fi(bzalloc)d Fj(and)h Fi(bzfree)p
7976 -Fj(,)g(but)g(is)150 1160 y(otherwise)c(ignored)g(b)m(y)g(the)g(library)
7977 --8 b(.)39 b(The)27 b(call)g Fi(bzalloc)i(\()h(opaque,)e(n,)i(m)g(\))c
7978 -Fj(is)h(exp)s(ected)g(to)g(return)150 1270 y(a)h(p)s(oin)m(ter)g
7979 -Fi(p)f Fj(to)i Fi(n)h(*)g(m)d Fj(b)m(ytes)h(of)g(memory)-8
7980 -b(,)29 b(and)e Fi(bzfree)h(\()i(opaque,)f(p)h(\))d Fj(should)g(free)h
7981 -(that)g(memory)-8 b(.)150 1427 y(If)32 b(y)m(ou)h(don't)g(w)m(an)m(t)g
7982 -(to)h(use)e(a)h(custom)g(memory)g(allo)s(cator,)i(set)e
7983 -Fi(bzalloc)p Fj(,)f Fi(bzfree)e Fj(and)i Fi(opaque)f
7984 -Fj(to)150 1537 y Fi(NULL)p Fj(,)e(and)h(the)h(library)f(will)h(then)f
7985 -(use)g(the)h(standard)e Fi(malloc)p Fj(/)p Fi(free)f
7986 -Fj(routines.)150 1693 y(Before)37 b(calling)h Fi(BZ2_bzCompressInit)p
7987 -Fj(,)33 b(\014elds)k Fi(bzalloc)p Fj(,)f Fi(bzfree)f
7988 -Fj(and)h Fi(opaque)e Fj(should)i(b)s(e)g(\014lled)150
7989 -1803 y(appropriately)-8 b(,)35 b(as)e(just)f(describ)s(ed.)48
7990 -b(Up)s(on)31 b(return,)j(the)f(in)m(ternal)h(state)g(will)f(ha)m(v)m(e)
7991 -h(b)s(een)e(allo)s(cated)150 1913 y(and)43 b(initialised,)49
7992 -b(and)43 b Fi(total_in_lo32)p Fj(,)h Fi(total_in_hi32)p
7993 -Fj(,)g Fi(total_out_lo32)c Fj(and)j Fi(total_out_)150
7994 -2022 y(hi32)35 b Fj(will)i(ha)m(v)m(e)g(b)s(een)f(set)h(to)g(zero.)59
7995 -b(These)37 b(four)f(\014elds)f(are)i(used)f(b)m(y)g(the)g(library)h(to)
7996 -g(inform)f(the)150 2132 y(caller)41 b(of)e(the)h(total)h(amoun)m(t)f
7997 -(of)f(data)h(passed)e(in)m(to)j(and)d(out)i(of)f(the)h(library)-8
7998 -b(,)42 b(resp)s(ectiv)m(ely)-8 b(.)70 b(Y)-8 b(ou)150
7999 -2241 y(should)34 b(not)h(try)h(to)g(c)m(hange)g(them.)55
8000 -b(As)34 b(of)h(v)m(ersion)h(1.0,)i(64-bit)e(coun)m(ts)g(are)f(main)m
8001 -(tained,)i(ev)m(en)f(on)150 2351 y(32-bit)j(platforms,)g(using)e(the)h
8002 -Fi(_hi32)d Fj(\014elds)i(to)h(store)h(the)e(upp)s(er)f(32)i(bits)f(of)h
8003 -(the)f(coun)m(t.)63 b(So,)39 b(for)150 2460 y(example,)31
8004 -b(the)g(total)h(amoun)m(t)f(of)f(data)h(in)f(is)g Fi(\(total_in_hi32)d
8005 -(<<)j(32\))f(+)h(total_in_lo32)p Fj(.)150 2617 y(P)m(arameter)37
8006 -b Fi(blockSize100k)31 b Fj(sp)s(eci\014es)k(the)h(blo)s(c)m(k)g(size)g
8007 -(to)g(b)s(e)e(used)h(for)g(compression.)55 b(It)36 b(should)150
8008 -2727 y(b)s(e)27 b(a)h(v)-5 b(alue)28 b(b)s(et)m(w)m(een)g(1)g(and)f(9)h
8009 -(inclusiv)m(e,)i(and)c(the)i(actual)h(blo)s(c)m(k)f(size)h(used)e(is)g
8010 -(100000)k(x)c(this)h(\014gure.)150 2836 y(9)j(giv)m(es)h(the)e(b)s(est)
8011 -g(compression)h(but)f(tak)m(es)h(most)g(memory)-8 b(.)150
8012 -2993 y(P)m(arameter)28 b Fi(verbosity)c Fj(should)h(b)s(e)g(set)i(to)g
8013 -(a)g(n)m(um)m(b)s(er)e(b)s(et)m(w)m(een)i(0)f(and)g(4)g(inclusiv)m(e.)
8014 -41 b(0)26 b(is)g(silen)m(t,)j(and)150 3103 y(greater)d(n)m(um)m(b)s
8015 -(ers)e(giv)m(e)i(increasingly)g(v)m(erb)s(ose)f(monitoring/debugging)h
8016 -(output.)38 b(If)25 b(the)g(library)f(has)150 3212 y(b)s(een)30
8017 -b(compiled)h(with)f Fi(-DBZ_NO_STDIO)p Fj(,)d(no)j(suc)m(h)g(output)g
8018 -(will)h(app)s(ear)f(for)g(an)m(y)g(v)m(erb)s(osit)m(y)i(setting.)150
8019 -3369 y(P)m(arameter)g Fi(workFactor)c Fj(con)m(trols)k(ho)m(w)f(the)g
8020 -(compression)g(phase)f(b)s(eha)m(v)m(es)h(when)e(presen)m(ted)i(with)
8021 -150 3479 y(w)m(orst)38 b(case,)j(highly)c(rep)s(etitiv)m(e,)42
8022 -b(input)37 b(data.)62 b(If)38 b(compression)g(runs)e(in)m(to)i
8023 -(di\016culties)h(caused)e(b)m(y)150 3588 y(rep)s(etitiv)m(e)46
8024 -b(data,)i(the)c(library)f(switc)m(hes)i(from)f(the)g(standard)f
8025 -(sorting)h(algorithm)h(to)g(a)f(fallbac)m(k)150 3698
8026 -y(algorithm.)c(The)27 b(fallbac)m(k)g(is)f(slo)m(w)m(er)i(than)d(the)i
8027 -(standard)e(algorithm)j(b)m(y)e(p)s(erhaps)e(a)i(factor)i(of)e(three,)
8028 -150 3808 y(but)k(alw)m(a)m(ys)h(b)s(eha)m(v)m(es)g(reasonably)-8
8029 -b(,)31 b(no)f(matter)i(ho)m(w)e(bad)g(the)g(input.)150
8030 -3965 y(Lo)m(w)m(er)23 b(v)-5 b(alues)23 b(of)g Fi(workFactor)c
8031 -Fj(reduce)k(the)g(amoun)m(t)g(of)f(e\013ort)i(the)f(standard)f
8032 -(algorithm)h(will)g(exp)s(end)150 4074 y(b)s(efore)h(resorting)g(to)h
8033 -(the)f(fallbac)m(k.)39 b(Y)-8 b(ou)24 b(should)f(set)h(this)g
8034 -(parameter)g(carefully;)j(to)s(o)d(lo)m(w,)i(and)d(man)m(y)150
8035 -4184 y(inputs)32 b(will)h(b)s(e)f(handled)g(b)m(y)h(the)g(fallbac)m(k)g
8036 -(algorithm)h(and)e(so)h(compress)g(rather)g(slo)m(wly)-8
8037 -b(,)35 b(to)s(o)f(high,)150 4293 y(and)41 b(y)m(our)g(a)m(v)m
8038 -(erage-to-w)m(orst)46 b(case)d(compression)e(times)h(can)g(b)s(ecome)g
8039 -(v)m(ery)g(large.)74 b(The)42 b(default)150 4403 y(v)-5
8040 -b(alue)31 b(of)f(30)h(giv)m(es)h(reasonable)f(b)s(eha)m(viour)f(o)m(v)m
8041 -(er)i(a)f(wide)f(range)h(of)f(circumstances.)150 4560
8042 -y(Allo)m(w)m(able)j(v)-5 b(alues)31 b(range)g(from)g(0)g(to)h(250)g
8043 -(inclusiv)m(e.)44 b(0)31 b(is)g(a)g(sp)s(ecial)h(case,)g(equiv)-5
8044 -b(alen)m(t)32 b(to)g(using)f(the)150 4669 y(default)f(v)-5
8045 -b(alue)31 b(of)g(30.)150 4826 y(Note)k(that)e(the)h(compressed)f
8046 -(output)g(generated)h(is)f(the)h(same)f(regardless)h(of)f(whether)g(or)
8047 -g(not)h(the)150 4936 y(fallbac)m(k)d(algorithm)h(is)e(used.)150
8048 -5093 y(Be)f(a)m(w)m(are)g(also)h(that)f(this)f(parameter)i(ma)m(y)f
8049 -(disapp)s(ear)e(en)m(tirely)j(in)e(future)g(v)m(ersions)i(of)e(the)h
8050 -(library)-8 b(.)150 5202 y(In)43 b(principle)h(it)g(should)f(b)s(e)g(p)
8051 -s(ossible)h(to)g(devise)h(a)f(go)s(o)s(d)f(w)m(a)m(y)i(to)f
8052 -(automatically)i(c)m(ho)s(ose)f(whic)m(h)150 5312 y(algorithm)32
8053 -b(to)f(use.)40 b(Suc)m(h)30 b(a)g(mec)m(hanism)h(w)m(ould)f(render)g
8054 -(the)h(parameter)g(obsolete.)p eop
8055 -%%Page: 15 16
8056 -15 15 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29
8057 -b(with)g Fi(libbzip2)1881 b Fl(15)150 299 y Fj(P)m(ossible)32
8058 -b(return)e(v)-5 b(alues:)572 450 y Fi(BZ_CONFIG_ERROR)663
8059 -554 y Fj(if)30 b(the)h(library)f(has)g(b)s(een)g(mis-compiled)572
8060 -657 y Fi(BZ_PARAM_ERROR)663 761 y Fj(if)g Fi(strm)f Fj(is)i
8061 -Fi(NULL)663 865 y Fj(or)f Fi(blockSize)e(<)i Fj(1)h(or)g
8062 -Fi(blockSize)c(>)k Fj(9)663 969 y(or)f Fi(verbosity)e(<)i
8063 -Fj(0)h(or)g Fi(verbosity)c(>)k Fj(4)663 1073 y(or)f Fi(workFactor)e(<)i
8064 -Fj(0)h(or)f Fi(workFactor)e(>)i Fj(250)572 1176 y Fi(BZ_MEM_ERROR)663
8065 -1280 y Fj(if)g(not)h(enough)f(memory)h(is)f(a)m(v)-5
8066 -b(ailable)572 1384 y Fi(BZ_OK)663 1488 y Fj(otherwise)150
8067 -1645 y(Allo)m(w)m(able)32 b(next)f(actions:)572 1796
8068 -y Fi(BZ2_bzCompress)663 1899 y Fj(if)f Fi(BZ_OK)f Fj(is)h(returned)572
8069 -2003 y(no)g(sp)s(eci\014c)g(action)i(needed)e(in)g(case)h(of)g(error)
8070 -150 2255 y Fe(3.3.2)63 b Fd(BZ2_bzCompress)533 2441 y
8071 -Fi(int)47 b(BZ2_bzCompress)d(\()j(bz_stream)f(*strm,)g(int)h(action)f
8072 -(\);)150 2598 y Fj(Pro)m(vides)27 b(more)f(input)f(and/or)h(output)g
8073 -(bu\013er)f(space)h(for)g(the)h(library)-8 b(.)39 b(The)26
8074 -b(caller)h(main)m(tains)g(input)150 2708 y(and)j(output)g(bu\013ers,)g
8075 -(and)f(calls)i Fi(BZ2_bzCompress)c Fj(to)k(transfer)f(data)h(b)s(et)m
8076 -(w)m(een)g(them.)150 2865 y(Before)h(eac)m(h)h(call)g(to)f
8077 -Fi(BZ2_bzCompress)p Fj(,)d Fi(next_in)h Fj(should)g(p)s(oin)m(t)i(at)h
8078 -(the)f(data)g(to)h(b)s(e)e(compressed,)150 2974 y(and)40
8079 -b Fi(avail_in)f Fj(should)h(indicate)i(ho)m(w)f(man)m(y)g(b)m(ytes)h
8080 -(the)f(library)g(ma)m(y)g(read.)73 b Fi(BZ2_bzCompress)150
8081 -3084 y Fj(up)s(dates)29 b Fi(next_in)p Fj(,)g Fi(avail_in)f
8082 -Fj(and)i Fi(total_in)e Fj(to)j(re\015ect)g(the)g(n)m(um)m(b)s(er)e(of)i
8083 -(b)m(ytes)g(it)g(has)f(read.)150 3241 y(Similarly)-8
8084 -b(,)30 b Fi(next_out)d Fj(should)h(p)s(oin)m(t)h(to)h(a)f(bu\013er)f
8085 -(in)h(whic)m(h)g(the)g(compressed)g(data)g(is)g(to)h(b)s(e)e(placed,)
8086 -150 3350 y(with)k Fi(avail_out)f Fj(indicating)i(ho)m(w)g(m)m(uc)m(h)f
8087 -(output)h(space)g(is)f(a)m(v)-5 b(ailable.)49 b Fi(BZ2_bzCompress)29
8088 -b Fj(up)s(dates)150 3460 y Fi(next_out)p Fj(,)f Fi(avail_out)g
8089 -Fj(and)i Fi(total_out)e Fj(to)j(re\015ect)g(the)g(n)m(um)m(b)s(er)e(of)
8090 -i(b)m(ytes)g(output.)150 3617 y(Y)-8 b(ou)39 b(ma)m(y)g(pro)m(vide)g
8091 -(and)f(remo)m(v)m(e)i(as)f(little)i(or)e(as)g(m)m(uc)m(h)f(data)h(as)g
8092 -(y)m(ou)g(lik)m(e)h(on)f(eac)m(h)g(call)h(of)f Fi(BZ2_)150
8093 -3726 y(bzCompress)p Fj(.)46 b(In)32 b(the)i(limit,)h(it)e(is)g
8094 -(acceptable)i(to)f(supply)e(and)g(remo)m(v)m(e)j(data)e(one)g(b)m(yte)h
8095 -(at)g(a)f(time,)150 3836 y(although)27 b(this)g(w)m(ould)f(b)s(e)g
8096 -(terribly)i(ine\016cien)m(t.)40 b(Y)-8 b(ou)27 b(should)f(alw)m(a)m(ys)
8097 -i(ensure)e(that)h(at)g(least)h(one)f(b)m(yte)150 3946
8098 -y(of)k(output)f(space)g(is)h(a)m(v)-5 b(ailable)32 b(at)f(eac)m(h)g
8099 -(call.)150 4102 y(A)36 b(second)g(purp)s(ose)f(of)i Fi(BZ2_bzCompress)
8100 -32 b Fj(is)37 b(to)g(request)g(a)f(c)m(hange)h(of)g(mo)s(de)f(of)g(the)
8101 -h(compressed)150 4212 y(stream.)150 4369 y(Conceptually)-8
8102 -b(,)24 b(a)d(compressed)g(stream)g(can)g(b)s(e)f(in)h(one)g(of)g(four)f
8103 -(states:)38 b(IDLE,)20 b(R)m(UNNING,)i(FLUSH-)150 4478
8104 -y(ING)34 b(and)d(FINISHING.)k(Before)e(initialisation)i(\()p
8105 -Fi(BZ2_bzCompressInit)p Fj(\))28 b(and)k(after)i(termination)150
8106 -4588 y(\()p Fi(BZ2_bzCompressEnd)p Fj(\),)27 b(a)j(stream)h(is)f
8107 -(regarded)h(as)f(IDLE.)150 4745 y(Up)s(on)j(initialisation)i(\()p
8108 -Fi(BZ2_bzCompressInit)p Fj(\),)c(the)j(stream)g(is)g(placed)g(in)f(the)
8109 -h(R)m(UNNING)h(state.)150 4854 y(Subsequen)m(t)k(calls)h(to)h
8110 -Fi(BZ2_bzCompress)36 b Fj(should)i(pass)i Fi(BZ_RUN)e
8111 -Fj(as)h(the)h(requested)g(action;)46 b(other)150 4964
8112 -y(actions)31 b(are)g(illegal)i(and)c(will)i(result)g(in)f
8113 -Fi(BZ_SEQUENCE_ERROR)p Fj(.)150 5121 y(A)m(t)37 b(some)f(p)s(oin)m(t,)i
8114 -(the)e(calling)h(program)f(will)h(ha)m(v)m(e)g(pro)m(vided)e(all)i(the)
8115 -f(input)g(data)g(it)g(w)m(an)m(ts)h(to.)58 b(It)150 5230
8116 -y(will)30 b(then)f(w)m(an)m(t)h(to)g(\014nish)e(up)g({)i(in)f
8117 -(e\013ect,)j(asking)d(the)h(library)f(to)h(pro)s(cess)g(an)m(y)f(data)h
8118 -(it)g(migh)m(t)g(ha)m(v)m(e)150 5340 y(bu\013ered)23
8119 -b(in)m(ternally)-8 b(.)40 b(In)24 b(this)g(state,)j Fi(BZ2_bzCompress)
8120 -20 b Fj(will)k(no)g(longer)h(attempt)g(to)g(read)f(data)g(from)p
8121 -eop
8122 -%%Page: 16 17
8123 -16 16 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29
8124 -b(with)g Fi(libbzip2)1881 b Fl(16)150 299 y Fi(next_in)p
8125 -Fj(,)32 b(but)g(it)i(will)f(w)m(an)m(t)h(to)g(write)g(data)f(to)h
8126 -Fi(next_out)p Fj(.)46 b(Because)34 b(the)f(output)g(bu\013er)f
8127 -(supplied)150 408 y(b)m(y)d(the)g(user)g(can)g(b)s(e)f(arbitrarily)i
8128 -(small,)g(the)f(\014nishing-up)f(op)s(eration)h(cannot)h(necessarily)g
8129 -(b)s(e)e(done)150 518 y(with)i(a)h(single)g(call)g(of)g
8130 -Fi(BZ2_bzCompress)p Fj(.)150 675 y(Instead,)47 b(the)d(calling)g
8131 -(program)g(passes)f Fi(BZ_FINISH)e Fj(as)i(an)g(action)i(to)f
8132 -Fi(BZ2_bzCompress)p Fj(.)76 b(This)150 784 y(c)m(hanges)26
8133 -b(the)g(stream's)g(state)h(to)f(FINISHING.)h(An)m(y)e(remaining)h
8134 -(input)e(\(ie,)k Fi(next_in[0)g(..)i(avail_)150 894 y(in-1])p
8135 -Fj(\))k(is)h(compressed)g(and)f(transferred)h(to)h(the)f(output)g
8136 -(bu\013er.)54 b(T)-8 b(o)36 b(do)f(this,)i Fi(BZ2_bzCompress)150
8137 -1004 y Fj(m)m(ust)h(b)s(e)f(called)i(rep)s(eatedly)g(un)m(til)f(all)g
8138 -(the)h(output)f(has)f(b)s(een)g(consumed.)63 b(A)m(t)38
8139 -b(that)h(p)s(oin)m(t,)h Fi(BZ2_)150 1113 y(bzCompress)g
8140 -Fj(returns)i Fi(BZ_STREAM_END)p Fj(,)g(and)f(the)i(stream's)g(state)h
8141 -(is)e(set)h(bac)m(k)g(to)h(IDLE.)d Fi(BZ2_)150 1223 y(bzCompressEnd)27
8142 -b Fj(should)i(then)h(b)s(e)g(called.)150 1380 y(Just)g(to)i(mak)m(e)f
8143 -(sure)f(the)h(calling)g(program)g(do)s(es)f(not)h(c)m(heat,)h(the)f
8144 -(library)f(mak)m(es)h(a)g(note)g(of)g Fi(avail_)150 1489
8145 -y(in)i Fj(at)h(the)g(time)h(of)e(the)h(\014rst)g(call)g(to)h
8146 -Fi(BZ2_bzCompress)30 b Fj(whic)m(h)j(has)g Fi(BZ_FINISH)e
8147 -Fj(as)j(an)f(action)i(\(ie,)150 1599 y(at)g(the)g(time)h(the)e(program)
8148 -h(has)f(announced)g(its)h(in)m(ten)m(tion)h(to)g(not)f(supply)e(an)m(y)
8149 -h(more)h(input\).)53 b(By)150 1708 y(comparing)30 b(this)f(v)-5
8150 -b(alue)29 b(with)h(that)f(of)h Fi(avail_in)d Fj(o)m(v)m(er)k(subsequen)
8151 -m(t)d(calls)j(to)f Fi(BZ2_bzCompress)p Fj(,)c(the)150
8152 -1818 y(library)k(can)f(detect)j(an)m(y)e(attempts)h(to)f(slip)g(in)f
8153 -(more)h(data)g(to)h(compress.)41 b(An)m(y)29 b(calls)i(for)e(whic)m(h)h
8154 -(this)150 1928 y(is)h(detected)i(will)f(return)f Fi(BZ_SEQUENCE_ERROR)p
8155 -Fj(.)39 b(This)31 b(indicates)i(a)e(programming)g(mistak)m(e)i(whic)m
8156 -(h)150 2037 y(should)c(b)s(e)h(corrected.)150 2194 y(Instead)36
8157 -b(of)g(asking)h(to)g(\014nish,)f(the)h(calling)g(program)f(ma)m(y)h
8158 -(ask)f Fi(BZ2_bzCompress)c Fj(to)37 b(tak)m(e)h(all)f(the)150
8159 -2304 y(remaining)f(input,)g(compress)f(it)h(and)f(terminate)h(the)g
8160 -(curren)m(t)g(\(Burro)m(ws-Wheeler\))h(compression)150
8161 -2413 y(blo)s(c)m(k.)j(This)25 b(could)h(b)s(e)g(useful)f(for)h(error)g
8162 -(con)m(trol)i(purp)s(oses.)38 b(The)26 b(mec)m(hanism)g(is)g(analogous)
8163 -h(to)f(that)150 2523 y(for)35 b(\014nishing:)48 b(call)35
8164 -b Fi(BZ2_bzCompress)c Fj(with)k(an)f(action)i(of)f Fi(BZ_FLUSH)p
8165 -Fj(,)f(remo)m(v)m(e)i(output)f(data,)h(and)150 2632 y(p)s(ersist)i
8166 -(with)g(the)h Fi(BZ_FLUSH)d Fj(action)k(un)m(til)e(the)h(v)-5
8167 -b(alue)39 b Fi(BZ_RUN)d Fj(is)j(returned.)64 b(As)38
8168 -b(with)g(\014nishing,)150 2742 y Fi(BZ2_bzCompress)21
8169 -b Fj(detects)27 b(an)m(y)f(attempt)g(to)h(pro)m(vide)e(more)h(input)f
8170 -(data)g(once)i(the)e(\015ush)f(has)h(b)s(egun.)150 2899
8171 -y(Once)31 b(the)g(\015ush)d(is)j(complete,)h(the)f(stream)f(returns)g
8172 -(to)i(the)e(normal)h(R)m(UNNING)h(state.)150 3056 y(This)f(all)g
8173 -(sounds)f(prett)m(y)i(complex,)g(but)f(isn't)g(really)-8
8174 -b(.)44 b(Here's)32 b(a)f(table)h(whic)m(h)e(sho)m(ws)h(whic)m(h)g
8175 -(actions)150 3165 y(are)d(allo)m(w)m(able)i(in)e(eac)m(h)h(state,)h
8176 -(what)d(action)j(will)e(b)s(e)f(tak)m(en,)j(what)d(the)i(next)f(state)h
8177 -(is,)g(and)e(what)h(the)150 3275 y(non-error)g(return)f(v)-5
8178 -b(alues)28 b(are.)40 b(Note)30 b(that)e(y)m(ou)g(can't)g(explicitly)i
8179 -(ask)d(what)h(state)h(the)f(stream)g(is)g(in,)150 3384
8180 -y(but)h(nor)h(do)f(y)m(ou)h(need)g(to)g({)h(it)f(can)g(b)s(e)f
8181 -(inferred)g(from)h(the)g(v)-5 b(alues)30 b(returned)f(b)m(y)h
8182 -Fi(BZ2_bzCompress)p Fj(.)390 3535 y(IDLE/)p Fi(any)572
8183 -3639 y Fj(Illegal.)63 b(IDLE)29 b(state)j(only)e(exists)h(after)g
8184 -Fi(BZ2_bzCompressEnd)26 b Fj(or)572 3743 y(b)s(efore)k
8185 -Fi(BZ2_bzCompressInit)p Fj(.)572 3847 y(Return)g(v)-5
8186 -b(alue)31 b(=)f Fi(BZ_SEQUENCE_ERROR)390 4054 y Fj(R)m(UNNING/)p
8187 -Fi(BZ_RUN)572 4158 y Fj(Compress)g(from)g Fi(next_in)e
8188 -Fj(to)j Fi(next_out)d Fj(as)j(m)m(uc)m(h)f(as)h(p)s(ossible.)572
8189 -4262 y(Next)g(state)h(=)e(R)m(UNNING)572 4366 y(Return)g(v)-5
8190 -b(alue)31 b(=)f Fi(BZ_RUN_OK)390 4573 y Fj(R)m(UNNING/)p
8191 -Fi(BZ_FLUSH)572 4677 y Fj(Remem)m(b)s(er)g(curren)m(t)h(v)-5
8192 -b(alue)31 b(of)f Fi(next_in)p Fj(.)59 b(Compress)30 b(from)g
8193 -Fi(next_in)572 4781 y Fj(to)h Fi(next_out)d Fj(as)j(m)m(uc)m(h)f(as)g
8194 -(p)s(ossible,)g(but)g(do)h(not)f(accept)i(an)m(y)e(more)h(input.)572
8195 -4885 y(Next)g(state)h(=)e(FLUSHING)572 4988 y(Return)g(v)-5
8196 -b(alue)31 b(=)f Fi(BZ_FLUSH_OK)390 5196 y Fj(R)m(UNNING/)p
8197 -Fi(BZ_FINISH)572 5300 y Fj(Remem)m(b)s(er)g(curren)m(t)h(v)-5
8198 -b(alue)31 b(of)f Fi(next_in)p Fj(.)59 b(Compress)30 b(from)g
8199 -Fi(next_in)p eop
8200 -%%Page: 17 18
8201 -17 17 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29
8202 -b(with)g Fi(libbzip2)1881 b Fl(17)572 299 y Fj(to)31
8203 -b Fi(next_out)d Fj(as)j(m)m(uc)m(h)f(as)g(p)s(ossible,)g(but)g(do)h
8204 -(not)f(accept)i(an)m(y)e(more)h(input.)572 403 y(Next)g(state)h(=)e
8205 -(FINISHING)572 506 y(Return)g(v)-5 b(alue)31 b(=)f Fi(BZ_FINISH_OK)390
8206 -714 y Fj(FLUSHING/)p Fi(BZ_FLUSH)572 818 y Fj(Compress)g(from)g
8207 -Fi(next_in)e Fj(to)j Fi(next_out)d Fj(as)j(m)m(uc)m(h)f(as)h(p)s
8208 -(ossible,)572 922 y(but)f(do)g(not)h(accept)g(an)m(y)g(more)g(input.)
8209 -572 1025 y(If)f(all)h(the)g(existing)g(input)f(has)g(b)s(een)f(used)h
8210 -(up)f(and)h(all)h(compressed)572 1129 y(output)f(has)g(b)s(een)g(remo)m
8211 -(v)m(ed)663 1233 y(Next)h(state)h(=)e(R)m(UNNING;)i(Return)e(v)-5
8212 -b(alue)31 b(=)f Fi(BZ_RUN_OK)572 1337 y Fj(else)663 1440
8213 -y(Next)h(state)h(=)e(FLUSHING;)g(Return)h(v)-5 b(alue)30
8214 -b(=)g Fi(BZ_FLUSH_OK)390 1648 y Fj(FLUSHING/other)572
8215 -1752 y(Illegal.)572 1856 y(Return)g(v)-5 b(alue)31 b(=)f
8216 -Fi(BZ_SEQUENCE_ERROR)390 2063 y Fj(FINISHING/)p Fi(BZ_FINISH)572
8217 -2167 y Fj(Compress)g(from)g Fi(next_in)e Fj(to)j Fi(next_out)d
8218 -Fj(as)j(m)m(uc)m(h)f(as)h(p)s(ossible,)572 2271 y(but)f(to)h(not)g
8219 -(accept)g(an)m(y)g(more)g(input.)572 2374 y(If)f(all)h(the)g(existing)g
8220 -(input)f(has)g(b)s(een)f(used)h(up)f(and)h(all)h(compressed)572
8221 -2478 y(output)f(has)g(b)s(een)g(remo)m(v)m(ed)663 2582
8222 -y(Next)h(state)h(=)e(IDLE;)f(Return)i(v)-5 b(alue)30
8223 -b(=)g Fi(BZ_STREAM_END)572 2686 y Fj(else)663 2790 y(Next)h(state)h(=)e
8224 -(FINISHING;)h(Return)g(v)-5 b(alue)30 b(=)g Fi(BZ_FINISHING)390
8225 -2997 y Fj(FINISHING/other)572 3101 y(Illegal.)572 3205
8226 -y(Return)g(v)-5 b(alue)31 b(=)f Fi(BZ_SEQUENCE_ERROR)150
8227 -3361 y Fj(That)23 b(still)h(lo)s(oks)g(complicated?)39
8228 -b(W)-8 b(ell,)26 b(fair)d(enough.)39 b(The)23 b(usual)f(sequence)h(of)h
8229 -(calls)g(for)f(compressing)150 3471 y(a)30 b(load)h(of)g(data)f(is:)225
8230 -3628 y Fh(\017)60 b Fj(Get)32 b(started)f(with)f Fi(BZ2_bzCompressInit)
8231 -p Fj(.)225 3774 y Fh(\017)60 b Fj(Sho)m(v)m(el)37 b(data)g(in)f(and)g
8232 -(shlurp)f(out)i(its)f(compressed)h(form)f(using)g(zero)i(or)e(more)h
8233 -(calls)h(of)e Fi(BZ2_)330 3884 y(bzCompress)28 b Fj(with)i(action)h(=)f
8234 -Fi(BZ_RUN)p Fj(.)225 4030 y Fh(\017)60 b Fj(Finish)24
8235 -b(up.)38 b(Rep)s(eatedly)25 b(call)h Fi(BZ2_bzCompress)21
8236 -b Fj(with)k(action)h(=)e Fi(BZ_FINISH)p Fj(,)g(cop)m(ying)h(out)h(the)
8237 -330 4139 y(compressed)k(output,)h(un)m(til)g Fi(BZ_STREAM_END)26
8238 -b Fj(is)31 b(returned.)225 4285 y Fh(\017)60 b Fj(Close)31
8239 -b(up)e(and)h(go)h(home.)41 b(Call)30 b Fi(BZ2_bzCompressEnd)p
8240 -Fj(.)150 4478 y(If)23 b(the)g(data)g(y)m(ou)h(w)m(an)m(t)g(to)f
8241 -(compress)g(\014ts)g(in)m(to)h(y)m(our)g(input)e(bu\013er)g(all)i(at)f
8242 -(once,)j(y)m(ou)d(can)g(skip)g(the)g(calls)150 4588 y(of)37
8243 -b Fi(BZ2_bzCompress)26 b(\()k(...,)f(BZ_RUN)g(\))36 b
8244 -Fj(and)g(just)g(do)g(the)h Fi(BZ2_bzCompress)26 b(\()k(...,)f
8245 -(BZ_FINISH)150 4698 y(\))h Fj(calls.)150 4854 y(All)35
8246 -b(required)g(memory)h(is)f(allo)s(cated)i(b)m(y)e Fi
8247 -(BZ2_bzCompressInit)p Fj(.)51 b(The)35 b(compression)h(library)f(can)
8248 -150 4964 y(accept)f(an)m(y)e(data)h(at)g(all)h(\(ob)m(viously\).)48
8249 -b(So)32 b(y)m(ou)h(shouldn't)f(get)i(an)m(y)f(error)g(return)f(v)-5
8250 -b(alues)32 b(from)h(the)150 5074 y Fi(BZ2_bzCompress)28
8251 -b Fj(calls.)48 b(If)32 b(y)m(ou)g(do,)h(they)g(will)g(b)s(e)e
8252 -Fi(BZ_SEQUENCE_ERROR)p Fj(,)e(and)i(indicate)i(a)g(bug)e(in)150
8253 -5183 y(y)m(our)g(programming.)150 5340 y(T)-8 b(rivial)32
8254 -b(other)f(p)s(ossible)f(return)g(v)-5 b(alues:)p eop
8255 -%%Page: 18 19
8256 -18 18 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29
8257 -b(with)g Fi(libbzip2)1881 b Fl(18)572 299 y Fi(BZ_PARAM_ERROR)663
8258 -403 y Fj(if)30 b Fi(strm)f Fj(is)i Fi(NULL)p Fj(,)e(or)i
8259 -Fi(strm->s)d Fj(is)j Fi(NULL)150 652 y Fe(3.3.3)63 b
8260 -Fd(BZ2_bzCompressEnd)390 839 y Fi(int)47 b(BZ2_bzCompressEnd)c(\()k
8261 -(bz_stream)f(*strm)g(\);)150 996 y Fj(Releases)32 b(all)f(memory)f
8262 -(asso)s(ciated)i(with)e(a)h(compression)f(stream.)150
8263 -1153 y(P)m(ossible)i(return)e(v)-5 b(alues:)481 1304
8264 -y Fi(BZ_PARAM_ERROR)117 b Fj(if)31 b Fi(strm)e Fj(is)h
8265 -Fi(NULL)f Fj(or)i Fi(strm->s)d Fj(is)j Fi(NULL)481 1408
8266 -y(BZ_OK)120 b Fj(otherwise)150 1657 y Fe(3.3.4)63 b Fd
8267 -(BZ2_bzDecompressInit)390 1844 y Fi(int)47 b(BZ2_bzDecompressInit)42
8268 -b(\()48 b(bz_stream)d(*strm,)h(int)h(verbosity,)e(int)i(small)f(\);)150
8269 -2001 y Fj(Prepares)39 b(for)f(decompression.)65 b(As)38
8270 -b(with)h Fi(BZ2_bzCompressInit)p Fj(,)c(a)k Fi(bz_stream)d
8271 -Fj(record)j(should)150 2110 y(b)s(e)30 b(allo)s(cated)j(and)d
8272 -(initialised)i(b)s(efore)f(the)g(call.)44 b(Fields)31
8273 -b Fi(bzalloc)p Fj(,)e Fi(bzfree)g Fj(and)h Fi(opaque)g
8274 -Fj(should)g(b)s(e)150 2220 y(set)35 b(if)f(a)g(custom)h(memory)f(allo)s
8275 -(cator)i(is)e(required,)h(or)g(made)f Fi(NULL)f Fj(for)h(the)g(normal)g
8276 -Fi(malloc)p Fj(/)p Fi(free)150 2330 y Fj(routines.)72
8277 -b(Up)s(on)40 b(return,)j(the)e(in)m(ternal)h(state)g(will)g(ha)m(v)m(e)
8278 -f(b)s(een)f(initialised,)45 b(and)40 b Fi(total_in)f
8279 -Fj(and)150 2439 y Fi(total_out)28 b Fj(will)j(b)s(e)e(zero.)150
8280 -2596 y(F)-8 b(or)31 b(the)g(meaning)f(of)h(parameter)g
8281 -Fi(verbosity)p Fj(,)d(see)j Fi(BZ2_bzCompressInit)p Fj(.)150
8282 -2753 y(If)26 b Fi(small)f Fj(is)i(nonzero,)h(the)f(library)f(will)h
8283 -(use)f(an)g(alternativ)m(e)j(decompression)e(algorithm)g(whic)m(h)f
8284 -(uses)150 2862 y(less)42 b(memory)h(but)e(at)i(the)f(cost)i(of)e
8285 -(decompressing)g(more)h(slo)m(wly)g(\(roughly)f(sp)s(eaking,)j(half)d
8286 -(the)150 2972 y(sp)s(eed,)29 b(but)f(the)h(maxim)m(um)f(memory)i
8287 -(requiremen)m(t)f(drops)f(to)i(around)e(2300k\).)42 b(See)29
8288 -b(Chapter)g(2)g(for)150 3082 y(more)i(information)g(on)f(memory)g
8289 -(managemen)m(t.)150 3238 y(Note)37 b(that)f(the)g(amoun)m(t)g(of)g
8290 -(memory)g(needed)f(to)h(decompress)g(a)g(stream)g(cannot)g(b)s(e)f
8291 -(determined)150 3348 y(un)m(til)41 b(the)f(stream's)h(header)f(has)g(b)
8292 -s(een)f(read,)k(so)e(ev)m(en)g(if)f Fi(BZ2_bzDecompressInit)35
8293 -b Fj(succeeds,)43 b(a)150 3458 y(subsequen)m(t)30 b Fi
8294 -(BZ2_bzDecompress)c Fj(could)k(fail)h(with)f Fi(BZ_MEM_ERROR)p
8295 -Fj(.)150 3614 y(P)m(ossible)i(return)e(v)-5 b(alues:)572
8296 -3765 y Fi(BZ_CONFIG_ERROR)663 3869 y Fj(if)30 b(the)h(library)f(has)g
8297 -(b)s(een)g(mis-compiled)572 3973 y Fi(BZ_PARAM_ERROR)663
8298 -4077 y Fj(if)g Fi(\(small)46 b(!=)h(0)h(&&)f(small)f(!=)h(1\))663
8299 -4181 y Fj(or)30 b Fi(\(verbosity)45 b(<)j(0)f(||)g(verbosity)f(>)h(4\))
8300 -572 4284 y(BZ_MEM_ERROR)663 4388 y Fj(if)30 b(insu\016cien)m(t)h
8301 -(memory)f(is)h(a)m(v)-5 b(ailable)150 4545 y(Allo)m(w)m(able)32
8302 -b(next)f(actions:)572 4696 y Fi(BZ2_bzDecompress)663
8303 -4800 y Fj(if)f Fi(BZ_OK)f Fj(w)m(as)h(returned)572 4904
8304 -y(no)g(sp)s(eci\014c)g(action)i(required)e(in)g(case)h(of)g(error)150
8305 -5153 y Fe(3.3.5)63 b Fd(BZ2_bzDecompress)390 5340 y Fi(int)47
8306 -b(BZ2_bzDecompress)c(\()48 b(bz_stream)d(*strm)h(\);)p
8307 -eop
8308 -%%Page: 19 20
8309 -19 19 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29
8310 -b(with)g Fi(libbzip2)1881 b Fl(19)150 299 y Fj(Pro)m(vides)41
8311 -b(more)g(input)f(and/out)g(output)h(bu\013er)e(space)i(for)f(the)h
8312 -(library)-8 b(.)71 b(The)41 b(caller)h(main)m(tains)150
8313 -408 y(input)30 b(and)f(output)h(bu\013ers,)g(and)g(uses)g
8314 -Fi(BZ2_bzDecompress)25 b Fj(to)32 b(transfer)e(data)h(b)s(et)m(w)m(een)
8315 -g(them.)150 565 y(Before)45 b(eac)m(h)h(call)f(to)h Fi
8316 -(BZ2_bzDecompress)p Fj(,)e Fi(next_in)e Fj(should)i(p)s(oin)m(t)h(at)g
8317 -(the)g(compressed)f(data,)150 675 y(and)33 b Fi(avail_in)e
8318 -Fj(should)i(indicate)i(ho)m(w)e(man)m(y)h(b)m(ytes)g(the)g(library)g
8319 -(ma)m(y)g(read.)50 b Fi(BZ2_bzDecompress)150 784 y Fj(up)s(dates)29
8320 -b Fi(next_in)p Fj(,)g Fi(avail_in)f Fj(and)i Fi(total_in)e
8321 -Fj(to)j(re\015ect)g(the)g(n)m(um)m(b)s(er)e(of)i(b)m(ytes)g(it)g(has)f
8322 -(read.)150 941 y(Similarly)-8 b(,)40 b Fi(next_out)34
8323 -b Fj(should)i(p)s(oin)m(t)h(to)h(a)f(bu\013er)f(in)h(whic)m(h)g(the)g
8324 -(uncompressed)f(output)h(is)g(to)h(b)s(e)150 1051 y(placed,)f(with)e
8325 -Fi(avail_out)e Fj(indicating)j(ho)m(w)f(m)m(uc)m(h)h(output)f(space)g
8326 -(is)h(a)m(v)-5 b(ailable.)57 b Fi(BZ2_bzCompress)150
8327 -1160 y Fj(up)s(dates)29 b Fi(next_out)p Fj(,)g Fi(avail_out)f
8328 -Fj(and)h Fi(total_out)f Fj(to)j(re\015ect)h(the)e(n)m(um)m(b)s(er)g(of)
8329 -g(b)m(ytes)h(output.)150 1317 y(Y)-8 b(ou)39 b(ma)m(y)g(pro)m(vide)g
8330 -(and)f(remo)m(v)m(e)i(as)f(little)i(or)e(as)g(m)m(uc)m(h)f(data)h(as)g
8331 -(y)m(ou)g(lik)m(e)h(on)f(eac)m(h)g(call)h(of)f Fi(BZ2_)150
8332 -1427 y(bzDecompress)p Fj(.)d(In)27 b(the)h(limit,)h(it)f(is)f
8333 -(acceptable)i(to)f(supply)e(and)g(remo)m(v)m(e)j(data)f(one)g(b)m(yte)g
8334 -(at)f(a)h(time,)150 1537 y(although)f(this)g(w)m(ould)f(b)s(e)g
8335 -(terribly)i(ine\016cien)m(t.)40 b(Y)-8 b(ou)27 b(should)f(alw)m(a)m(ys)
8336 -i(ensure)e(that)h(at)g(least)h(one)f(b)m(yte)150 1646
8337 -y(of)k(output)f(space)g(is)h(a)m(v)-5 b(ailable)32 b(at)f(eac)m(h)g
8338 -(call.)150 1803 y(Use)g(of)f Fi(BZ2_bzDecompress)c Fj(is)k(simpler)h
8339 -(than)f Fi(BZ2_bzCompress)p Fj(.)150 1960 y(Y)-8 b(ou)28
8340 -b(should)f(pro)m(vide)i(input)f(and)f(remo)m(v)m(e)j(output)e(as)g
8341 -(describ)s(ed)g(ab)s(o)m(v)m(e,)i(and)d(rep)s(eatedly)i(call)g
8342 -Fi(BZ2_)150 2069 y(bzDecompress)k Fj(un)m(til)k Fi(BZ_STREAM_END)c
8343 -Fj(is)k(returned.)59 b(App)s(earance)36 b(of)g Fi(BZ_STREAM_END)d
8344 -Fj(denotes)150 2179 y(that)45 b Fi(BZ2_bzDecompress)40
8345 -b Fj(has)45 b(detected)h(the)f(logical)i(end)d(of)g(the)h(compressed)g
8346 -(stream.)84 b Fi(BZ2_)150 2289 y(bzDecompress)27 b Fj(will)k(not)g(pro)
8347 -s(duce)e Fi(BZ_STREAM_END)e Fj(un)m(til)k(all)g(output)g(data)f(has)g
8348 -(b)s(een)g(placed)h(in)m(to)150 2398 y(the)k(output)f(bu\013er,)i(so)e
8349 -(once)i Fi(BZ_STREAM_END)31 b Fj(app)s(ears,)k(y)m(ou)g(are)g(guaran)m
8350 -(teed)g(to)h(ha)m(v)m(e)f(a)m(v)-5 b(ailable)150 2508
8351 -y(all)31 b(the)g(decompressed)f(output,)h(and)e Fi(BZ2_bzDecompressEnd)
8352 -c Fj(can)31 b(safely)f(b)s(e)g(called.)150 2665 y(If)38
8353 -b(case)i(of)f(an)f(error)h(return)f(v)-5 b(alue,)42 b(y)m(ou)d(should)e
8354 -(call)j Fi(BZ2_bzDecompressEnd)33 b Fj(to)40 b(clean)f(up)f(and)150
8355 -2774 y(release)32 b(memory)-8 b(.)150 2931 y(P)m(ossible)32
8356 -b(return)e(v)-5 b(alues:)572 3082 y Fi(BZ_PARAM_ERROR)663
8357 -3186 y Fj(if)30 b Fi(strm)f Fj(is)i Fi(NULL)e Fj(or)i
8358 -Fi(strm->s)d Fj(is)i Fi(NULL)663 3290 y Fj(or)g Fi(strm->avail_out)44
8359 -b(<)j(1)572 3393 y(BZ_DATA_ERROR)663 3497 y Fj(if)30
8360 -b(a)h(data)f(in)m(tegrit)m(y)j(error)e(is)f(detected)i(in)e(the)h
8361 -(compressed)g(stream)572 3601 y Fi(BZ_DATA_ERROR_MAGIC)663
8362 -3705 y Fj(if)f(the)h(compressed)f(stream)h(do)s(esn't)f(b)s(egin)g
8363 -(with)h(the)f(righ)m(t)i(magic)f(b)m(ytes)572 3808 y
8364 -Fi(BZ_MEM_ERROR)663 3912 y Fj(if)f(there)h(w)m(asn't)g(enough)f(memory)
8365 -h(a)m(v)-5 b(ailable)572 4016 y Fi(BZ_STREAM_END)663
8366 -4120 y Fj(if)30 b(the)h(logical)h(end)e(of)h(the)f(data)h(stream)g(w)m
8367 -(as)f(detected)i(and)e(all)663 4224 y(output)g(in)g(has)g(b)s(een)g
8368 -(consumed,)g(eg)h Fi(s->avail_out)44 b(>)k(0)572 4327
8369 -y(BZ_OK)663 4431 y Fj(otherwise)150 4588 y(Allo)m(w)m(able)32
8370 -b(next)f(actions:)572 4739 y Fi(BZ2_bzDecompress)663
8371 -4843 y Fj(if)f Fi(BZ_OK)f Fj(w)m(as)h(returned)572 4946
8372 -y Fi(BZ2_bzDecompressEnd)663 5050 y Fj(otherwise)p eop
8373 -%%Page: 20 21
8374 -20 20 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29
8375 -b(with)g Fi(libbzip2)1881 b Fl(20)150 299 y Fe(3.3.6)63
8376 -b Fd(BZ2_bzDecompressEnd)390 486 y Fi(int)47 b(BZ2_bzDecompressEnd)42
8377 -b(\()48 b(bz_stream)d(*strm)i(\);)150 643 y Fj(Releases)32
8378 -b(all)f(memory)f(asso)s(ciated)i(with)e(a)h(decompression)f(stream.)150
8379 -799 y(P)m(ossible)i(return)e(v)-5 b(alues:)572 950 y
8380 -Fi(BZ_PARAM_ERROR)663 1054 y Fj(if)30 b Fi(strm)f Fj(is)i
8381 -Fi(NULL)e Fj(or)i Fi(strm->s)d Fj(is)i Fi(NULL)572 1158
8382 -y(BZ_OK)663 1262 y Fj(otherwise)150 1419 y(Allo)m(w)m(able)i(next)f
8383 -(actions:)572 1570 y(None.)150 1857 y Fk(3.4)68 b(High-lev)l(el)47
8384 -b(in)l(terface)150 2050 y Fj(This)35 b(in)m(terface)i(pro)m(vides)e
8385 -(functions)g(for)g(reading)g(and)f(writing)i Fi(bzip2)d
8386 -Fj(format)j(\014les.)55 b(First,)37 b(some)150 2159 y(general)31
8387 -b(p)s(oin)m(ts.)225 2316 y Fh(\017)60 b Fj(All)35 b(of)g(the)h
8388 -(functions)e(tak)m(e)j(an)d Fi(int*)g Fj(\014rst)h(argumen)m(t,)i
8389 -Fi(bzerror)p Fj(.)52 b(After)36 b(eac)m(h)f(call,)j Fi(bzerror)330
8390 -2426 y Fj(should)23 b(b)s(e)f(consulted)i(\014rst)f(to)i(determine)f
8391 -(the)g(outcome)h(of)e(the)h(call.)40 b(If)23 b Fi(bzerror)e
8392 -Fj(is)j Fi(BZ_OK)p Fj(,)g(the)330 2535 y(call)35 b(completed)g
8393 -(successfully)-8 b(,)36 b(and)d(only)i(then)e(should)h(the)g(return)g
8394 -(v)-5 b(alue)34 b(of)g(the)h(function)f(\(if)330 2645
8395 -y(an)m(y\))27 b(b)s(e)e(consulted.)40 b(If)26 b Fi(bzerror)f
8396 -Fj(is)h Fi(BZ_IO_ERROR)p Fj(,)e(there)j(w)m(as)g(an)e(error)i
8397 -(reading/writing)h(the)330 2754 y(underlying)k(compressed)h(\014le,)h
8398 -(and)e(y)m(ou)h(should)f(then)h(consult)g Fi(errno)p
8399 -Fj(/)p Fi(perror)e Fj(to)i(determine)330 2864 y(the)k(cause)f(of)h(the)
8400 -f(di\016cult)m(y)-8 b(.)60 b Fi(bzerror)34 b Fj(ma)m(y)j(also)g(b)s(e)e
8401 -(set)i(to)g(v)-5 b(arious)37 b(other)g(v)-5 b(alues;)39
8402 -b(precise)330 2974 y(details)31 b(are)g(giv)m(en)g(on)g(a)f(p)s
8403 -(er-function)g(basis)g(b)s(elo)m(w.)225 3111 y Fh(\017)60
8404 -b Fj(If)39 b Fi(bzerror)e Fj(indicates)i(an)g(error)g(\(ie,)k(an)m
8405 -(ything)c(except)h Fi(BZ_OK)d Fj(and)i Fi(BZ_STREAM_END)p
8406 -Fj(\),)f(y)m(ou)330 3220 y(should)56 b(immediately)i(call)g
8407 -Fi(BZ2_bzReadClose)53 b Fj(\(or)58 b Fi(BZ2_bzWriteClose)p
8408 -Fj(,)h(dep)s(ending)d(on)330 3330 y(whether)37 b(y)m(ou)h(are)f
8409 -(attempting)i(to)f(read)f(or)h(to)g(write\))g(to)g(free)g(up)e(all)i
8410 -(resources)g(asso)s(ciated)330 3439 y(with)44 b(the)g(stream.)83
8411 -b(Once)44 b(an)g(error)h(has)e(b)s(een)h(indicated,)k(b)s(eha)m(viour)c
8412 -(of)g(all)h(calls)g(except)330 3549 y Fi(BZ2_bzReadClose)h
8413 -Fj(\()p Fi(BZ2_bzWriteClose)p Fj(\))h(is)j(unde\014ned.)99
8414 -b(The)51 b(implication)g(is)g(that)g(\(1\))330 3659 y
8415 -Fi(bzerror)42 b Fj(should)i(b)s(e)f(c)m(hec)m(k)m(ed)k(after)e(eac)m(h)
8416 -g(call,)k(and)43 b(\(2\))j(if)e Fi(bzerror)e Fj(indicates)j(an)f
8417 -(error,)330 3768 y Fi(BZ2_bzReadClose)26 b Fj(\()p Fi(BZ2_bzWriteClose)
8418 -p Fj(\))h(should)i(then)h(b)s(e)g(called)i(to)f(clean)g(up.)225
8419 -3905 y Fh(\017)60 b Fj(The)32 b Fi(FILE*)f Fj(argumen)m(ts)i(passed)f
8420 -(to)h Fi(BZ2_bzReadOpen)p Fj(/)p Fi(BZ2_bzWriteO)o(pen)26
8421 -b Fj(should)31 b(b)s(e)h(set)h(to)330 4015 y(binary)22
8422 -b(mo)s(de.)38 b(Most)24 b(Unix)f(systems)g(will)g(do)g(this)g(b)m(y)g
8423 -(default,)i(but)d(other)i(platforms,)g(including)330
8424 -4124 y(Windo)m(ws)41 b(and)g(Mac,)46 b(will)c(not.)76
8425 -b(If)41 b(y)m(ou)i(omit)f(this,)j(y)m(ou)e(ma)m(y)f(encoun)m(ter)h
8426 -(problems)e(when)330 4234 y(mo)m(ving)31 b(co)s(de)g(to)g(new)f
8427 -(platforms.)225 4371 y Fh(\017)60 b Fj(Memory)45 b(allo)s(cation)h
8428 -(requests)f(are)g(handled)e(b)m(y)h Fi(malloc)p Fj(/)p
8429 -Fi(free)p Fj(.)80 b(A)m(t)45 b(presen)m(t)g(there)g(is)f(no)330
8430 -4481 y(facilit)m(y)39 b(for)f(user-de\014ned)e(memory)h(allo)s(cators)j
8431 -(in)d(the)g(\014le)h(I/O)g(functions)f(\(could)g(easily)i(b)s(e)330
8432 -4590 y(added,)30 b(though\).)150 4842 y Fe(3.4.1)63 b
8433 -Fd(BZ2_bzReadOpen)533 5029 y Fi(typedef)46 b(void)h(BZFILE;)533
8434 -5236 y(BZFILE)f(*BZ2_bzReadOpen)e(\()j(int)g(*bzerror,)f(FILE)g(*f,)
8435 -1726 5340 y(int)h(small,)f(int)h(verbosity,)p eop
8436 -%%Page: 21 22
8437 -21 21 bop 150 -116 a Fl(Chapter)30 b(3:)h(Programming)e(with)g
8438 -Fi(libbzip2)1891 b Fl(21)1726 299 y Fi(void)47 b(*unused,)f(int)g
8439 -(nUnused)g(\);)150 456 y Fj(Prepare)27 b(to)g(read)f(compressed)h(data)
8440 -g(from)f(\014le)g(handle)g Fi(f)p Fj(.)39 b Fi(f)26 b
8441 -Fj(should)g(refer)g(to)i(a)e(\014le)h(whic)m(h)f(has)g(b)s(een)150
8442 -565 y(op)s(ened)i(for)g(reading,)i(and)d(for)i(whic)m(h)f(the)h(error)g
8443 -(indicator)h(\()p Fi(ferror\(f\))p Fj(\)is)c(not)j(set.)41
8444 -b(If)29 b Fi(small)e Fj(is)h(1,)150 675 y(the)j(library)f(will)h(try)f
8445 -(to)i(decompress)e(using)g(less)h(memory)-8 b(,)31 b(at)g(the)f(exp)s
8446 -(ense)g(of)h(sp)s(eed.)150 832 y(F)-8 b(or)37 b(reasons)f(explained)h
8447 -(b)s(elo)m(w,)h Fi(BZ2_bzRead)33 b Fj(will)k(decompress)f(the)h
8448 -Fi(nUnused)d Fj(b)m(ytes)j(starting)g(at)150 941 y Fi(unused)p
8449 -Fj(,)j(b)s(efore)f(starting)h(to)g(read)f(from)g(the)h(\014le)f
8450 -Fi(f)p Fj(.)67 b(A)m(t)40 b(most)g Fi(BZ_MAX_UNUSED)35
8451 -b Fj(b)m(ytes)40 b(ma)m(y)g(b)s(e)150 1051 y(supplied)34
8452 -b(lik)m(e)i(this.)54 b(If)34 b(this)h(facilit)m(y)i(is)e(not)g
8453 -(required,)h(y)m(ou)f(should)f(pass)g Fi(NULL)f Fj(and)h
8454 -Fi(0)h Fj(for)g Fi(unused)150 1160 y Fj(and)30 b(n)p
8455 -Fi(Unused)e Fj(resp)s(ectiv)m(ely)-8 b(.)150 1317 y(F)g(or)31
8456 -b(the)g(meaning)f(of)h(parameters)g Fi(small)e Fj(and)g
8457 -Fi(verbosity)p Fj(,)f(see)j Fi(BZ2_bzDecompressInit)p
8458 -Fj(.)150 1474 y(The)i(amoun)m(t)g(of)f(memory)h(needed)g(to)g
8459 -(decompress)g(a)g(\014le)g(cannot)g(b)s(e)f(determined)h(un)m(til)g
8460 -(the)g(\014le's)150 1584 y(header)h(has)f(b)s(een)g(read.)51
8461 -b(So)33 b(it)i(is)e(p)s(ossible)h(that)g Fi(BZ2_bzReadOpen)c
8462 -Fj(returns)j Fi(BZ_OK)g Fj(but)g(a)h(subse-)150 1693
8463 -y(quen)m(t)d(call)g(of)g Fi(BZ2_bzRead)c Fj(will)k(return)f
8464 -Fi(BZ_MEM_ERROR)p Fj(.)150 1850 y(P)m(ossible)i(assignmen)m(ts)e(to)i
8465 -Fi(bzerror)p Fj(:)572 2001 y Fi(BZ_CONFIG_ERROR)663 2105
8466 -y Fj(if)e(the)h(library)f(has)g(b)s(een)g(mis-compiled)572
8467 -2209 y Fi(BZ_PARAM_ERROR)663 2313 y Fj(if)g Fi(f)g Fj(is)h
8468 -Fi(NULL)663 2416 y Fj(or)f Fi(small)f Fj(is)i(neither)g
8469 -Fi(0)f Fj(nor)g Fi(1)663 2520 y Fj(or)g Fi(\(unused)46
8470 -b(==)h(NULL)g(&&)g(nUnused)f(!=)h(0\))663 2624 y Fj(or)30
8471 -b Fi(\(unused)46 b(!=)h(NULL)g(&&)g(!\(0)g(<=)g(nUnused)f(<=)h
8472 -(BZ_MAX_UNUSED\)\))572 2728 y(BZ_IO_ERROR)663 2831 y
8473 -Fj(if)30 b Fi(ferror\(f\))e Fj(is)i(nonzero)572 2935
8474 -y Fi(BZ_MEM_ERROR)663 3039 y Fj(if)g(insu\016cien)m(t)h(memory)f(is)h
8475 -(a)m(v)-5 b(ailable)572 3143 y Fi(BZ_OK)663 3247 y Fj(otherwise.)150
8476 -3403 y(P)m(ossible)32 b(return)e(v)-5 b(alues:)572 3554
8477 -y(P)m(oin)m(ter)32 b(to)f(an)f(abstract)i Fi(BZFILE)663
8478 -3658 y Fj(if)e Fi(bzerror)e Fj(is)j Fi(BZ_OK)572 3762
8479 -y(NULL)663 3866 y Fj(otherwise)150 4023 y(Allo)m(w)m(able)h(next)f
8480 -(actions:)572 4174 y Fi(BZ2_bzRead)663 4277 y Fj(if)f
8481 -Fi(bzerror)e Fj(is)j Fi(BZ_OK)572 4381 y(BZ2_bzClose)663
8482 -4485 y Fj(otherwise)150 4887 y Fe(3.4.2)63 b Fd(BZ2_bzRead)533
8483 -5074 y Fi(int)47 b(BZ2_bzRead)e(\()j(int)e(*bzerror,)g(BZFILE)g(*b,)h
8484 -(void)f(*buf,)h(int)g(len)g(\);)150 5230 y Fj(Reads)33
8485 -b(up)e(to)j Fi(len)d Fj(\(uncompressed\))i(b)m(ytes)g(from)f(the)h
8486 -(compressed)g(\014le)g Fi(b)f Fj(in)m(to)i(the)f(bu\013er)f
8487 -Fi(buf)p Fj(.)46 b(If)150 5340 y(the)28 b(read)f(w)m(as)h(successful,)g
8488 -Fi(bzerror)d Fj(is)j(set)g(to)g Fi(BZ_OK)f Fj(and)f(the)i(n)m(um)m(b)s
8489 -(er)e(of)i(b)m(ytes)g(read)g(is)f(returned.)p eop
8490 -%%Page: 22 23
8491 -22 22 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29
8492 -b(with)g Fi(libbzip2)1881 b Fl(22)150 299 y Fj(If)32
8493 -b(the)g(logical)i(end-of-stream)e(w)m(as)g(detected,)i
8494 -Fi(bzerror)c Fj(will)i(b)s(e)g(set)g(to)h Fi(BZ_STREAM_END)p
8495 -Fj(,)c(and)i(the)150 408 y(n)m(um)m(b)s(er)e(of)i(b)m(ytes)g(read)f(is)
8496 -h(returned.)40 b(All)30 b(other)h Fi(bzerror)e Fj(v)-5
8497 -b(alues)30 b(denote)h(an)f(error.)150 565 y Fi(BZ2_bzRead)k
8498 -Fj(will)k(supply)e Fi(len)g Fj(b)m(ytes,)k(unless)d(the)g(logical)j
8499 -(stream)d(end)g(is)g(detected)i(or)f(an)e(error)150 675
8500 -y(o)s(ccurs.)70 b(Because)40 b(of)g(this,)j(it)e(is)f(p)s(ossible)f(to)
8501 -i(detect)h(the)e(stream)h(end)e(b)m(y)h(observing)h(when)e(the)150
8502 -784 y(n)m(um)m(b)s(er)24 b(of)h(b)m(ytes)h(returned)e(is)h(less)h(than)
8503 -e(the)i(n)m(um)m(b)s(er)e(requested.)39 b(Nev)m(ertheless,)29
8504 -b(this)c(is)g(regarded)150 894 y(as)37 b(inadvisable;)i(y)m(ou)e
8505 -(should)f(instead)h(c)m(hec)m(k)h Fi(bzerror)c Fj(after)k(ev)m(ery)f
8506 -(call)h(and)e(w)m(atc)m(h)h(out)g(for)g Fi(BZ_)150 1004
8507 -y(STREAM_END)p Fj(.)150 1160 y(In)m(ternally)-8 b(,)47
8508 -b Fi(BZ2_bzRead)39 b Fj(copies)k(data)f(from)g(the)g(compressed)g
8509 -(\014le)g(in)g(c)m(h)m(unks)g(of)g(size)h Fi(BZ_MAX_)150
8510 -1270 y(UNUSED)28 b Fj(b)m(ytes)j(b)s(efore)e(decompressing)h(it.)41
8511 -b(If)30 b(the)g(\014le)g(con)m(tains)h(more)f(b)m(ytes)h(than)e
8512 -(strictly)i(needed)150 1380 y(to)46 b(reac)m(h)g(the)f(logical)i
8513 -(end-of-stream,)j Fi(BZ2_bzRead)42 b Fj(will)j(almost)h(certainly)g
8514 -(read)f(some)g(of)h(the)150 1489 y(trailing)f(data)g(b)s(efore)f
8515 -(signalling)h Fi(BZ_SEQUENCE_END)p Fj(.)78 b(T)-8 b(o)45
8516 -b(collect)i(the)d(read)g(but)g(un)m(used)f(data)150 1599
8517 -y(once)27 b Fi(BZ_SEQUENCE_END)22 b Fj(has)k(app)s(eared,)g(call)h
8518 -Fi(BZ2_bzReadGetUnused)21 b Fj(immediately)28 b(b)s(efore)e
8519 -Fi(BZ2_)150 1708 y(bzReadClose)p Fj(.)150 1865 y(P)m(ossible)32
8520 -b(assignmen)m(ts)e(to)i Fi(bzerror)p Fj(:)572 2016 y
8521 -Fi(BZ_PARAM_ERROR)663 2120 y Fj(if)e Fi(b)g Fj(is)h Fi(NULL)e
8522 -Fj(or)h Fi(buf)g Fj(is)g Fi(NULL)f Fj(or)i Fi(len)47
8523 -b(<)g(0)572 2224 y(BZ_SEQUENCE_ERROR)663 2328 y Fj(if)30
8524 -b Fi(b)g Fj(w)m(as)h(op)s(ened)e(with)h Fi(BZ2_bzWriteOpen)572
8525 -2431 y(BZ_IO_ERROR)663 2535 y Fj(if)g(there)h(is)f(an)g(error)h
8526 -(reading)g(from)f(the)h(compressed)f(\014le)572 2639
8527 -y Fi(BZ_UNEXPECTED_EOF)663 2743 y Fj(if)g(the)h(compressed)f(\014le)h
8528 -(ended)e(b)s(efore)i(the)f(logical)j(end-of-stream)e(w)m(as)g(detected)
8529 -572 2847 y Fi(BZ_DATA_ERROR)663 2950 y Fj(if)f(a)h(data)f(in)m(tegrit)m
8530 -(y)j(error)e(w)m(as)g(detected)g(in)g(the)f(compressed)h(stream)572
8531 -3054 y Fi(BZ_DATA_ERROR_MAGIC)663 3158 y Fj(if)f(the)h(stream)g(do)s
8532 -(es)f(not)g(b)s(egin)g(with)h(the)f(requisite)i(header)e(b)m(ytes)h
8533 -(\(ie,)h(is)e(not)663 3262 y(a)g Fi(bzip2)f Fj(data)i(\014le\).)61
8534 -b(This)30 b(is)h(really)g(a)f(sp)s(ecial)h(case)g(of)g
8535 -Fi(BZ_DATA_ERROR)p Fj(.)572 3365 y Fi(BZ_MEM_ERROR)663
8536 -3469 y Fj(if)f(insu\016cien)m(t)h(memory)f(w)m(as)h(a)m(v)-5
8537 -b(ailable)572 3573 y Fi(BZ_STREAM_END)663 3677 y Fj(if)30
8538 -b(the)h(logical)h(end)e(of)h(stream)g(w)m(as)f(detected.)572
8539 -3781 y Fi(BZ_OK)663 3884 y Fj(otherwise.)150 4041 y(P)m(ossible)i
8540 -(return)e(v)-5 b(alues:)572 4192 y(n)m(um)m(b)s(er)29
8541 -b(of)i(b)m(ytes)g(read)663 4296 y(if)f Fi(bzerror)e Fj(is)j
8542 -Fi(BZ_OK)e Fj(or)h Fi(BZ_STREAM_END)572 4400 y Fj(unde\014ned)663
8543 -4503 y(otherwise)150 4660 y(Allo)m(w)m(able)i(next)f(actions:)572
8544 -4811 y(collect)i(data)d(from)h Fi(buf)p Fj(,)e(then)i
8545 -Fi(BZ2_bzRead)c Fj(or)k Fi(BZ2_bzReadClose)663 4915 y
8546 -Fj(if)f Fi(bzerror)e Fj(is)j Fi(BZ_OK)572 5019 y Fj(collect)i(data)d
8547 -(from)h Fi(buf)p Fj(,)e(then)i Fi(BZ2_bzReadClose)26
8548 -b Fj(or)k Fi(BZ2_bzReadGetUnused)663 5123 y Fj(if)g Fi(bzerror)e
8549 -Fj(is)j Fi(BZ_SEQUENCE_END)572 5226 y(BZ2_bzReadClose)663
8550 -5330 y Fj(otherwise)p eop
8551 -%%Page: 23 24
8552 -23 23 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29
8553 -b(with)g Fi(libbzip2)1881 b Fl(23)150 299 y Fe(3.4.3)63
8554 -b Fd(BZ2_bzReadGetUnused)533 486 y Fi(void)47 b(BZ2_bzReadGetUnused)42
8555 -b(\()48 b(int*)e(bzerror,)g(BZFILE)g(*b,)1822 589 y(void**)g(unused,)g
8556 -(int*)g(nUnused)g(\);)150 746 y Fj(Returns)35 b(data)g(whic)m(h)f(w)m
8557 -(as)i(read)e(from)h(the)g(compressed)g(\014le)g(but)g(w)m(as)g(not)g
8558 -(needed)g(to)h(get)g(to)g(the)150 856 y(logical)44 b(end-of-stream.)76
8559 -b Fi(*unused)39 b Fj(is)j(set)h(to)f(the)g(address)f(of)h(the)g(data,)k
8560 -(and)40 b Fi(*nUnused)g Fj(to)j(the)150 965 y(n)m(um)m(b)s(er)28
8561 -b(of)h(b)m(ytes.)41 b Fi(*nUnused)27 b Fj(will)i(b)s(e)g(set)g(to)h(a)f
8562 -(v)-5 b(alue)30 b(b)s(et)m(w)m(een)g Fi(0)e Fj(and)g
8563 -Fi(BZ_MAX_UNUSED)e Fj(inclusiv)m(e.)150 1122 y(This)f(function)g(ma)m
8564 -(y)h(only)f(b)s(e)g(called)h(once)g Fi(BZ2_bzRead)d Fj(has)i(signalled)
8565 -h Fi(BZ_STREAM_END)21 b Fj(but)k(b)s(efore)150 1232 y
8566 -Fi(BZ2_bzReadClose)p Fj(.)150 1389 y(P)m(ossible)32 b(assignmen)m(ts)e
8567 -(to)i Fi(bzerror)p Fj(:)572 1540 y Fi(BZ_PARAM_ERROR)663
8568 -1644 y Fj(if)e Fi(b)g Fj(is)h Fi(NULL)663 1747 y Fj(or)f
8569 -Fi(unused)f Fj(is)h Fi(NULL)g Fj(or)g Fi(nUnused)f Fj(is)h
8570 -Fi(NULL)572 1851 y(BZ_SEQUENCE_ERROR)663 1955 y Fj(if)g
8571 -Fi(BZ_STREAM_END)d Fj(has)j(not)g(b)s(een)g(signalled)663
8572 -2059 y(or)g(if)h Fi(b)f Fj(w)m(as)g(op)s(ened)g(with)g
8573 -Fi(BZ2_bzWriteOpen)542 2162 y(BZ_OK)663 2266 y Fj(otherwise)150
8574 -2423 y(Allo)m(w)m(able)i(next)f(actions:)572 2574 y Fi(BZ2_bzReadClose)
8575 -150 2882 y Fe(3.4.4)63 b Fd(BZ2_bzReadClose)533 3068
8576 -y Fi(void)47 b(BZ2_bzReadClose)c(\()48 b(int)f(*bzerror,)e(BZFILE)h(*b)
8577 -h(\);)150 3225 y Fj(Releases)35 b(all)e(memory)h(p)s(ertaining)f(to)h
8578 -(the)f(compressed)h(\014le)f Fi(b)p Fj(.)49 b Fi(BZ2_bzReadClose)29
8579 -b Fj(do)s(es)j(not)i(call)150 3335 y Fi(fclose)d Fj(on)h(the)g
8580 -(underlying)g(\014le)g(handle,)h(so)f(y)m(ou)h(should)e(do)h(that)h(y)m
8581 -(ourself)g(if)f(appropriate.)47 b Fi(BZ2_)150 3445 y(bzReadClose)27
8582 -b Fj(should)j(b)s(e)f(called)j(to)f(clean)g(up)e(after)i(all)g(error)g
8583 -(situations.)150 3601 y(P)m(ossible)h(assignmen)m(ts)e(to)i
8584 -Fi(bzerror)p Fj(:)572 3752 y Fi(BZ_SEQUENCE_ERROR)663
8585 -3856 y Fj(if)e Fi(b)g Fj(w)m(as)h(op)s(ened)e(with)h
8586 -Fi(BZ2_bzOpenWrite)572 3960 y(BZ_OK)663 4064 y Fj(otherwise)150
8587 -4221 y(Allo)m(w)m(able)i(next)f(actions:)572 4372 y(none)150
8588 -4679 y Fe(3.4.5)63 b Fd(BZ2_bzWriteOpen)533 4866 y Fi(BZFILE)46
8589 -b(*BZ2_bzWriteOpen)e(\()j(int)g(*bzerror,)e(FILE)i(*f,)1774
8590 -4970 y(int)g(blockSize100k,)d(int)j(verbosity,)1774 5074
8591 -y(int)g(workFactor)e(\);)150 5230 y Fj(Prepare)31 b(to)h(write)g
8592 -(compressed)f(data)g(to)h(\014le)f(handle)f Fi(f)p Fj(.)42
8593 -b Fi(f)30 b Fj(should)g(refer)i(to)f(a)h(\014le)f(whic)m(h)f(has)h(b)s
8594 -(een)150 5340 y(op)s(ened)f(for)g(writing,)h(and)f(for)g(whic)m(h)g
8595 -(the)h(error)g(indicator)g(\()p Fi(ferror\(f\))p Fj(\)is)e(not)h(set.)p
8596 -eop
8597 -%%Page: 24 25
8598 -24 24 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29
8599 -b(with)g Fi(libbzip2)1881 b Fl(24)150 299 y Fj(F)-8 b(or)31
8600 -b(the)g(meaning)f(of)h(parameters)g Fi(blockSize100k)p
8601 -Fj(,)c Fi(verbosity)h Fj(and)h Fi(workFactor)p Fj(,)f(see)150
8602 -408 y Fi(BZ2_bzCompressInit)p Fj(.)150 565 y(All)38 b(required)g
8603 -(memory)g(is)g(allo)s(cated)i(at)e(this)h(stage,)i(so)d(if)g(the)h
8604 -(call)g(completes)g(successfully)-8 b(,)41 b Fi(BZ_)150
8605 -675 y(MEM_ERROR)28 b Fj(cannot)j(b)s(e)e(signalled)i(b)m(y)g(a)f
8606 -(subsequen)m(t)g(call)h(to)h Fi(BZ2_bzWrite)p Fj(.)150
8607 -832 y(P)m(ossible)g(assignmen)m(ts)e(to)i Fi(bzerror)p
8608 -Fj(:)572 983 y Fi(BZ_CONFIG_ERROR)663 1087 y Fj(if)e(the)h(library)f
8609 -(has)g(b)s(een)g(mis-compiled)572 1190 y Fi(BZ_PARAM_ERROR)663
8610 -1294 y Fj(if)g Fi(f)g Fj(is)h Fi(NULL)663 1398 y Fj(or)f
8611 -Fi(blockSize100k)45 b(<)i(1)30 b Fj(or)h Fi(blockSize100k)44
8612 -b(>)j(9)572 1502 y(BZ_IO_ERROR)663 1605 y Fj(if)30 b
8613 -Fi(ferror\(f\))e Fj(is)i(nonzero)572 1709 y Fi(BZ_MEM_ERROR)663
8614 -1813 y Fj(if)g(insu\016cien)m(t)h(memory)f(is)h(a)m(v)-5
8615 -b(ailable)572 1917 y Fi(BZ_OK)663 2021 y Fj(otherwise)150
8616 -2177 y(P)m(ossible)32 b(return)e(v)-5 b(alues:)572 2328
8617 -y(P)m(oin)m(ter)32 b(to)f(an)f(abstract)i Fi(BZFILE)663
8618 -2432 y Fj(if)e Fi(bzerror)e Fj(is)j Fi(BZ_OK)572 2536
8619 -y(NULL)663 2640 y Fj(otherwise)150 2797 y(Allo)m(w)m(able)h(next)f
8620 -(actions:)572 2948 y Fi(BZ2_bzWrite)663 3051 y Fj(if)f
8621 -Fi(bzerror)e Fj(is)j Fi(BZ_OK)597 3155 y Fj(\(y)m(ou)24
8622 -b(could)f(go)h(directly)g(to)g Fi(BZ2_bzWriteClose)p
8623 -Fj(,)19 b(but)j(this)h(w)m(ould)g(b)s(e)g(prett)m(y)h(p)s(oin)m
8624 -(tless\))572 3259 y Fi(BZ2_bzWriteClose)663 3363 y Fj(otherwise)150
8625 -3852 y Fe(3.4.6)63 b Fd(BZ2_bzWrite)533 4039 y Fi(void)47
8626 -b(BZ2_bzWrite)e(\()i(int)g(*bzerror,)e(BZFILE)h(*b,)h(void)g(*buf,)f
8627 -(int)h(len)g(\);)150 4196 y Fj(Absorbs)35 b Fi(len)h
8628 -Fj(b)m(ytes)h(from)f(the)h(bu\013er)f Fi(buf)p Fj(,)h(ev)m(en)m(tually)
8629 -i(to)e(b)s(e)f(compressed)g(and)g(written)h(to)h(the)150
8630 -4306 y(\014le.)150 4463 y(P)m(ossible)32 b(assignmen)m(ts)e(to)i
8631 -Fi(bzerror)p Fj(:)572 4614 y Fi(BZ_PARAM_ERROR)663 4717
8632 -y Fj(if)e Fi(b)g Fj(is)h Fi(NULL)e Fj(or)h Fi(buf)g Fj(is)g
8633 -Fi(NULL)f Fj(or)i Fi(len)47 b(<)g(0)572 4821 y(BZ_SEQUENCE_ERROR)663
8634 -4925 y Fj(if)30 b(b)g(w)m(as)g(op)s(ened)g(with)g Fi(BZ2_bzReadOpen)572
8635 -5029 y(BZ_IO_ERROR)663 5132 y Fj(if)g(there)h(is)f(an)g(error)h
8636 -(writing)g(the)g(compressed)f(\014le.)572 5236 y Fi(BZ_OK)663
8637 -5340 y Fj(otherwise)p eop
8638 -%%Page: 25 26
8639 -25 25 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29
8640 -b(with)g Fi(libbzip2)1881 b Fl(25)150 299 y Fe(3.4.7)63
8641 -b Fd(BZ2_bzWriteClose)533 486 y Fi(void)47 b(BZ2_bzWriteClose)c(\()48
8642 -b(int)f(*bzerror,)e(BZFILE*)h(f,)1679 589 y(int)h(abandon,)1679
8643 -693 y(unsigned)e(int*)i(nbytes_in,)1679 797 y(unsigned)e(int*)i
8644 -(nbytes_out)e(\);)533 1005 y(void)i(BZ2_bzWriteClose64)c(\()k(int)g
8645 -(*bzerror,)e(BZFILE*)h(f,)1774 1108 y(int)h(abandon,)1774
8646 -1212 y(unsigned)f(int*)g(nbytes_in_lo32,)1774 1316 y(unsigned)g(int*)g
8647 -(nbytes_in_hi32,)1774 1420 y(unsigned)g(int*)g(nbytes_out_lo32,)1774
8648 -1523 y(unsigned)g(int*)g(nbytes_out_hi32)e(\);)150 1680
8649 -y Fj(Compresses)38 b(and)f(\015ushes)g(to)i(the)g(compressed)f(\014le)h
8650 -(all)f(data)h(so)g(far)f(supplied)f(b)m(y)h Fi(BZ2_bzWrite)p
8651 -Fj(.)150 1790 y(The)h(logical)i(end-of-stream)e(mark)m(ers)h(are)f
8652 -(also)g(written,)j(so)d(subsequen)m(t)g(calls)g(to)h
8653 -Fi(BZ2_bzWrite)150 1899 y Fj(are)31 b(illegal.)45 b(All)31
8654 -b(memory)g(asso)s(ciated)h(with)f(the)g(compressed)g(\014le)h
8655 -Fi(b)e Fj(is)h(released.)44 b Fi(fflush)29 b Fj(is)i(called)150
8656 -2009 y(on)f(the)h(compressed)f(\014le,)h(but)f(it)h(is)f(not)h
8657 -Fi(fclose)p Fj('d.)150 2166 y(If)g Fi(BZ2_bzWriteClose)d
8658 -Fj(is)j(called)i(to)f(clean)g(up)f(after)h(an)f(error,)i(the)f(only)g
8659 -(action)h(is)e(to)i(release)g(the)150 2275 y(memory)-8
8660 -b(.)40 b(The)28 b(library)g(records)g(the)g(error)g(co)s(des)g(issued)f
8661 -(b)m(y)g(previous)h(calls,)h(so)f(this)g(situation)h(will)150
8662 -2385 y(b)s(e)37 b(detected)i(automatically)-8 b(.)64
8663 -b(There)38 b(is)f(no)h(attempt)g(to)h(complete)g(the)e(compression)h
8664 -(op)s(eration,)150 2495 y(nor)f(to)h Fi(fflush)e Fj(the)h(compressed)g
8665 -(\014le.)62 b(Y)-8 b(ou)37 b(can)g(force)h(this)g(b)s(eha)m(viour)e(to)
8666 -i(happ)s(en)e(ev)m(en)i(in)f(the)150 2604 y(case)31 b(of)g(no)f(error,)
8667 -h(b)m(y)f(passing)g(a)h(nonzero)g(v)-5 b(alue)30 b(to)i
8668 -Fi(abandon)p Fj(.)150 2761 y(If)h Fi(nbytes_in)d Fj(is)j(non-n)m(ull,)g
8669 -Fi(*nbytes_in)d Fj(will)j(b)s(e)f(set)i(to)f(b)s(e)g(the)g(total)h(v)m
8670 -(olume)g(of)f(uncompressed)150 2871 y(data)k(handled.)58
8671 -b(Similarly)-8 b(,)38 b Fi(nbytes_out)c Fj(will)j(b)s(e)f(set)h(to)g
8672 -(the)g(total)h(v)m(olume)g(of)e(compressed)h(data)150
8673 -2980 y(written.)i(F)-8 b(or)24 b(compatibilit)m(y)i(with)d(older)h(v)m
8674 -(ersions)g(of)g(the)g(library)-8 b(,)25 b Fi(BZ2_bzWriteClose)19
8675 -b Fj(only)24 b(yields)150 3090 y(the)39 b(lo)m(w)m(er)i(32)e(bits)g(of)
8676 -g(these)g(coun)m(ts.)67 b(Use)39 b Fi(BZ2_bzWriteClose64)34
8677 -b Fj(if)39 b(y)m(ou)g(w)m(an)m(t)g(the)h(full)e(64)i(bit)150
8678 -3199 y(coun)m(ts.)h(These)31 b(t)m(w)m(o)h(functions)e(are)h(otherwise)
8679 -g(absolutely)g(iden)m(tical.)150 3356 y(P)m(ossible)h(assignmen)m(ts)e
8680 -(to)i Fi(bzerror)p Fj(:)572 3507 y Fi(BZ_SEQUENCE_ERROR)663
8681 -3611 y Fj(if)e Fi(b)g Fj(w)m(as)h(op)s(ened)e(with)h
8682 -Fi(BZ2_bzReadOpen)572 3715 y(BZ_IO_ERROR)663 3819 y Fj(if)g(there)h(is)
8683 -f(an)g(error)h(writing)g(the)g(compressed)f(\014le)572
8684 -3922 y Fi(BZ_OK)663 4026 y Fj(otherwise)150 4296 y Fe(3.4.8)63
8685 -b(Handling)41 b(em)m(b)s(edded)g(compressed)h(data)e(streams)150
8686 -4489 y Fj(The)i(high-lev)m(el)h(library)e(facilitates)k(use)c(of)h
8687 -Fi(bzip2)e Fj(data)i(streams)g(whic)m(h)f(form)g(some)h(part)g(of)g(a)
8688 -150 4598 y(surrounding,)29 b(larger)i(data)g(stream.)225
8689 -4755 y Fh(\017)60 b Fj(F)-8 b(or)49 b(writing,)k(the)c(library)f(tak)m
8690 -(es)i(an)e(op)s(en)f(\014le)i(handle,)j(writes)d(compressed)f(data)h
8691 -(to)g(it,)330 4865 y Fi(fflush)p Fj(es)37 b(it)h(but)f(do)s(es)h(not)g
8692 -Fi(fclose)f Fj(it.)64 b(The)38 b(calling)h(application)g(can)f(write)g
8693 -(its)h(o)m(wn)f(data)330 4974 y(b)s(efore)30 b(and)g(after)h(the)g
8694 -(compressed)f(data)h(stream,)g(using)f(that)h(same)f(\014le)h(handle.)
8695 -225 5121 y Fh(\017)60 b Fj(Reading)33 b(is)g(more)g(complex,)h(and)e
8696 -(the)h(facilities)i(are)e(not)g(as)g(general)h(as)f(they)g(could)f(b)s
8697 -(e)h(since)330 5230 y(generalit)m(y)e(is)d(hard)g(to)h(reconcile)i
8698 -(with)d(e\016ciency)-8 b(.)42 b Fi(BZ2_bzRead)25 b Fj(reads)k(from)f
8699 -(the)h(compressed)330 5340 y(\014le)39 b(in)g(blo)s(c)m(ks)g(of)h(size)
8700 -f Fi(BZ_MAX_UNUSED)d Fj(b)m(ytes,)42 b(and)c(in)h(doing)g(so)g
8701 -(probably)g(will)g(o)m(v)m(ersho)s(ot)p eop
8702 -%%Page: 26 27
8703 -26 26 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29
8704 -b(with)g Fi(libbzip2)1881 b Fl(26)330 299 y Fj(the)37
8705 -b(logical)i(end)e(of)g(compressed)g(stream.)60 b(T)-8
8706 -b(o)38 b(reco)m(v)m(er)i(this)c(data)i(once)f(decompression)g(has)330
8707 -408 y(ended,)27 b(call)h Fi(BZ2_bzReadGetUnused)21 b
8708 -Fj(after)27 b(the)g(last)h(call)f(of)g Fi(BZ2_bzRead)d
8709 -Fj(\(the)j(one)g(returning)330 518 y Fi(BZ_STREAM_END)p
8710 -Fj(\))g(but)j(b)s(efore)g(calling)i Fi(BZ2_bzReadClose)p
8711 -Fj(.)150 702 y(This)j(mec)m(hanism)h(mak)m(es)g(it)h(easy)f(to)g
8712 -(decompress)g(m)m(ultiple)g Fi(bzip2)e Fj(streams)i(placed)g
8713 -(end-to-end.)150 812 y(As)67 b(the)h(end)g(of)f(one)i(stream,)77
8714 -b(when)67 b Fi(BZ2_bzRead)e Fj(returns)j Fi(BZ_STREAM_END)p
8715 -Fj(,)73 b(call)c Fi(BZ2_)150 921 y(bzReadGetUnused)34
8716 -b Fj(to)40 b(collect)h(the)e(un)m(used)e(data)i(\(cop)m(y)g(it)g(in)m
8717 -(to)h(y)m(our)f(o)m(wn)f(bu\013er)g(somewhere\).)150
8718 -1031 y(That)52 b(data)h(forms)f(the)g(start)h(of)f(the)h(next)f
8719 -(compressed)g(stream.)107 b(T)-8 b(o)53 b(start)g(uncompressing)150
8720 -1140 y(that)61 b(next)f(stream,)68 b(call)62 b Fi(BZ2_bzReadOpen)56
8721 -b Fj(again,)68 b(feeding)61 b(in)e(the)i(un)m(used)e(data)h(via)h(the)
8722 -150 1250 y Fi(unused)p Fj(/)p Fi(nUnused)28 b Fj(parameters.)45
8723 -b(Keep)32 b(doing)f(this)h(un)m(til)g Fi(BZ_STREAM_END)c
8724 -Fj(return)j(coincides)h(with)150 1360 y(the)j(ph)m(ysical)g(end)f(of)h
8725 -(\014le)f(\()p Fi(feof\(f\))p Fj(\).)52 b(In)34 b(this)h(situation)g
8726 -Fi(BZ2_bzReadGetUnused)30 b Fj(will)35 b(of)f(course)150
8727 -1469 y(return)c(no)g(data.)150 1626 y(This)24 b(should)g(giv)m(e)i
8728 -(some)f(feel)h(for)f(ho)m(w)g(the)g(high-lev)m(el)h(in)m(terface)h(can)
8729 -d(b)s(e)g(used.)38 b(If)25 b(y)m(ou)g(require)g(extra)150
8730 -1736 y(\015exibilit)m(y)-8 b(,)32 b(y)m(ou'll)g(ha)m(v)m(e)f(to)g(bite)
8731 -g(the)g(bullet)g(and)e(get)j(to)f(grips)f(with)h(the)f(lo)m(w-lev)m(el)
8732 -k(in)m(terface.)150 1987 y Fe(3.4.9)63 b(Standard)40
8733 -b(\014le-reading/writing)j(co)s(de)150 2179 y Fj(Here's)31
8734 -b(ho)m(w)g(y)m(ou'd)f(write)h(data)g(to)g(a)g(compressed)f(\014le:)390
8735 -2538 y Fi(FILE*)142 b(f;)390 2642 y(BZFILE*)46 b(b;)390
8736 -2746 y(int)238 b(nBuf;)390 2849 y(char)190 b(buf[)46
8737 -b(/*)i(whatever)d(size)i(you)g(like)f(*/)i(];)390 2953
8738 -y(int)238 b(bzerror;)390 3057 y(int)g(nWritten;)390 3264
8739 -y(f)47 b(=)h(fopen)e(\()i("myfile.bz2",)c("w")j(\);)390
8740 -3368 y(if)g(\(!f\))g({)533 3472 y(/*)g(handle)f(error)h(*/)390
8741 -3576 y(})390 3680 y(b)g(=)h(BZ2_bzWriteOpen)c(\()j(&bzerror,)e(f,)i(9)h
8742 -(\);)390 3783 y(if)f(\(bzerror)f(!=)h(BZ_OK\))f({)533
8743 -3887 y(BZ2_bzWriteClose)e(\()j(b)g(\);)533 3991 y(/*)g(handle)f(error)h
8744 -(*/)390 4095 y(})390 4302 y(while)f(\()i(/*)f(condition)e(*/)i(\))h({)
8745 -533 4406 y(/*)f(get)g(data)g(to)g(write)f(into)h(buf,)g(and)g(set)g
8746 -(nBuf)f(appropriately)e(*/)533 4510 y(nWritten)i(=)h(BZ2_bzWrite)e(\()i
8747 -(&bzerror,)f(b,)h(buf,)f(nBuf)h(\);)533 4614 y(if)g(\(bzerror)f(==)h
8748 -(BZ_IO_ERROR\))e({)676 4717 y(BZ2_bzWriteClose)f(\()j(&bzerror,)e(b)j
8749 -(\);)676 4821 y(/*)g(handle)e(error)g(*/)533 4925 y(})390
8750 -5029 y(})390 5236 y(BZ2_bzWriteClose)d(\()48 b(&bzerror,)d(b)j(\);)390
8751 -5340 y(if)f(\(bzerror)f(==)h(BZ_IO_ERROR\))d({)p eop
8752 -%%Page: 27 28
8753 -27 27 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29
8754 -b(with)g Fi(libbzip2)1881 b Fl(27)533 299 y Fi(/*)47
8755 -b(handle)f(error)h(*/)390 403 y(})150 559 y Fj(And)29
8756 -b(to)i(read)g(from)f(a)g(compressed)h(\014le:)390 711
8757 -y Fi(FILE*)142 b(f;)390 814 y(BZFILE*)46 b(b;)390 918
8758 -y(int)238 b(nBuf;)390 1022 y(char)190 b(buf[)46 b(/*)i(whatever)d(size)
8759 -i(you)g(like)f(*/)i(];)390 1126 y(int)238 b(bzerror;)390
8760 -1229 y(int)g(nWritten;)390 1437 y(f)47 b(=)h(fopen)e(\()i
8761 -("myfile.bz2",)c("r")j(\);)390 1541 y(if)g(\(!f\))g({)533
8762 -1645 y(/*)g(handle)f(error)h(*/)390 1748 y(})390 1852
8763 -y(b)g(=)h(BZ2_bzReadOpen)c(\()j(&bzerror,)f(f,)h(0,)g(NULL,)f(0)i(\);)
8764 -390 1956 y(if)f(\(bzerror)f(!=)h(BZ_OK\))f({)533 2060
8765 -y(BZ2_bzReadClose)e(\()j(&bzerror,)f(b)h(\);)533 2163
8766 -y(/*)g(handle)f(error)h(*/)390 2267 y(})390 2475 y(bzerror)f(=)h
8767 -(BZ_OK;)390 2579 y(while)f(\(bzerror)g(==)h(BZ_OK)f(&&)i(/*)f
8768 -(arbitrary)e(other)h(conditions)f(*/\))i({)533 2682 y(nBuf)g(=)g
8769 -(BZ2_bzRead)e(\()j(&bzerror,)d(b,)i(buf,)g(/*)g(size)g(of)g(buf)g(*/)g
8770 -(\);)533 2786 y(if)g(\(bzerror)f(==)h(BZ_OK\))f({)676
8771 -2890 y(/*)i(do)f(something)e(with)i(buf[0)f(..)h(nBuf-1])f(*/)533
8772 -2994 y(})390 3097 y(})390 3201 y(if)h(\(bzerror)f(!=)h(BZ_STREAM_END\))
8773 -d({)533 3305 y(BZ2_bzReadClose)g(\()j(&bzerror,)f(b)h(\);)533
8774 -3409 y(/*)g(handle)f(error)h(*/)390 3513 y(})g(else)g({)533
8775 -3616 y(BZ2_bzReadClose)d(\()j(&bzerror)f(\);)390 3720
8776 -y(})150 3991 y Fk(3.5)68 b(Utilit)l(y)47 b(functions)150
8777 -4264 y Fe(3.5.1)63 b Fd(BZ2_bzBuffToBuffCompress)533
8778 -4451 y Fi(int)47 b(BZ2_bzBuffToBuffCompress\()41 b(char*)428
8779 -b(dest,)1965 4555 y(unsigned)46 b(int*)g(destLen,)1965
8780 -4658 y(char*)428 b(source,)1965 4762 y(unsigned)46 b(int)94
8781 -b(sourceLen,)1965 4866 y(int)524 b(blockSize100k,)1965
8782 -4970 y(int)g(verbosity,)1965 5074 y(int)g(workFactor)45
8783 -b(\);)150 5230 y Fj(A)m(ttempts)32 b(to)f(compress)f(the)h(data)g(in)f
8784 -Fi(source[0)e(..)i(sourceLen-1])d Fj(in)m(to)k(the)g(destination)g
8785 -(bu\013er,)150 5340 y Fi(dest[0)e(..)g(*destLen-1])p
8786 -Fj(.)36 b(If)25 b(the)g(destination)h(bu\013er)e(is)h(big)f(enough,)i
8787 -Fi(*destLen)d Fj(is)i(set)g(to)h(the)f(size)p eop
8788 -%%Page: 28 29
8789 -28 28 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29
8790 -b(with)g Fi(libbzip2)1881 b Fl(28)150 299 y Fj(of)27
8791 -b(the)f(compressed)h(data,)h(and)d Fi(BZ_OK)g Fj(is)i(returned.)38
8792 -b(If)27 b(the)f(compressed)h(data)g(w)m(on't)g(\014t,)g
8793 -Fi(*destLen)150 408 y Fj(is)j(unc)m(hanged,)g(and)g Fi(BZ_OUTBUFF_FULL)
8794 -c Fj(is)31 b(returned.)150 565 y(Compression)22 b(in)h(this)f(manner)g
8795 -(is)h(a)f(one-shot)i(ev)m(en)m(t,)i(done)d(with)f(a)h(single)g(call)h
8796 -(to)f(this)g(function.)38 b(The)150 675 y(resulting)26
8797 -b(compressed)g(data)f(is)h(a)g(complete)h Fi(bzip2)d
8798 -Fj(format)i(data)g(stream.)39 b(There)26 b(is)f(no)h(mec)m(hanism)150
8799 -784 y(for)d(making)g(additional)h(calls)f(to)h(pro)m(vide)g(extra)f
8800 -(input)g(data.)38 b(If)23 b(y)m(ou)g(w)m(an)m(t)h(that)f(kind)f(of)i
8801 -(mec)m(hanism,)150 894 y(use)30 b(the)h(lo)m(w-lev)m(el)i(in)m
8802 -(terface.)150 1051 y(F)-8 b(or)31 b(the)g(meaning)f(of)h(parameters)g
8803 -Fi(blockSize100k)p Fj(,)c Fi(verbosity)h Fj(and)h Fi(workFactor)p
8804 -Fj(,)150 1160 y(see)i Fi(BZ2_bzCompressInit)p Fj(.)150
8805 -1317 y(T)-8 b(o)37 b(guaran)m(tee)h(that)f(the)f(compressed)h(data)f
8806 -(will)h(\014t)f(in)g(its)h(bu\013er,)g(allo)s(cate)h(an)e(output)g
8807 -(bu\013er)g(of)150 1427 y(size)31 b(1\045)g(larger)g(than)f(the)h
8808 -(uncompressed)e(data,)i(plus)f(six)g(h)m(undred)f(extra)i(b)m(ytes.)150
8809 -1584 y Fi(BZ2_bzBuffToBuffDecompre)o(ss)24 b Fj(will)31
8810 -b(not)g(write)g(data)f(at)h(or)g(b)s(ey)m(ond)e Fi(dest[*destLen])p
8811 -Fj(,)e(ev)m(en)k(in)150 1693 y(case)g(of)g(bu\013er)e(o)m(v)m(er\015o)m
8812 -(w.)150 1850 y(P)m(ossible)j(return)e(v)-5 b(alues:)572
8813 -2001 y Fi(BZ_CONFIG_ERROR)663 2105 y Fj(if)30 b(the)h(library)f(has)g
8814 -(b)s(een)g(mis-compiled)572 2209 y Fi(BZ_PARAM_ERROR)663
8815 -2313 y Fj(if)g Fi(dest)f Fj(is)i Fi(NULL)e Fj(or)i Fi(destLen)d
8816 -Fj(is)i Fi(NULL)663 2416 y Fj(or)g Fi(blockSize100k)45
8817 -b(<)i(1)30 b Fj(or)h Fi(blockSize100k)44 b(>)j(9)663
8818 -2520 y Fj(or)30 b Fi(verbosity)46 b(<)h(0)30 b Fj(or)h
8819 -Fi(verbosity)45 b(>)i(4)663 2624 y Fj(or)30 b Fi(workFactor)45
8820 -b(<)j(0)30 b Fj(or)g Fi(workFactor)45 b(>)j(250)572 2728
8821 -y(BZ_MEM_ERROR)663 2831 y Fj(if)30 b(insu\016cien)m(t)h(memory)f(is)h
8822 -(a)m(v)-5 b(ailable)572 2935 y Fi(BZ_OUTBUFF_FULL)663
8823 -3039 y Fj(if)30 b(the)h(size)g(of)g(the)f(compressed)h(data)f(exceeds)i
8824 -Fi(*destLen)572 3143 y(BZ_OK)663 3247 y Fj(otherwise)150
8825 -3616 y Fe(3.5.2)63 b Fd(BZ2_bzBuffToBuffDecompress)533
8826 -3803 y Fi(int)47 b(BZ2_bzBuffToBuffDecompres)o(s)42 b(\()47
8827 -b(char*)428 b(dest,)2108 3906 y(unsigned)46 b(int*)g(destLen,)2108
8828 -4010 y(char*)428 b(source,)2108 4114 y(unsigned)46 b(int)94
8829 -b(sourceLen,)2108 4218 y(int)524 b(small,)2108 4322 y(int)g(verbosity)
8830 -46 b(\);)150 4478 y Fj(A)m(ttempts)22 b(to)g(decompress)f(the)h(data)f
8831 -(in)g Fi(source[0)28 b(..)i(sourceLen-1])18 b Fj(in)m(to)k(the)f
8832 -(destination)h(bu\013er,)150 4588 y Fi(dest[0)29 b(..)g(*destLen-1])p
8833 -Fj(.)61 b(If)37 b(the)h(destination)h(bu\013er)e(is)h(big)g(enough,)i
8834 -Fi(*destLen)35 b Fj(is)j(set)h(to)g(the)150 4698 y(size)e(of)e(the)h
8835 -(uncompressed)f(data,)j(and)c Fi(BZ_OK)h Fj(is)g(returned.)56
8836 -b(If)36 b(the)g(compressed)f(data)h(w)m(on't)h(\014t,)150
8837 -4807 y Fi(*destLen)28 b Fj(is)j(unc)m(hanged,)f(and)f
8838 -Fi(BZ_OUTBUFF_FULL)d Fj(is)31 b(returned.)150 4964 y
8839 -Fi(source)e Fj(is)h(assumed)f(to)j(hold)e(a)g(complete)i
8840 -Fi(bzip2)d Fj(format)i(data)g(stream.)150 5074 y Fi
8841 -(BZ2_bzBuffToBuffDecompre)o(ss)38 b Fj(tries)46 b(to)f(decompress)f
8842 -(the)h(en)m(tiret)m(y)i(of)d(the)h(stream)g(in)m(to)h(the)150
8843 -5183 y(output)30 b(bu\013er.)150 5340 y(F)-8 b(or)31
8844 -b(the)g(meaning)f(of)h(parameters)g Fi(small)e Fj(and)g
8845 -Fi(verbosity)p Fj(,)f(see)j Fi(BZ2_bzDecompressInit)p
8846 -Fj(.)p eop
8847 -%%Page: 29 30
8848 -29 29 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29
8849 -b(with)g Fi(libbzip2)1881 b Fl(29)150 299 y Fj(Because)31
8850 -b(the)g(compression)g(ratio)g(of)g(the)g(compressed)f(data)h(cannot)g
8851 -(b)s(e)f(kno)m(wn)g(in)g(adv)-5 b(ance,)31 b(there)150
8852 -408 y(is)g(no)f(easy)i(w)m(a)m(y)f(to)h(guaran)m(tee)g(that)f(the)g
8853 -(output)g(bu\013er)f(will)h(b)s(e)f(big)h(enough.)42
8854 -b(Y)-8 b(ou)30 b(ma)m(y)i(of)e(course)150 518 y(mak)m(e)j(arrangemen)m
8855 -(ts)h(in)e(y)m(our)h(co)s(de)f(to)i(record)f(the)g(size)g(of)g(the)g
8856 -(uncompressed)e(data,)j(but)e(suc)m(h)g(a)150 628 y(mec)m(hanism)e(is)h
8857 -(b)s(ey)m(ond)f(the)g(scop)s(e)h(of)f(this)h(library)-8
8858 -b(.)150 784 y Fi(BZ2_bzBuffToBuffDecompre)o(ss)24 b Fj(will)31
8859 -b(not)g(write)g(data)f(at)h(or)g(b)s(ey)m(ond)e Fi(dest[*destLen])p
8860 -Fj(,)e(ev)m(en)k(in)150 894 y(case)g(of)g(bu\013er)e(o)m(v)m(er\015o)m
8861 -(w.)150 1051 y(P)m(ossible)j(return)e(v)-5 b(alues:)572
8862 -1202 y Fi(BZ_CONFIG_ERROR)663 1306 y Fj(if)30 b(the)h(library)f(has)g
8863 -(b)s(een)g(mis-compiled)572 1409 y Fi(BZ_PARAM_ERROR)663
8864 -1513 y Fj(if)g Fi(dest)f Fj(is)i Fi(NULL)e Fj(or)i Fi(destLen)d
8865 -Fj(is)i Fi(NULL)663 1617 y Fj(or)g Fi(small)47 b(!=)g(0)g(&&)h(small)e
8866 -(!=)h(1)663 1721 y Fj(or)30 b Fi(verbosity)46 b(<)h(0)30
8867 -b Fj(or)h Fi(verbosity)45 b(>)i(4)572 1825 y(BZ_MEM_ERROR)663
8868 -1928 y Fj(if)30 b(insu\016cien)m(t)h(memory)f(is)h(a)m(v)-5
8869 -b(ailable)572 2032 y Fi(BZ_OUTBUFF_FULL)663 2136 y Fj(if)30
8870 -b(the)h(size)g(of)g(the)f(compressed)h(data)f(exceeds)i
8871 -Fi(*destLen)572 2240 y(BZ_DATA_ERROR)663 2343 y Fj(if)e(a)h(data)f(in)m
8872 -(tegrit)m(y)j(error)e(w)m(as)g(detected)g(in)g(the)f(compressed)h(data)
8873 -572 2447 y Fi(BZ_DATA_ERROR_MAGIC)663 2551 y Fj(if)f(the)h(compressed)f
8874 -(data)h(do)s(esn't)f(b)s(egin)g(with)g(the)h(righ)m(t)g(magic)h(b)m
8875 -(ytes)572 2655 y Fi(BZ_UNEXPECTED_EOF)663 2759 y Fj(if)e(the)h
8876 -(compressed)f(data)h(ends)e(unexp)s(ectedly)572 2862
8877 -y Fi(BZ_OK)663 2966 y Fj(otherwise)150 3370 y Fk(3.6)68
8878 -b Fc(zlib)43 b Fk(compatibilit)l(y)k(functions)150 3563
8879 -y Fj(Y)-8 b(oshiok)j(a)32 b(Tsuneo)f(has)f(con)m(tributed)i(some)f
8880 -(functions)g(to)h(giv)m(e)h(b)s(etter)e Fi(zlib)f Fj(compatibilit)m(y)
8881 --8 b(.)46 b(These)150 3673 y(functions)37 b(are)g Fi(BZ2_bzopen)p
8882 -Fj(,)f Fi(BZ2_bzread)p Fj(,)g Fi(BZ2_bzwrite)p Fj(,)g
8883 -Fi(BZ2_bzflush)p Fj(,)f Fi(BZ2_bzclose)p Fj(,)h Fi(BZ2_)150
8884 -3782 y(bzerror)22 b Fj(and)g Fi(BZ2_bzlibVersion)p Fj(.)34
8885 -b(These)24 b(functions)f(are)h(not)g(\(y)m(et\))h(o\016cially)g(part)f
8886 -(of)g(the)f(library)-8 b(.)150 3892 y(If)30 b(they)h(break,)f(y)m(ou)h
8887 -(get)h(to)f(k)m(eep)g(all)g(the)g(pieces.)41 b(Nev)m(ertheless,)33
8888 -b(I)e(think)f(they)g(w)m(ork)h(ok.)390 4043 y Fi(typedef)46
8889 -b(void)g(BZFILE;)390 4250 y(const)g(char)h(*)g(BZ2_bzlibVersion)d(\()j
8890 -(void)g(\);)150 4407 y Fj(Returns)30 b(a)h(string)f(indicating)h(the)g
8891 -(library)f(v)m(ersion.)390 4558 y Fi(BZFILE)46 b(*)i(BZ2_bzopen)92
8892 -b(\()48 b(const)e(char)h(*path,)f(const)g(char)h(*mode)f(\);)390
8893 -4662 y(BZFILE)g(*)i(BZ2_bzdopen)c(\()k(int)381 b(fd,)190
8894 -b(const)46 b(char)h(*mode)f(\);)150 4819 y Fj(Op)s(ens)36
8895 -b(a)i Fi(.bz2)e Fj(\014le)i(for)f(reading)h(or)f(writing,)j(using)d
8896 -(either)h(its)g(name)f(or)h(a)g(pre-existing)g(\014le)g(de-)150
8897 -4928 y(scriptor.)j(Analogous)31 b(to)g Fi(fopen)e Fj(and)h
8898 -Fi(fdopen)p Fj(.)390 5079 y Fi(int)47 b(BZ2_bzread)93
8899 -b(\()47 b(BZFILE*)f(b,)h(void*)f(buf,)h(int)g(len)g(\);)390
8900 -5183 y(int)g(BZ2_bzwrite)e(\()i(BZFILE*)f(b,)h(void*)f(buf,)h(int)g
8901 -(len)g(\);)150 5340 y Fj(Reads/writes)31 b(data)g(from/to)g(a)g
8902 -(previously)f(op)s(ened)f Fi(BZFILE)p Fj(.)39 b(Analogous)31
8903 -b(to)g Fi(fread)e Fj(and)g Fi(fwrite)p Fj(.)p eop
8904 -%%Page: 30 31
8905 -30 30 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29
8906 -b(with)g Fi(libbzip2)1881 b Fl(30)390 299 y Fi(int)95
8907 -b(BZ2_bzflush)44 b(\()k(BZFILE*)e(b)h(\);)390 403 y(void)g(BZ2_bzclose)
8908 -d(\()k(BZFILE*)e(b)h(\);)150 559 y Fj(Flushes/closes)29
8909 -b(a)f Fi(BZFILE)p Fj(.)38 b Fi(BZ2_bzflush)25 b Fj(do)s(esn't)j
8910 -(actually)h(do)f(an)m(ything.)41 b(Analogous)28 b(to)h
8911 -Fi(fflush)150 669 y Fj(and)h Fi(fclose)p Fj(.)390 820
8912 -y Fi(const)46 b(char)h(*)g(BZ2_bzerror)e(\()j(BZFILE)e(*b,)h(int)g
8913 -(*errnum)e(\))150 977 y Fj(Returns)29 b(a)h(string)g(describing)g(the)f
8914 -(more)i(recen)m(t)g(error)f(status)g(of)f Fi(b)p Fj(,)h(and)f(also)h
8915 -(sets)g Fi(*errnum)e Fj(to)i(its)150 1087 y(n)m(umerical)h(v)-5
8916 -b(alue.)150 1411 y Fk(3.7)68 b(Using)46 b(the)f(library)g(in)g(a)g
8917 -Fc(stdio)p Fk(-free)f(en)l(vironmen)l(t)150 1723 y Fe(3.7.1)63
8918 -b(Getting)41 b(rid)g(of)g Fd(stdio)150 1915 y Fj(In)g(a)g(deeply)h(em)m
8919 -(b)s(edded)e(application,)46 b(y)m(ou)41 b(migh)m(t)i(w)m(an)m(t)f(to)g
8920 -(use)f(just)g(the)h(memory-to-memory)150 2025 y(functions.)d(Y)-8
8921 -b(ou)27 b(can)g(do)g(this)g(con)m(v)m(enien)m(tly)j(b)m(y)d(compiling)h
8922 -(the)f(library)g(with)g(prepro)s(cessor)g(sym)m(b)s(ol)150
8923 -2135 y Fi(BZ_NO_STDIO)34 b Fj(de\014ned.)60 b(Doing)38
8924 -b(this)f(giv)m(es)i(y)m(ou)e(a)h(library)f(con)m(taining)i(only)e(the)h
8925 -(follo)m(wing)g(eigh)m(t)150 2244 y(functions:)150 2401
8926 -y Fi(BZ2_bzCompressInit)p Fj(,)26 b Fi(BZ2_bzCompress)p
8927 -Fj(,)g Fi(BZ2_bzCompressEnd)150 2511 y(BZ2_bzDecompressInit)p
8928 -Fj(,)f Fi(BZ2_bzDecompress)p Fj(,)h Fi(BZ2_bzDecompressEnd)150
8929 -2620 y(BZ2_bzBuffToBuffCompress)o Fj(,)f Fi(BZ2_bzBuffToBuffDecompre)o
8930 -(ss)150 2777 y Fj(When)30 b(compiled)h(lik)m(e)g(this,)g(all)g
8931 -(functions)f(will)h(ignore)g Fi(verbosity)d Fj(settings.)150
8932 -3053 y Fe(3.7.2)63 b(Critical)40 b(error)h(handling)150
8933 -3246 y Fi(libbzip2)18 b Fj(con)m(tains)k(a)f(n)m(um)m(b)s(er)e(of)i(in)
8934 -m(ternal)h(assertion)f(c)m(hec)m(ks)h(whic)m(h)f(should,)g(needless)g
8935 -(to)h(sa)m(y)-8 b(,)23 b(nev)m(er)150 3355 y(b)s(e)35
8936 -b(activ)-5 b(ated.)58 b(Nev)m(ertheless,)40 b(if)35 b(an)h(assertion)g
8937 -(should)f(fail,)i(b)s(eha)m(viour)f(dep)s(ends)e(on)h(whether)h(or)150
8938 -3465 y(not)31 b(the)f(library)h(w)m(as)f(compiled)h(with)f
8939 -Fi(BZ_NO_STDIO)e Fj(set.)150 3622 y(F)-8 b(or)31 b(a)g(normal)f
8940 -(compile,)i(an)e(assertion)h(failure)f(yields)h(the)g(message)533
8941 -3773 y Fi(bzip2/libbzip2:)44 b(internal)h(error)i(number)f(N.)533
8942 -3877 y(This)h(is)g(a)g(bug)g(in)h(bzip2/libbzip2,)43
8943 -b(1.0.2,)j(30-Dec-2001.)533 3980 y(Please)g(report)g(it)i(to)f(me)g
8944 -(at:)g(jseward@acm.org.)91 b(If)47 b(this)g(happened)533
8945 -4084 y(when)g(you)g(were)f(using)h(some)f(program)g(which)h(uses)f
8946 -(libbzip2)g(as)h(a)533 4188 y(component,)e(you)i(should)f(also)h
8947 -(report)f(this)h(bug)f(to)i(the)f(author\(s\))533 4292
8948 -y(of)g(that)g(program.)93 b(Please)46 b(make)h(an)g(effort)f(to)h
8949 -(report)g(this)f(bug;)533 4395 y(timely)g(and)h(accurate)f(bug)h
8950 -(reports)e(eventually)g(lead)i(to)g(higher)533 4499 y(quality)f
8951 -(software.)93 b(Thanks.)h(Julian)46 b(Seward,)f(30)j(December)d(2001.)
8952 -150 4656 y Fj(where)33 b Fi(N)g Fj(is)g(some)g(error)h(co)s(de)f(n)m
8953 -(um)m(b)s(er.)48 b(If)32 b Fi(N)e(==)g(1007)p Fj(,)j(it)h(also)f(prin)m
8954 -(ts)g(some)h(extra)g(text)g(advising)150 4766 y(the)e(reader)f(that)h
8955 -(unreliable)f(memory)h(is)f(often)h(asso)s(ciated)g(with)f(in)m(ternal)
8956 -h(error)g(1007.)45 b(\(This)32 b(is)f(a)150 4875 y(frequen)m
8957 -(tly-observ)m(ed-phenomenon)g(with)f(v)m(ersions)h(1.0.0/1.0.1\).)150
8958 -5032 y Fi(exit\(3\))d Fj(is)j(then)f(called.)150 5189
8959 -y(F)-8 b(or)31 b(a)g Fi(stdio)p Fj(-free)e(library)-8
8960 -b(,)31 b(assertion)h(failures)e(result)h(in)f(a)g(call)i(to)f(a)f
8961 -(function)h(declared)f(as:)533 5340 y Fi(extern)46 b(void)h
8962 -(bz_internal_error)c(\()k(int)g(errcode)f(\);)p eop
8963 -%%Page: 31 32
8964 -31 31 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29
8965 -b(with)g Fi(libbzip2)1881 b Fl(31)150 299 y Fj(The)30
8966 -b(relev)-5 b(an)m(t)32 b(co)s(de)f(is)f(passed)g(as)g(a)h(parameter.)41
8967 -b(Y)-8 b(ou)31 b(should)e(supply)g(suc)m(h)h(a)g(function.)150
8968 -456 y(In)f(either)h(case,)g(once)g(an)f(assertion)h(failure)f(has)f(o)s
8969 -(ccurred,)i(an)m(y)f Fi(bz_stream)e Fj(records)i(in)m(v)m(olv)m(ed)i
8970 -(can)150 565 y(b)s(e)f(regarded)g(as)h(in)m(v)-5 b(alid.)41
8971 -b(Y)-8 b(ou)30 b(should)f(not)i(attempt)h(to)f(resume)f(normal)h(op)s
8972 -(eration)g(with)f(them.)150 722 y(Y)-8 b(ou)27 b(ma)m(y)-8
8973 -b(,)28 b(of)f(course,)h(c)m(hange)f(critical)i(error)e(handling)f(to)h
8974 -(suit)g(y)m(our)g(needs.)39 b(As)26 b(I)h(said)f(ab)s(o)m(v)m(e,)j
8975 -(crit-)150 832 y(ical)f(errors)g(indicate)g(bugs)e(in)h(the)h(library)f
8976 -(and)f(should)g(not)i(o)s(ccur.)40 b(All)27 b Fi(")p
8977 -Fj(normal)p Fi(")g Fj(error)g(situations)150 941 y(are)k(indicated)g
8978 -(via)f(error)h(return)f(co)s(des)h(from)f(functions,)g(and)g(can)g(b)s
8979 -(e)g(reco)m(v)m(ered)i(from.)150 1221 y Fk(3.8)68 b(Making)45
8980 -b(a)g(Windo)l(ws)h(DLL)150 1414 y Fj(Ev)m(erything)31
8981 -b(related)g(to)h(Windo)m(ws)e(has)f(b)s(een)h(con)m(tributed)h(b)m(y)f
8982 -(Y)-8 b(oshiok)j(a)32 b(Tsuneo)150 1523 y(\()p Fi
8983 -(QWF00133@niftyserve.or.jp)45 b Fj(/)53 b Fi(tsuneo-y@is.aist-nara.a)o
8984 -(c.jp)o Fj(\),)f(so)g(y)m(ou)h(should)e(send)150 1633
8985 -y(y)m(our)31 b(queries)f(to)h(him)f(\(but)g(p)s(erhaps)f(Cc:)41
8986 -b(me,)31 b Fi(jseward@acm.org)p Fj(\).)150 1790 y(My)42
8987 -b(v)-5 b(ague)43 b(understanding)d(of)i(what)g(to)h(do)f(is:)64
8988 -b(using)41 b(Visual)h(C)p Fi(++)f Fj(5.0,)46 b(op)s(en)c(the)g(pro)5
8989 -b(ject)43 b(\014le)150 1899 y Fi(libbz2.dsp)p Fj(,)28
8990 -b(and)h(build.)40 b(That's)31 b(all.)150 2056 y(If)39
8991 -b(y)m(ou)g(can't)h(op)s(en)f(the)g(pro)5 b(ject)40 b(\014le)f(for)g
8992 -(some)h(reason,)i(mak)m(e)e(a)f(new)f(one,)k(naming)d(these)h(\014les:)
8993 -150 2166 y Fi(blocksort.c)p Fj(,)28 b Fi(bzlib.c)p Fj(,)g
8994 -Fi(compress.c)p Fj(,)g Fi(crctable.c)p Fj(,)g Fi(decompress.c)p
8995 -Fj(,)f Fi(huffman.c)p Fj(,)150 2275 y Fi(randtable.c)32
8996 -b Fj(and)h Fi(libbz2.def)p Fj(.)51 b(Y)-8 b(ou)35 b(will)g(also)g(need)
8997 -f(to)i(name)e(the)h(header)g(\014les)f Fi(bzlib.h)f Fj(and)150
8998 -2385 y Fi(bzlib_private.h)p Fj(.)150 2542 y(If)d(y)m(ou)h(don't)f(use)h
8999 -(V)m(C)p Fi(++)p Fj(,)e(y)m(ou)i(ma)m(y)g(need)f(to)h(de\014ne)f(the)h
9000 -(propro)s(cessor)f(sym)m(b)s(ol)g Fi(_WIN32)p Fj(.)150
9001 -2698 y(Finally)-8 b(,)30 b Fi(dlltest.c)25 b Fj(is)j(a)g(sample)g
9002 -(program)h(using)e(the)i(DLL.)e(It)h(has)g(a)g(pro)5
9003 -b(ject)29 b(\014le,)g Fi(dlltest.dsp)p Fj(.)150 2855
9004 -y(If)h(y)m(ou)h(just)f(w)m(an)m(t)h(a)f(mak)m(e\014le)i(for)e(Visual)g
9005 -(C,)g(ha)m(v)m(e)i(a)e(lo)s(ok)h(at)g Fi(makefile.msc)p
9006 -Fj(.)150 3012 y(Be)j(a)m(w)m(are)i(that)f(if)g(y)m(ou)f(compile)i
9007 -Fi(bzip2)d Fj(itself)i(on)g(Win32,)h(y)m(ou)f(m)m(ust)f(set)i
9008 -Fi(BZ_UNIX)c Fj(to)j(0)g(and)f Fi(BZ_)150 3122 y(LCCWIN32)25
9009 -b Fj(to)j(1,)g(in)f(the)h(\014le)f Fi(bzip2.c)p Fj(,)f(b)s(efore)h
9010 -(compiling.)41 b(Otherwise)27 b(the)h(resulting)g(binary)e(w)m(on't)150
9011 -3231 y(w)m(ork)31 b(correctly)-8 b(.)150 3388 y(I)30
9012 -b(ha)m(v)m(en't)i(tried)f(an)m(y)f(of)h(this)f(stu\013)g(m)m(yself,)i
9013 -(but)d(it)i(all)g(lo)s(oks)g(plausible.)p eop
9014 -%%Page: 32 33
9015 -32 32 bop 150 -116 a Fl(Chapter)30 b(4:)41 b(Miscellanea)2586
9016 -b(32)150 299 y Fg(4)80 b(Miscellanea)150 549 y Fj(These)31
9017 -b(are)f(just)g(some)h(random)f(though)m(ts)h(of)f(mine.)41
9018 -b(Y)-8 b(our)30 b(mileage)i(ma)m(y)f(v)-5 b(ary)d(.)150
9019 -826 y Fk(4.1)68 b(Limitations)47 b(of)e(the)g(compressed)g(\014le)h
9020 -(format)150 1018 y Fi(bzip2-1.0)p Fj(,)c Fi(0.9.5)e Fj(and)h
9021 -Fi(0.9.0)f Fj(use)i(exactly)h(the)f(same)g(\014le)g(format)g(as)f(the)h
9022 -(previous)g(v)m(ersion,)150 1128 y Fi(bzip2-0.1)p Fj(.)72
9023 -b(This)41 b(decision)h(w)m(as)g(made)f(in)g(the)h(in)m(terests)h(of)f
9024 -(stabilit)m(y)-8 b(.)76 b(Creating)43 b(y)m(et)g(another)150
9025 -1238 y(incompatible)i(compressed)g(\014le)g(format)g(w)m(ould)f(create)
9026 -i(further)e(confusion)h(and)e(disruption)h(for)150 1347
9027 -y(users.)150 1504 y(Nev)m(ertheless,)30 b(this)d(is)f(not)h(a)g
9028 -(painless)g(decision.)40 b(Dev)m(elopmen)m(t)28 b(w)m(ork)f(since)h
9029 -(the)f(release)h(of)f Fi(bzip2-)150 1614 y(0.1)g Fj(in)h(August)g(1997)
9030 -i(has)d(sho)m(wn)h(complexities)i(in)e(the)g(\014le)g(format)h(whic)m
9031 -(h)f(slo)m(w)h(do)m(wn)e(decompres-)150 1723 y(sion)j(and,)g(in)g
9032 -(retrosp)s(ect,)i(are)f(unnecessary)-8 b(.)41 b(These)30
9033 -b(are:)225 1880 y Fh(\017)60 b Fj(The)33 b(run-length)g(enco)s(der,)h
9034 -(whic)m(h)f(is)g(the)h(\014rst)f(of)g(the)h(compression)f
9035 -(transformations,)i(is)e(en-)330 1990 y(tirely)h(irrelev)-5
9036 -b(an)m(t.)48 b(The)32 b(original)i(purp)s(ose)d(w)m(as)i(to)g(protect)h
9037 -(the)f(sorting)g(algorithm)g(from)g(the)330 2099 y(v)m(ery)26
9038 -b(w)m(orst)g(case)h(input:)37 b(a)26 b(string)g(of)f(rep)s(eated)h(sym)
9039 -m(b)s(ols.)39 b(But)25 b(algorithm)h(steps)g(Q6a)g(and)f(Q6b)330
9040 -2209 y(in)j(the)g(original)i(Burro)m(ws-Wheeler)e(tec)m(hnical)i(rep)s
9041 -(ort)f(\(SR)m(C-124\))h(sho)m(w)e(ho)m(w)g(rep)s(eats)g(can)h(b)s(e)330
9042 -2318 y(handled)g(without)i(di\016cult)m(y)g(in)f(blo)s(c)m(k)h
9043 -(sorting.)225 2451 y Fh(\017)60 b Fj(The)27 b(randomisation)h(mec)m
9044 -(hanism)f(do)s(esn't)g(really)i(need)e(to)h(b)s(e)e(there.)41
9045 -b(Udi)27 b(Man)m(b)s(er)g(and)f(Gene)330 2561 y(My)m(ers)31
9046 -b(published)d(a)j(su\016x)e(arra)m(y)h(construction)i(algorithm)f(a)f
9047 -(few)g(y)m(ears)h(bac)m(k,)g(whic)m(h)e(can)i(b)s(e)330
9048 -2670 y(emplo)m(y)m(ed)26 b(to)g(sort)f(an)m(y)g(blo)s(c)m(k,)i(no)e
9049 -(matter)h(ho)m(w)f(rep)s(etitiv)m(e,)j(in)c(O\(N)i(log)g(N\))f(time.)40
9050 -b(Subsequen)m(t)330 2780 y(w)m(ork)24 b(b)m(y)f(Kunihik)m(o)g(Sadak)-5
9051 -b(ane)23 b(has)g(pro)s(duced)e(a)j(deriv)-5 b(ativ)m(e)25
9052 -b(O\(N)f(\(log)g(N\))p Fi(^)p Fj(2\))h(algorithm)f(whic)m(h)330
9053 -2890 y(usually)30 b(outp)s(erforms)g(the)g(Man)m(b)s(er-My)m(ers)i
9054 -(algorithm.)330 3023 y(I)f(could)f(ha)m(v)m(e)i(c)m(hanged)f(to)g
9055 -(Sadak)-5 b(ane's)30 b(algorithm,)i(but)e(I)h(\014nd)e(it)i(to)g(b)s(e)
9056 -f(slo)m(w)m(er)i(than)e Fi(bzip2)p Fj('s)330 3132 y(existing)39
9057 -b(algorithm)f(for)g(most)g(inputs,)h(and)d(the)i(randomisation)g(mec)m
9058 -(hanism)g(protects)h(ade-)330 3242 y(quately)34 b(against)g(bad)f
9059 -(cases.)50 b(I)33 b(didn't)g(think)g(it)h(w)m(as)f(a)h(go)s(o)s(d)f
9060 -(tradeo\013)h(to)g(mak)m(e.)50 b(P)m(artly)35 b(this)330
9061 -3351 y(is)40 b(due)f(to)i(the)f(fact)h(that)f(I)g(w)m(as)g(not)g(\015o)
9062 -s(o)s(ded)f(with)g(email)i(complain)m(ts)g(ab)s(out)e
9063 -Fi(bzip2-0.1)p Fj('s)330 3461 y(p)s(erformance)30 b(on)g(rep)s(etitiv)m
9064 -(e)j(data,)e(so)f(p)s(erhaps)f(it)i(isn't)g(a)f(problem)g(for)h(real)g
9065 -(inputs.)330 3594 y(Probably)g(the)h(b)s(est)f(long-term)i(solution,)f
9066 -(and)f(the)g(one)h(I)f(ha)m(v)m(e)i(incorp)s(orated)e(in)m(to)i(0.9.5)g
9067 -(and)330 3704 y(ab)s(o)m(v)m(e,)41 b(is)d(to)h(use)f(the)h(existing)g
9068 -(sorting)g(algorithm)g(initially)-8 b(,)42 b(and)37 b(fall)i(bac)m(k)g
9069 -(to)f(a)h(O\(N)f(\(log)330 3813 y(N\))p Fi(^)p Fj(2\))31
9070 -b(algorithm)h(if)e(the)h(standard)e(algorithm)j(gets)f(in)m(to)h
9071 -(di\016culties.)225 3946 y Fh(\017)60 b Fj(The)29 b(compressed)g
9072 -(\014le)g(format)h(w)m(as)f(nev)m(er)g(designed)g(to)h(b)s(e)e(handled)
9073 -g(b)m(y)h(a)g(library)-8 b(,)30 b(and)e(I)h(ha)m(v)m(e)330
9074 -4056 y(had)e(to)h(jump)e(though)h(some)h(ho)s(ops)e(to)i(pro)s(duce)f
9075 -(an)g(e\016cien)m(t)i(implemen)m(tation)g(of)e(decompres-)330
9076 -4165 y(sion.)39 b(It's)24 b(a)h(bit)f(hairy)-8 b(.)39
9077 -b(T)-8 b(ry)24 b(passing)g Fi(decompress.c)d Fj(through)i(the)i(C)e
9078 -(prepro)s(cessor)i(and)e(y)m(ou'll)330 4275 y(see)31
9079 -b(what)e(I)h(mean.)41 b(Muc)m(h)30 b(of)g(this)g(complexit)m(y)i(could)
9080 -e(ha)m(v)m(e)g(b)s(een)g(a)m(v)m(oided)h(if)f(the)g(compressed)330
9081 -4384 y(size)h(of)g(eac)m(h)g(blo)s(c)m(k)g(of)g(data)f(w)m(as)h
9082 -(recorded)f(in)h(the)f(data)h(stream.)225 4517 y Fh(\017)60
9083 -b Fj(An)29 b(Adler-32)j(c)m(hec)m(ksum,)f(rather)g(than)f(a)g(CR)m(C32)
9084 -h(c)m(hec)m(ksum,)h(w)m(ould)e(b)s(e)g(faster)h(to)g(compute.)150
9085 -4698 y(It)45 b(w)m(ould)g(b)s(e)f(fair)h(to)h(sa)m(y)f(that)g(the)h
9086 -Fi(bzip2)d Fj(format)i(w)m(as)g(frozen)g(b)s(efore)g(I)g(prop)s(erly)f
9087 -(and)g(fully)150 4807 y(understo)s(o)s(d)29 b(the)i(p)s(erformance)f
9088 -(consequences)h(of)f(doing)h(so.)150 4964 y(Impro)m(v)m(emen)m(ts)25
9089 -b(whic)m(h)d(I)i(w)m(as)f(able)g(to)h(incorp)s(orate)g(in)m(to)g
9090 -(0.9.0,)j(despite)d(using)e(the)i(same)f(\014le)g(format,)150
9091 -5074 y(are:)225 5230 y Fh(\017)60 b Fj(Single)30 b(arra)m(y)g(implemen)
9092 -m(tation)i(of)d(the)h(in)m(v)m(erse)h(BWT.)f(This)f(signi\014can)m(tly)
9093 -i(sp)s(eeds)e(up)f(decom-)330 5340 y(pression,)i(presumably)f(b)s
9094 -(ecause)i(it)g(reduces)f(the)h(n)m(um)m(b)s(er)e(of)i(cac)m(he)g
9095 -(misses.)p eop
9096 -%%Page: 33 34
9097 -33 33 bop 150 -116 a Fl(Chapter)30 b(4:)41 b(Miscellanea)2586
9098 -b(33)225 299 y Fh(\017)60 b Fj(F)-8 b(aster)25 b(in)m(v)m(erse)f(MTF)g
9099 -(transform)f(for)g(large)i(MTF)f(v)-5 b(alues.)38 b(The)23
9100 -b(new)g(implemen)m(tation)i(is)f(based)330 408 y(on)30
9101 -b(the)h(notion)g(of)f(sliding)h(blo)s(c)m(ks)g(of)f(v)-5
9102 -b(alues.)225 544 y Fh(\017)60 b Fi(bzip2-0.9.0)23 b Fj(no)m(w)j(reads)g
9103 -(and)f(writes)h(\014les)g(with)g Fi(fread)f Fj(and)g
9104 -Fi(fwrite)p Fj(;)h(v)m(ersion)h(0.1)g(used)e Fi(putc)330
9105 -653 y Fj(and)30 b Fi(getc)p Fj(.)39 b(Duh!)g(W)-8 b(ell,)32
9106 -b(y)m(ou)f(liv)m(e)g(and)f(learn.)150 836 y(F)-8 b(urther)28
9107 -b(ahead,)h(it)g(w)m(ould)f(b)s(e)g(nice)g(to)i(b)s(e)d(able)i(to)g(do)f
9108 -(random)f(access)j(in)m(to)f(\014les.)40 b(This)28 b(will)h(require)150
9109 -945 y(some)i(careful)g(design)f(of)g(compressed)h(\014le)f(formats.)150
9110 -1227 y Fk(4.2)68 b(P)l(ortabilit)l(y)47 b(issues)150
9111 -1419 y Fj(After)33 b(some)h(consideration,)h(I)e(ha)m(v)m(e)h(decided)f
9112 -(not)g(to)h(use)f(GNU)g Fi(autoconf)e Fj(to)j(con\014gure)f(0.9.5)i(or)
9113 -150 1529 y(1.0.)150 1686 y Fi(autoconf)p Fj(,)30 b(admirable)i(and)e(w)
9114 -m(onderful)h(though)h(it)g(is,)h(mainly)e(assists)h(with)g(p)s
9115 -(ortabilit)m(y)g(problems)150 1795 y(b)s(et)m(w)m(een)46
9116 -b(Unix-lik)m(e)h(platforms.)85 b(But)45 b Fi(bzip2)f
9117 -Fj(do)s(esn't)h(ha)m(v)m(e)h(m)m(uc)m(h)g(in)f(the)g(w)m(a)m(y)h(of)g
9118 -(p)s(ortabilit)m(y)150 1905 y(problems)21 b(on)h(Unix;)j(most)d(of)g
9119 -(the)g(di\016culties)g(app)s(ear)f(when)g(p)s(orting)h(to)g(the)h(Mac,)
9120 -h(or)e(to)h(Microsoft's)150 2015 y(op)s(erating)j(systems.)40
9121 -b Fi(autoconf)23 b Fj(do)s(esn't)j(help)f(in)g(those)i(cases,)g(and)e
9122 -(brings)g(in)h(a)g(whole)f(load)i(of)e(new)150 2124 y(complexit)m(y)-8
9123 -b(.)150 2281 y(Most)34 b(p)s(eople)e(should)g(b)s(e)g(able)h(to)g
9124 -(compile)h(the)f(library)f(and)g(program)h(under)e(Unix)h(straigh)m(t)i
9125 -(out-)150 2391 y(of-the-b)s(o)m(x,)e(so)e(to)i(sp)s(eak,)e(esp)s
9126 -(ecially)h(if)f(y)m(ou)h(ha)m(v)m(e)g(a)g(v)m(ersion)g(of)g(GNU)g(C)e
9127 -(a)m(v)-5 b(ailable.)150 2547 y(There)31 b(are)h(a)f(couple)g(of)g
9128 -Fi(__inline__)e Fj(directiv)m(es)k(in)d(the)i(co)s(de.)42
9129 -b(GNU)32 b(C)f(\()p Fi(gcc)p Fj(\))f(should)g(b)s(e)h(able)g(to)150
9130 -2657 y(handle)23 b(them.)38 b(If)23 b(y)m(ou're)h(not)g(using)f(GNU)h
9131 -(C,)f(y)m(our)h(C)e(compiler)j(shouldn't)d(see)i(them)g(at)g(all.)39
9132 -b(If)23 b(y)m(our)150 2767 y(compiler)30 b(do)s(es,)f(for)f(some)h
9133 -(reason,)h(see)f(them)g(and)f(do)s(esn't)g(lik)m(e)i(them,)g(just)e
9134 -Fi(#define)f(__inline__)150 2876 y Fj(to)37 b(b)s(e)f
9135 -Fi(/*)29 b(*/)p Fj(.)58 b(One)36 b(easy)h(w)m(a)m(y)f(to)i(do)e(this)g
9136 -(is)g(to)h(compile)g(with)f(the)h(\015ag)f Fi(-D__inline__=)p
9137 -Fj(,)e(whic)m(h)150 2986 y(should)29 b(b)s(e)h(understo)s(o)s(d)f(b)m
9138 -(y)h(most)h(Unix)f(compilers.)150 3143 y(If)k(y)m(ou)g(still)h(ha)m(v)m
9139 -(e)g(di\016culties,)h(try)e(compiling)g(with)g(the)g(macro)h
9140 -Fi(BZ_STRICT_ANSI)30 b Fj(de\014ned.)50 b(This)150 3252
9141 -y(should)27 b(enable)i(y)m(ou)g(to)g(build)e(the)i(library)f(in)g(a)g
9142 -(strictly)i(ANSI)e(complian)m(t)i(en)m(vironmen)m(t.)41
9143 -b(Building)150 3362 y(the)22 b(program)h(itself)g(lik)m(e)g(this)f(is)g
9144 -(dangerous)g(and)f(not)h(supp)s(orted,)h(since)f(y)m(ou)h(remo)m(v)m(e)
9145 -h Fi(bzip2)p Fj('s)c(c)m(hec)m(ks)150 3471 y(against)27
9146 -b(compressing)g(directories,)i(sym)m(b)s(olic)d(links,)h(devices,)h
9147 -(and)e(other)h(not-really-a-\014le)i(en)m(tities.)150
9148 -3581 y(This)h(could)g(cause)h(\014lesystem)g(corruption!)150
9149 -3738 y(One)c(other)h(thing:)40 b(if)27 b(y)m(ou)h(create)h(a)e
9150 -Fi(bzip2)f Fj(binary)h(for)g(public)g(distribution,)h(please)g(try)g
9151 -(and)e(link)h(it)150 3847 y(statically)g(\()p Fi(gcc)j(-s)p
9152 -Fj(\).)39 b(This)24 b(a)m(v)m(oids)j(all)e(sorts)h(of)f(library-v)m
9153 -(ersion)h(issues)e(that)i(others)g(ma)m(y)f(encoun)m(ter)150
9154 -3957 y(later)32 b(on.)150 4114 y(If)d(y)m(ou)g(build)e
9155 -Fi(bzip2)h Fj(on)g(Win32,)i(y)m(ou)f(m)m(ust)g(set)h
9156 -Fi(BZ_UNIX)c Fj(to)k(0)f(and)f Fi(BZ_LCCWIN32)e Fj(to)k(1,)f(in)g(the)g
9157 -(\014le)150 4223 y Fi(bzip2.c)p Fj(,)g(b)s(efore)h(compiling.)41
9158 -b(Otherwise)31 b(the)g(resulting)g(binary)f(w)m(on't)h(w)m(ork)g
9159 -(correctly)-8 b(.)150 4505 y Fk(4.3)68 b(Rep)t(orting)46
9160 -b(bugs)150 4698 y Fj(I)23 b(tried)g(prett)m(y)h(hard)e(to)i(mak)m(e)f
9161 -(sure)g Fi(bzip2)e Fj(is)i(bug)f(free,)j(b)s(oth)d(b)m(y)h(design)g
9162 -(and)f(b)m(y)h(testing.)39 b(Hop)s(efully)150 4807 y(y)m(ou'll)31
9163 -b(nev)m(er)g(need)g(to)g(read)f(this)h(section)g(for)g(real.)150
9164 -4964 y(Nev)m(ertheless,)j(if)d Fi(bzip2)f Fj(dies)h(with)g(a)g(segmen)m
9165 -(tation)j(fault,)e(a)f(bus)f(error)i(or)f(an)g(in)m(ternal)h(assertion)
9166 -150 5074 y(failure,)j(it)f(will)f(ask)h(y)m(ou)g(to)g(email)g(me)g(a)f
9167 -(bug)g(rep)s(ort.)50 b(Exp)s(erience)33 b(with)g(v)m(ersion)i(0.1)f
9168 -(sho)m(ws)f(that)150 5183 y(almost)e(all)g(these)g(problems)f(can)h(b)s
9169 -(e)e(traced)j(to)f(either)g(compiler)g(bugs)f(or)h(hardw)m(are)f
9170 -(problems.)225 5340 y Fh(\017)60 b Fj(Recompile)22 b(the)f(program)f
9171 -(with)h(no)f(optimisation,)k(and)c(see)h(if)g(it)g(w)m(orks.)38
9172 -b(And/or)20 b(try)g(a)h(di\013eren)m(t)p eop
9173 -%%Page: 34 35
9174 -34 34 bop 150 -116 a Fl(Chapter)30 b(4:)41 b(Miscellanea)2586
9175 -b(34)330 299 y Fj(compiler.)74 b(I)41 b(heard)f(all)i(sorts)f(of)g
9176 -(stories)i(ab)s(out)d(v)-5 b(arious)41 b(\015a)m(v)m(ours)g(of)h(GNU)f
9177 -(C)g(\(and)f(other)330 408 y(compilers\))45 b(generating)g(bad)e(co)s
9178 -(de)g(for)h Fi(bzip2)p Fj(,)i(and)d(I'v)m(e)i(run)d(across)i(t)m(w)m(o)
9179 -h(suc)m(h)f(examples)330 518 y(m)m(yself.)330 716 y(2.7.X)i(v)m
9180 -(ersions)f(of)g(GNU)h(C)e(are)h(kno)m(wn)g(to)g(generate)i(bad)d(co)s
9181 -(de)h(from)f(time)i(to)g(time,)j(at)330 825 y(high)32
9182 -b(optimisation)h(lev)m(els.)47 b(If)31 b(y)m(ou)i(get)g(problems,)f
9183 -(try)g(using)f(the)i(\015ags)f Fi(-O2)f(-fomit-frame-)330
9184 -935 y(pointer)d(-fno-strength-reduce)p Fj(.)36 b(Y)-8
9185 -b(ou)30 b(should)f(sp)s(eci\014cally)i Fb(not)40 b Fj(use)30
9186 -b Fi(-funroll-loops)p Fj(.)330 1132 y(Y)-8 b(ou)36 b(ma)m(y)g(notice)i
9187 -(that)e(the)g(Mak)m(e\014le)i(runs)d(six)g(tests)i(as)f(part)g(of)g
9188 -(the)h(build)e(pro)s(cess.)57 b(If)36 b(the)330 1242
9189 -y(program)42 b(passes)g(all)h(of)f(these,)k(it's)d(a)f(prett)m(y)i(go)s
9190 -(o)s(d)e(\(but)g(not)g(100\045\))i(indication)f(that)g(the)330
9191 -1352 y(compiler)31 b(has)f(done)g(its)h(job)f(correctly)-8
9192 -b(.)225 1549 y Fh(\017)60 b Fj(If)32 b Fi(bzip2)e Fj(crashes)j
9193 -(randomly)-8 b(,)32 b(and)f(the)i(crashes)f(are)g(not)h(rep)s(eatable,)
9194 -g(y)m(ou)g(ma)m(y)f(ha)m(v)m(e)h(a)f(\015aky)330 1659
9195 -y(memory)37 b(subsystem.)57 b Fi(bzip2)35 b Fj(really)i(hammers)f(y)m
9196 -(our)h(memory)f(hierarc)m(h)m(y)-8 b(,)39 b(and)d(if)g(it's)h(a)g(bit)
9197 -330 1768 y(marginal,)c(y)m(ou)g(ma)m(y)g(get)g(these)g(problems.)46
9198 -b(Ditto)34 b(if)e(y)m(our)h(disk)f(or)g(I/O)h(subsystem)f(is)g(slo)m
9199 -(wly)330 1878 y(failing.)41 b(Y)-8 b(up,)30 b(this)g(really)i(do)s(es)e
9200 -(happ)s(en.)330 2075 y(T)-8 b(ry)27 b(using)f(a)h(di\013eren)m(t)h(mac)
9201 -m(hine)f(of)g(the)g(same)g(t)m(yp)s(e,)h(and)e(see)h(if)g(y)m(ou)g(can)
9202 -g(rep)s(eat)g(the)g(problem.)225 2273 y Fh(\017)60 b
9203 -Fj(This)21 b(isn't)h(really)g(a)g(bug,)h(but)d(...)39
9204 -b(If)21 b Fi(bzip2)f Fj(tells)i(y)m(ou)g(y)m(our)g(\014le)f(is)h
9205 -(corrupted)f(on)g(decompression,)330 2383 y(and)g(y)m(ou)h(obtained)g
9206 -(the)h(\014le)f(via)g(FTP)-8 b(,)23 b(there)f(is)g(a)g(p)s(ossibilit)m
9207 -(y)h(that)f(y)m(ou)h(forgot)g(to)g(tell)g(FTP)f(to)h(do)330
9208 -2492 y(a)31 b(binary)g(mo)s(de)g(transfer.)43 b(That)31
9209 -b(absolutely)h(will)g(cause)f(the)h(\014le)f(to)h(b)s(e)e
9210 -(non-decompressible.)330 2602 y(Y)-8 b(ou'll)31 b(ha)m(v)m(e)g(to)h
9211 -(transfer)e(it)h(again.)150 2847 y(If)e(y)m(ou'v)m(e)i(incorp)s(orated)
9212 -e Fi(libbzip2)e Fj(in)m(to)k(y)m(our)e(o)m(wn)g(program)h(and)e(are)i
9213 -(getting)h(problems,)e(please,)150 2956 y(please,)e(please,)g(c)m(hec)m
9214 -(k)f(that)g(the)f(parameters)h(y)m(ou)f(are)h(passing)e(in)h(calls)h
9215 -(to)f(the)h(library)-8 b(,)26 b(are)g(correct,)150 3066
9216 -y(and)g(in)g(accordance)i(with)f(what)f(the)h(do)s(cumen)m(tation)h(sa)
9217 -m(ys)f(is)f(allo)m(w)m(able.)42 b(I)27 b(ha)m(v)m(e)g(tried)h(to)f(mak)
9218 -m(e)h(the)150 3175 y(library)i(robust)g(against)h(suc)m(h)g(problems,)f
9219 -(but)g(I'm)g(sure)g(I)g(ha)m(v)m(en't)i(succeeded.)150
9220 -3332 y(Finally)-8 b(,)33 b(if)f(the)h(ab)s(o)m(v)m(e)g(commen)m(ts)g
9221 -(don't)f(help,)g(y)m(ou'll)h(ha)m(v)m(e)g(to)g(send)e(me)h(a)g(bug)f
9222 -(rep)s(ort.)46 b(No)m(w,)33 b(it's)150 3442 y(just)d(amazing)h(ho)m(w)f
9223 -(man)m(y)h(p)s(eople)f(will)h(send)e(me)i(a)f(bug)g(rep)s(ort)h(sa)m
9224 -(ying)g(something)g(lik)m(e)481 3593 y(bzip2)f(crashed)g(with)h(segmen)
9225 -m(tation)h(fault)f(on)f(m)m(y)g(mac)m(hine)150 3750 y(and)h(absolutely)
9226 -h(nothing)g(else.)45 b(Needless)33 b(to)f(sa)m(y)-8 b(,)33
9227 -b(a)f(suc)m(h)f(a)h(rep)s(ort)g(is)f Fb(total)5 b(ly,)36
9228 -b(utterly,)e(c)-5 b(ompletely)150 3859 y(and)27 b(c)-5
9229 -b(ompr)g(ehensively)29 b(100\045)f(useless;)g(a)f(waste)g(of)g(your)g
9230 -(time,)h(my)e(time,)i(and)f(net)g(b)-5 b(andwidth)p Fj(.)41
9231 -b(With)150 3969 y(no)30 b(details)i(at)f(all,)g(there's)g(no)f(w)m(a)m
9232 -(y)h(I)g(can)f(p)s(ossibly)g(b)s(egin)g(to)h(\014gure)f(out)h(what)f
9233 -(the)g(problem)h(is.)150 4126 y(The)e(rules)f(of)h(the)g(game)h(are:)40
9234 -b(facts,)30 b(facts,)g(facts.)41 b(Don't)29 b(omit)h(them)f(b)s(ecause)
9235 -f Fi(")p Fj(oh,)h(they)g(w)m(on't)h(b)s(e)150 4235 y(relev)-5
9236 -b(an)m(t)p Fi(")p Fj(.)42 b(A)m(t)31 b(the)g(bare)f(minim)m(um:)481
9237 -4386 y(Mac)m(hine)h(t)m(yp)s(e.)62 b(Op)s(erating)30
9238 -b(system)h(v)m(ersion.)481 4490 y(Exact)g(v)m(ersion)g(of)g
9239 -Fi(bzip2)d Fj(\(do)j Fi(bzip2)46 b(-V)p Fj(\).)481 4594
9240 -y(Exact)31 b(v)m(ersion)g(of)g(the)f(compiler)h(used.)481
9241 -4698 y(Flags)g(passed)f(to)h(the)g(compiler.)150 4854
9242 -y(Ho)m(w)m(ev)m(er,)f(the)e(most)g(imp)s(ortan)m(t)f(single)h(thing)g
9243 -(that)f(will)h(help)f(me)g(is)g(the)h(\014le)f(that)h(y)m(ou)f(w)m(ere)
9244 -h(trying)150 4964 y(to)35 b(compress)f(or)g(decompress)g(at)g(the)h
9245 -(time)f(the)h(problem)e(happ)s(ened.)50 b(Without)34
9246 -b(that,)i(m)m(y)e(abilit)m(y)150 5074 y(to)d(do)g(an)m(ything)f(more)h
9247 -(than)f(sp)s(eculate)h(ab)s(out)f(the)h(cause,)f(is)h(limited.)150
9248 -5230 y(Please)h(remem)m(b)s(er)g(that)g(I)f(connect)h(to)g(the)g(In)m
9249 -(ternet)g(with)f(a)h(mo)s(dem,)f(so)g(y)m(ou)h(should)e(con)m(tact)k
9250 -(me)150 5340 y(b)s(efore)c(mailing)h(me)g(h)m(uge)f(\014les.)p
9251 -eop
9252 -%%Page: 35 36
9253 -35 35 bop 150 -116 a Fl(Chapter)30 b(4:)41 b(Miscellanea)2586
9254 -b(35)150 299 y Fk(4.4)68 b(Did)45 b(y)l(ou)g(get)h(the)f(righ)l(t)h
9255 -(pac)l(k)-7 b(age?)150 491 y Fi(bzip2)33 b Fj(is)h(a)h(resource)g(hog.)
9256 -54 b(It)35 b(soaks)f(up)g(large)h(amoun)m(ts)g(of)f(CPU)h(cycles)g(and)
9257 -f(memory)-8 b(.)53 b(Also,)36 b(it)150 601 y(giv)m(es)25
9258 -b(v)m(ery)e(large)i(latencies.)40 b(In)23 b(the)g(w)m(orst)h(case,)i(y)
9259 -m(ou)d(can)h(feed)f(man)m(y)g(megab)m(ytes)i(of)e(uncompressed)150
9260 -711 y(data)42 b(in)m(to)h(the)f(library)g(b)s(efore)f(getting)j(an)m(y)
9261 -e(compressed)g(output,)i(so)e(this)g(probably)f(rules)h(out)150
9262 -820 y(applications)31 b(requiring)g(in)m(teractiv)m(e)i(b)s(eha)m
9263 -(viour.)150 977 y(These)j(aren't)h(faults)f(of)g(m)m(y)g(implemen)m
9264 -(tation,)j(I)d(hop)s(e,)h(but)f(more)g(an)g(in)m(trinsic)g(prop)s(ert)m
9265 -(y)g(of)h(the)150 1087 y(Burro)m(ws-Wheeler)31 b(transform)f
9266 -(\(unfortunately\).)41 b(Ma)m(yb)s(e)31 b(this)f(isn't)h(what)f(y)m(ou)
9267 -h(w)m(an)m(t.)150 1244 y(If)f(y)m(ou)g(w)m(an)m(t)h(a)f(compressor)g
9268 -(and/or)g(library)g(whic)m(h)g(is)g(faster,)h(uses)f(less)g(memory)g
9269 -(but)g(gets)h(prett)m(y)150 1353 y(go)s(o)s(d)f(compression,)g(and)g
9270 -(has)f(minimal)h(latency)-8 b(,)32 b(consider)e(Jean-loup)g(Gailly's)i
9271 -(and)d(Mark)h(Adler's)150 1463 y(w)m(ork,)h Fi(zlib-1.1.3)d
9272 -Fj(and)h Fi(gzip-1.2.4)p Fj(.)38 b(Lo)s(ok)30 b(for)h(them)f(at)150
9273 -1620 y Fi(http://www.zlib.org)25 b Fj(and)30 b Fi(http://www.gzip.org)
9274 -25 b Fj(resp)s(ectiv)m(ely)-8 b(.)150 1776 y(F)g(or)30
9275 -b(something)h(faster)f(and)e(ligh)m(ter)k(still,)f(y)m(ou)f(migh)m(t)g
9276 -(try)g(Markus)f(F)h(X)f(J)h(Ob)s(erh)m(umer's)e Fi(LZO)h
9277 -Fj(real-)150 1886 y(time)i(compression/decompression)h(library)-8
9278 -b(,)31 b(at)150 1996 y Fi(http://wildsau.idv.uni-l)o(inz.)o(ac.a)o(t/m)
9279 -o(fx/l)o(zo.h)o(tml)o Fj(.)150 2152 y(If)37 b(y)m(ou)h(w)m(an)m(t)h(to)
9280 -f(use)f(the)h Fi(bzip2)e Fj(algorithms)j(to)f(compress)g(small)g(blo)s
9281 -(c)m(ks)f(of)h(data,)i(64k)e(b)m(ytes)h(or)150 2262 y(smaller,)h(for)e
9282 -(example)g(on)g(an)g(on-the-\015y)g(disk)f(compressor,)j(y)m(ou'd)e(b)s
9283 -(e)f(w)m(ell)i(advised)e(not)i(to)f(use)150 2372 y(this)k(library)-8
9284 -b(.)74 b(Instead,)45 b(I'v)m(e)d(made)g(a)f(sp)s(ecial)h(library)g
9285 -(tuned)f(for)g(that)h(kind)f(of)h(use.)74 b(It's)42 b(part)150
9286 -2481 y(of)d Fi(e2compr-0.40)p Fj(,)e(an)i(on-the-\015y)g(disk)f
9287 -(compressor)h(for)g(the)g(Lin)m(ux)e Fi(ext2)h Fj(\014lesystem.)66
9288 -b(Lo)s(ok)38 b(at)150 2591 y Fi(http://www.netspace.net.)o(au/~)o(reit)
9289 -o(er/)o(e2co)o(mpr)p Fj(.)150 2880 y Fk(4.5)68 b(T)-11
9290 -b(esting)150 3072 y Fj(A)30 b(record)h(of)f(the)h(tests)h(I'v)m(e)f
9291 -(done.)150 3229 y(First,)g(some)g(data)g(sets:)225 3386
9292 -y Fh(\017)60 b Fj(B:)29 b(a)g(directory)h(con)m(taining)h(6001)f
9293 -(\014les,)g(one)f(for)g(ev)m(ery)h(length)g(in)e(the)i(range)f(0)g(to)h
9294 -(6000)h(b)m(ytes.)330 3496 y(The)f(\014les)h(con)m(tain)g(random)f(lo)m
9295 -(w)m(ercase)j(letters.)42 b(18.7)32 b(megab)m(ytes.)225
9296 -3633 y Fh(\017)60 b Fj(H:)33 b(m)m(y)h(home)f(directory)h(tree.)50
9297 -b(Do)s(cumen)m(ts,)34 b(source)f(co)s(de,)h(mail)g(\014les,)g
9298 -(compressed)f(data.)49 b(H)330 3743 y(con)m(tains)39
9299 -b(B,)e(and)g(also)i(a)e(directory)i(of)f(\014les)g(designed)f(as)h(b)s
9300 -(oundary)e(cases)i(for)g(the)g(sorting;)330 3853 y(mostly)31
9301 -b(v)m(ery)g(rep)s(etitiv)m(e,)i(nast)m(y)e(\014les.)40
9302 -b(565)32 b(megab)m(ytes.)225 3990 y Fh(\017)60 b Fj(A:)40
9303 -b(directory)i(tree)g(holding)e(v)-5 b(arious)41 b(applications)g(built)
9304 -g(from)f(source:)62 b Fi(egcs)p Fj(,)42 b Fi(gcc-2.8.1)p
9305 -Fj(,)330 4100 y(KDE,)30 b(GTK,)h(Octa)m(v)m(e,)j(etc.)42
9306 -b(2200)32 b(megab)m(ytes.)150 4285 y(The)i(tests)h(conducted)f(are)h
9307 -(as)f(follo)m(ws.)53 b(Eac)m(h)34 b(test)i(means)d(compressing)i(\(a)f
9308 -(cop)m(y)h(of)10 b(\))35 b(eac)m(h)g(\014le)f(in)150
9309 -4394 y(the)d(data)f(set,)i(decompressing)e(it)h(and)f(comparing)h(it)g
9310 -(against)g(the)g(original.)150 4551 y(First,)36 b(a)f(bunc)m(h)f(of)h
9311 -(tests)g(with)g(blo)s(c)m(k)g(sizes)g(and)f(in)m(ternal)i(bu\013er)e
9312 -(sizes)h(set)g(v)m(ery)h(small,)g(to)f(detect)150 4661
9313 -y(an)m(y)h(problems)g(with)h(the)f(blo)s(c)m(king)h(and)f(bu\013ering)g
9314 -(mec)m(hanisms.)59 b(This)36 b(required)g(mo)s(difying)g(the)150
9315 -4770 y(source)31 b(co)s(de)f(so)h(as)f(to)i(try)e(to)i(break)e(it.)199
9316 -4927 y(1.)61 b(Data)31 b(set)g(H,)g(with)f(bu\013er)g(size)h(of)f(1)h
9317 -(b)m(yte,)h(and)d(blo)s(c)m(k)i(size)g(of)g(23)g(b)m(ytes.)199
9318 -5065 y(2.)61 b(Data)31 b(set)g(B,)f(bu\013er)g(sizes)h(1)g(b)m(yte,)g
9319 -(blo)s(c)m(k)g(size)g(1)g(b)m(yte.)199 5202 y(3.)61 b(As)30
9320 -b(\(2\))h(but)f(small-mo)s(de)h(decompression.)199 5340
9321 -y(4.)61 b(As)30 b(\(2\))h(with)g(blo)s(c)m(k)f(size)i(2)e(b)m(ytes.)p
9322 -eop
9323 -%%Page: 36 37
9324 -36 36 bop 150 -116 a Fl(Chapter)30 b(4:)41 b(Miscellanea)2586
9325 -b(36)199 299 y Fj(5.)61 b(As)30 b(\(2\))h(with)g(blo)s(c)m(k)f(size)i
9326 -(3)e(b)m(ytes.)199 431 y(6.)61 b(As)30 b(\(2\))h(with)g(blo)s(c)m(k)f
9327 -(size)i(4)e(b)m(ytes.)199 564 y(7.)61 b(As)30 b(\(2\))h(with)g(blo)s(c)
9328 -m(k)f(size)i(5)e(b)m(ytes.)199 697 y(8.)61 b(As)30 b(\(2\))h(with)g
9329 -(blo)s(c)m(k)f(size)i(6)e(b)m(ytes)h(and)f(small-mo)s(de)h
9330 -(decompression.)199 829 y(9.)61 b(H)31 b(with)f(bu\013er)f(size)j(of)e
9331 -(1)h(b)m(yte,)g(but)f(normal)g(blo)s(c)m(k)h(size)h(\(up)d(to)j(900000)
9332 -h(b)m(ytes\).)150 1009 y(Then)d(some)h(tests)g(with)f(unmo)s(di\014ed)f
9333 -(source)h(co)s(de.)199 1166 y(1.)61 b(H,)31 b(all)g(settings)g(normal.)
9334 -199 1299 y(2.)61 b(As)30 b(\(1\),)i(with)e(small-mo)s(de)g(decompress.)
9335 -199 1431 y(3.)61 b(H,)31 b(compress)f(with)g(\015ag)h
9336 -Fi(-1)p Fj(.)199 1564 y(4.)61 b(H,)31 b(compress)f(with)g(\015ag)h
9337 -Fi(-s)p Fj(,)f(decompress)g(with)g(\015ag)h Fi(-s)p Fj(.)199
9338 -1697 y(5.)61 b(F)-8 b(orw)m(ards)31 b(compatibilit)m(y:)43
9339 -b(H,)31 b Fi(bzip2-0.1pl2)d Fj(compressing,)j Fi(bzip2-0.9.5)c
9340 -Fj(decompressing,)330 1806 y(all)k(settings)h(normal.)199
9341 -1939 y(6.)61 b(Bac)m(kw)m(ards)38 b(compatibilit)m(y:)59
9342 -b(H,)39 b Fi(bzip2-0.9.5)c Fj(compressing,)41 b Fi(bzip2-0.1pl2)35
9343 -b Fj(decompress-)330 2048 y(ing,)c(all)g(settings)g(normal.)199
9344 -2181 y(7.)61 b(Bigger)31 b(tests:)42 b(A,)30 b(all)h(settings)h
9345 -(normal.)199 2314 y(8.)61 b(As)30 b(\(7\),)i(using)d(the)i(fallbac)m(k)
9346 -g(\(Sadak)-5 b(ane-lik)m(e\))33 b(sorting)e(algorithm.)199
9347 -2446 y(9.)61 b(As)30 b(\(8\),)i(compress)e(with)g(\015ag)h
9348 -Fi(-1)p Fj(,)f(decompress)g(with)g(\015ag)h Fi(-s)p Fj(.)154
9349 -2579 y(10.)61 b(H,)31 b(using)f(the)g(fallbac)m(k)i(sorting)f
9350 -(algorithm.)154 2711 y(11.)61 b(F)-8 b(orw)m(ards)31
9351 -b(compatibilit)m(y:)44 b(A,)31 b Fi(bzip2-0.1pl2)d Fj(compressing,)k
9352 -Fi(bzip2-0.9.5)27 b Fj(decompressing,)330 2821 y(all)k(settings)h
9353 -(normal.)154 2954 y(12.)61 b(Bac)m(kw)m(ards)39 b(compatibilit)m(y:)59
9354 -b(A,)39 b Fi(bzip2-0.9.5)c Fj(compressing,)41 b Fi(bzip2-0.1pl2)36
9355 -b Fj(decompress-)330 3063 y(ing,)31 b(all)g(settings)g(normal.)154
9356 -3196 y(13.)61 b(Misc)38 b(test:)57 b(ab)s(out)37 b(400)i(megab)m(ytes)g
9357 -(of)f Fi(.tar)f Fj(\014les)g(with)h Fi(bzip2)e Fj(compiled)i(with)g
9358 -(Chec)m(k)m(er)g(\(a)330 3305 y(memory)31 b(access)g(error)g(detector,)
9359 -h(lik)m(e)g(Purify\).)154 3438 y(14.)61 b(Misc)31 b(tests)h(to)f(mak)m
9360 -(e)g(sure)f(it)h(builds)e(and)h(runs)f(ok)h(on)h(non-Lin)m(ux/x86)f
9361 -(platforms.)150 3618 y(These)k(tests)g(w)m(ere)h(conducted)e(on)h(a)f
9362 -(225)i(MHz)f(IDT)g(WinChip)e(mac)m(hine,)j(running)d(Lin)m(ux)g
9363 -(2.0.36.)150 3728 y(They)c(represen)m(t)h(nearly)g(a)f(w)m(eek)h(of)f
9364 -(con)m(tin)m(uous)h(computation.)41 b(All)29 b(tests)g(completed)g
9365 -(successfully)-8 b(.)150 4003 y Fk(4.6)68 b(F)-11 b(urther)44
9366 -b(reading)150 4196 y Fi(bzip2)26 b Fj(is)h(not)h(researc)m(h)g(w)m
9367 -(ork,)g(in)f(the)h(sense)f(that)h(it)g(do)s(esn't)f(presen)m(t)h(an)m
9368 -(y)f(new)g(ideas.)40 b(Rather,)28 b(it's)150 4306 y(an)i(engineering)h
9369 -(exercise)h(based)e(on)g(existing)i(ideas.)150 4463 y(F)-8
9370 -b(our)31 b(do)s(cumen)m(ts)f(describ)s(e)g(essen)m(tially)i(all)f(the)g
9371 -(ideas)f(b)s(ehind)f Fi(bzip2)p Fj(:)390 4614 y Fi(Michael)46
9372 -b(Burrows)g(and)h(D.)g(J.)g(Wheeler:)485 4717 y("A)h(block-sorting)c
9373 -(lossless)h(data)i(compression)e(algorithm")533 4821
9374 -y(10th)i(May)g(1994.)533 4925 y(Digital)f(SRC)h(Research)e(Report)i
9375 -(124.)533 5029 y(ftp://ftp.digital.com/pub)o(/DEC)o(/SR)o(C/re)o(sear)o
9376 -(ch-)o(repo)o(rts/)o(SRC)o(-124)o(.ps.)o(gz)533 5132
9377 -y(If)g(you)g(have)g(trouble)f(finding)g(it,)g(try)h(searching)f(at)h
9378 -(the)533 5236 y(New)g(Zealand)f(Digital)g(Library,)f
9379 -(http://www.nzdl.org.)p eop
9380 -%%Page: 37 38
9381 -37 37 bop 150 -116 a Fl(Chapter)30 b(4:)41 b(Miscellanea)2586
9382 -b(37)390 299 y Fi(Daniel)46 b(S.)h(Hirschberg)e(and)i(Debra)g(A.)g
9383 -(LeLewer)485 403 y("Efficient)e(Decoding)h(of)h(Prefix)f(Codes")533
9384 -506 y(Communications)e(of)j(the)g(ACM,)g(April)f(1990,)h(Vol)f(33,)h
9385 -(Number)f(4.)533 610 y(You)h(might)f(be)i(able)e(to)h(get)g(an)h
9386 -(electronic)d(copy)h(of)h(this)676 714 y(from)g(the)g(ACM)g(Digital)f
9387 -(Library.)390 922 y(David)g(J.)i(Wheeler)533 1025 y(Program)e(bred3.c)g
9388 -(and)h(accompanying)d(document)i(bred3.ps.)533 1129 y(This)h(contains)e
9389 -(the)i(idea)g(behind)f(the)h(multi-table)e(Huffman)533
9390 -1233 y(coding)h(scheme.)533 1337 y(ftp://ftp.cl.cam.ac.uk/us)o(ers/)o
9391 -(djw)o(3/)390 1544 y(Jon)h(L.)g(Bentley)f(and)h(Robert)f(Sedgewick)485
9392 -1648 y("Fast)h(Algorithms)e(for)i(Sorting)f(and)g(Searching)g(Strings")
9393 -533 1752 y(Available)f(from)i(Sedgewick's)e(web)i(page,)533
9394 -1856 y(www.cs.princeton.edu/~rs)150 2012 y Fj(The)29
9395 -b(follo)m(wing)h(pap)s(er)d(giv)m(es)j(v)-5 b(aluable)29
9396 -b(additional)g(insigh)m(ts)g(in)m(to)h(the)f(algorithm,)h(but)e(is)h
9397 -(not)g(imme-)150 2122 y(diately)i(the)g(basis)f(of)h(an)m(y)f(co)s(de)h
9398 -(used)e(in)h(bzip2.)390 2273 y Fi(Peter)46 b(Fenwick:)533
9399 -2377 y(Block)h(Sorting)e(Text)i(Compression)533 2481
9400 -y(Proceedings)e(of)i(the)g(19th)g(Australasian)d(Computer)i(Science)f
9401 -(Conference,)629 2584 y(Melbourne,)g(Australia.)92 b(Jan)47
9402 -b(31)g(-)h(Feb)f(2,)g(1996.)533 2688 y(ftp://ftp.cs.auckland.ac.)o
9403 -(nz/p)o(ub/)o(pete)o(r-f/)o(ACS)o(C96p)o(aper)o(.ps)150
9404 -2845 y Fj(Kunihik)m(o)30 b(Sadak)-5 b(ane's)30 b(sorting)i(algorithm,)f
9405 -(men)m(tioned)g(ab)s(o)m(v)m(e,)h(is)e(a)m(v)-5 b(ailable)32
9406 -b(from:)390 2996 y Fi(http://naomi.is.s.u-toky)o(o.ac)o(.jp/)o(~sa)o
9407 -(da/p)o(aper)o(s/S)o(ada9)o(8b.p)o(s.g)o(z)150 3153 y
9408 -Fj(The)38 b(Man)m(b)s(er-My)m(ers)h(su\016x)e(arra)m(y)i(construction)g
9409 -(algorithm)h(is)e(describ)s(ed)f(in)h(a)g(pap)s(er)f(a)m(v)-5
9410 -b(ailable)150 3262 y(from:)390 3413 y Fi(http://www.cs.arizona.ed)o
9411 -(u/pe)o(ople)o(/ge)o(ne/P)o(APER)o(S/s)o(uffi)o(x.ps)150
9412 -3570 y Fj(Finally)d(,)33 b(the)e(follo)m(wing)i(pap)s(er)d(do)s(cumen)m
9413 -(ts)h(some)g(recen)m(t)i(in)m(v)m(estigations)h(I)d(made)g(in)m(to)i
9414 -(the)e(p)s(erfor-)150 3680 y(mance)g(of)f(sorting)h(algorithms:)390
9415 -3831 y Fi(Julian)46 b(Seward:)533 3935 y(On)h(the)g(Performance)e(of)i
9416 -(BWT)g(Sorting)f(Algorithms)533 4038 y(Proceedings)f(of)i(the)g(IEEE)g
9417 -(Data)f(Compression)f(Conference)g(2000)629 4142 y(Snowbird,)g(Utah.)94
9418 -b(28-30)46 b(March)h(2000.)p eop
9419 -%%Page: -1 39
9420 --1 38 bop 3725 -116 a Fl(i)150 299 y Fg(T)-13 b(able)54
9421 -b(of)g(Con)l(ten)l(ts)150 641 y Fk(1)135 b(In)l(tro)t(duction)15
9422 -b Fa(.)20 b(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f
9423 -(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)60
9424 -b Fk(2)150 911 y(2)135 b(Ho)l(w)45 b(to)h(use)f Fc(bzip2)31
9425 -b Fa(.)19 b(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g
9426 -(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)78 b Fk(3)1047
9427 -1048 y Fj(NAME)18 b Fb(.)d(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
9428 -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
9429 -g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)48 b Fl(3)1047
9430 -1157 y Fj(SYNOPSIS)18 b Fb(.)c(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
9431 -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
9432 -g(.)g(.)g(.)g(.)g(.)g(.)g(.)48 b Fl(3)1047 1267 y Fj(DESCRIPTION)28
9433 -b Fb(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
9434 -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)59
9435 -b Fl(3)1047 1377 y Fj(OPTIONS)16 b Fb(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g
9436 -(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
9437 -g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)46 b Fl(4)1047
9438 -1486 y Fj(MEMOR)-8 b(Y)31 b(MANA)m(GEMENT)9 b Fb(.)16
9439 -b(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
9440 -(.)g(.)39 b Fl(6)1047 1596 y Fj(RECO)m(VERING)30 b(D)m(A)-8
9441 -b(T)g(A)31 b(FR)m(OM)g(D)m(AMA)m(GED)g(FILES)1256 1705
9442 -y Fb(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
9443 -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)
9444 -g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)57 b Fl(7)1047 1815 y
9445 -Fj(PERF)m(ORMANCE)30 b(NOTES)10 b Fb(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g
9446 -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)40
9447 -b Fl(8)1047 1924 y Fj(CA)-10 b(VEA)i(TS)12 b Fb(.)h(.)i(.)g(.)g(.)g(.)g
9448 -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)
9449 -g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)42
9450 -b Fl(8)1047 2034 y Fj(A)m(UTHOR)22 b Fb(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g
9451 -(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
9452 -g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)52 b
9453 -Fl(8)150 2276 y Fk(3)135 b(Programming)46 b(with)f Fc(libbzip2)27
9454 -b Fa(.)16 b(.)j(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)72
9455 -b Fk(10)449 2413 y Fj(3.1)92 b(T)-8 b(op-lev)m(el)33
9456 -b(structure)18 b Fb(.)d(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
9457 -(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
9458 -g(.)g(.)g(.)g(.)g(.)g(.)47 b Fl(10)748 2523 y Fj(3.1.1)93
9459 -b(Lo)m(w-lev)m(el)32 b(summary)20 b Fb(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g
9460 -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
9461 -g(.)g(.)g(.)50 b Fl(10)748 2633 y Fj(3.1.2)93 b(High-lev)m(el)32
9462 -b(summary)27 b Fb(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
9463 -g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)57
9464 -b Fl(10)748 2742 y Fj(3.1.3)93 b(Utilit)m(y)32 b(functions)e(summary)10
9465 -b Fb(.)k(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
9466 -g(.)g(.)g(.)g(.)g(.)39 b Fl(11)449 2852 y Fj(3.2)92 b(Error)30
9467 -b(handling)15 b Fb(.)f(.)h(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g
9468 -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
9469 -g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)44 b Fl(11)449
9470 -2961 y Fj(3.3)92 b(Lo)m(w-lev)m(el)32 b(in)m(terface)26
9471 -b Fb(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
9472 -(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
9473 -g(.)g(.)g(.)53 b Fl(13)748 3071 y Fj(3.3.1)93 b Fi(BZ2_bzCompressInit)
9474 -21 b Fb(.)9 b(.)15 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)
9475 -g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)50 b Fl(13)748
9476 -3181 y Fj(3.3.2)93 b Fi(BZ2_bzCompress)9 b Fb(.)h(.)15
9477 -b(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
9478 -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)38 b Fl(15)748
9479 -3290 y Fj(3.3.3)93 b Fi(BZ2_bzCompressEnd)23 b Fb(.)10
9480 -b(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
9481 -g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)52 b Fl(18)748 3400
9482 -y Fj(3.3.4)93 b Fi(BZ2_bzDecompressInit)16 b Fb(.)9 b(.)15
9483 -b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
9484 -(.)g(.)g(.)g(.)g(.)45 b Fl(18)748 3509 y Fj(3.3.5)93
9485 -b Fi(BZ2_bzDecompress)21 b Fb(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
9486 -g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
9487 -(.)55 b Fl(18)748 3619 y Fj(3.3.6)93 b Fi(BZ2_bzDecompressEnd)18
9488 -b Fb(.)10 b(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
9489 -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)48 b Fl(20)449
9490 -3729 y Fj(3.4)92 b(High-lev)m(el)33 b(in)m(terface)9
9491 -b Fb(.)17 b(.)e(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
9492 -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
9493 -g(.)g(.)g(.)38 b Fl(20)748 3838 y Fj(3.4.1)93 b Fi(BZ2_bzReadOpen)9
9494 -b Fb(.)h(.)15 b(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g
9495 -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)38
9496 -b Fl(20)748 3948 y Fj(3.4.2)93 b Fi(BZ2_bzRead)18 b Fb(.)12
9497 -b(.)j(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
9498 -(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)47
9499 -b Fl(21)748 4057 y Fj(3.4.3)93 b Fi(BZ2_bzReadGetUnused)18
9500 -b Fb(.)10 b(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
9501 -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)48 b Fl(23)748
9502 -4167 y Fj(3.4.4)93 b Fi(BZ2_bzReadClose)23 b Fb(.)15
9503 -b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g
9504 -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)57 b Fl(23)748
9505 -4276 y Fj(3.4.5)93 b Fi(BZ2_bzWriteOpen)23 b Fb(.)15
9506 -b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g
9507 -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)57 b Fl(23)748
9508 -4386 y Fj(3.4.6)93 b Fi(BZ2_bzWrite)16 b Fb(.)11 b(.)k(.)g(.)g(.)g(.)g
9509 -(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
9510 -g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)45 b Fl(24)748
9511 -4496 y Fj(3.4.7)93 b Fi(BZ2_bzWriteClose)21 b Fb(.)15
9512 -b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
9513 -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)55 b Fl(25)748
9514 -4605 y Fj(3.4.8)93 b(Handling)30 b(em)m(b)s(edded)f(compressed)h(data)h
9515 -(streams)9 b Fb(.)15 b(.)g(.)g(.)38 b Fl(25)748 4715
9516 -y Fj(3.4.9)93 b(Standard)29 b(\014le-reading/writing)j(co)s(de)16
9517 -b Fb(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)45
9518 -b Fl(26)449 4824 y Fj(3.5)92 b(Utilit)m(y)32 b(functions)c
9519 -Fb(.)15 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
9520 -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
9521 -g(.)g(.)g(.)g(.)h(.)57 b Fl(27)748 4934 y Fj(3.5.1)93
9522 -b Fi(BZ2_bzBuffToBuffCompres)o(s)22 b Fb(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g
9523 -(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)57 b Fl(27)748
9524 -5044 y Fj(3.5.2)93 b Fi(BZ2_bzBuffToBuffDecompr)o(ess)17
9525 -b Fb(.)e(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
9526 -53 b Fl(28)449 5153 y Fj(3.6)92 b Fi(zlib)29 b Fj(compatibilit)m(y)k
9527 -(functions)23 b Fb(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
9528 -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)52
9529 -b Fl(29)449 5263 y Fj(3.7)92 b(Using)30 b(the)h(library)f(in)g(a)h
9530 -Fi(stdio)p Fj(-free)f(en)m(vironmen)m(t)12 b Fb(.)k(.)f(.)g(.)g(.)g(.)g
9531 -(.)g(.)g(.)g(.)g(.)g(.)41 b Fl(30)p eop
9532 -%%Page: -2 40
9533 --2 39 bop 3699 -116 a Fl(ii)748 83 y Fj(3.7.1)93 b(Getting)32
9534 -b(rid)e(of)g Fi(stdio)17 b Fb(.)d(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
9535 -(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)46
9536 -b Fl(30)748 193 y Fj(3.7.2)93 b(Critical)31 b(error)g(handling)18
9537 -b Fb(.)c(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
9538 -g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)47 b Fl(30)449 302 y
9539 -Fj(3.8)92 b(Making)31 b(a)f(Windo)m(ws)g(DLL)17 b Fb(.)d(.)h(.)g(.)g(.)
9540 -g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g
9541 -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)46 b Fl(31)150
9542 -545 y Fk(4)135 b(Miscellanea)11 b Fa(.)21 b(.)f(.)f(.)h(.)f(.)g(.)h(.)f
9543 -(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)
9544 -f(.)h(.)f(.)g(.)h(.)56 b Fk(32)449 682 y Fj(4.1)92 b(Limitations)31
9545 -b(of)g(the)g(compressed)f(\014le)g(format)c Fb(.)15 b(.)g(.)g(.)g(.)g
9546 -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)54 b Fl(32)449
9547 -791 y Fj(4.2)92 b(P)m(ortabilit)m(y)33 b(issues)12 b
9548 -Fb(.)j(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
9549 -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)
9550 -g(.)g(.)g(.)g(.)41 b Fl(33)449 901 y Fj(4.3)92 b(Rep)s(orting)31
9551 -b(bugs)24 b Fb(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
9552 -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
9553 -g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)54 b Fl(33)449 1010
9554 -y Fj(4.4)92 b(Did)30 b(y)m(ou)g(get)i(the)f(righ)m(t)g(pac)m(k)-5
9555 -b(age?)18 b Fb(.)f(.)e(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
9556 -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)47 b Fl(35)449
9557 -1120 y Fj(4.5)92 b(T)-8 b(esting)16 b Fb(.)h(.)e(.)g(.)g(.)g(.)g(.)g(.)
9558 -g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
9559 -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
9560 -g(.)g(.)g(.)g(.)g(.)46 b Fl(35)449 1230 y Fj(4.6)92 b(F)-8
9561 -b(urther)30 b(reading)17 b Fb(.)f(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
9562 -(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
9563 -g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)46 b
9564 -Fl(36)p eop
9565 -%%Trailer
9566 -end
9567 -userdict /end-hook known{end-hook}if
9568 -%%EOF
9569 diff -Nru bzip2-1.0.2/manual.texi bzip2-1.0.2.new/manual.texi
9570 --- bzip2-1.0.2/manual.texi     Sat Jan  5 01:52:50 2002
9571 +++ bzip2-1.0.2.new/manual.texi Thu Jan  1 01:00:00 1970
9572 @@ -1,2243 +0,0 @@
9573 -\input texinfo  @c                                  -*- Texinfo -*-
9574 -@setfilename bzip2.info
9575 -
9576 -@ignore
9577 -This file documents bzip2 version 1.0.2, and associated library
9578 -libbzip2, written by Julian Seward (jseward@acm.org).
9579 -
9580 -Copyright (C) 1996-2002 Julian R Seward
9581 -
9582 -Permission is granted to make and distribute verbatim copies of
9583 -this manual provided the copyright notice and this permission notice
9584 -are preserved on all copies.
9585 -
9586 -Permission is granted to copy and distribute translations of this manual
9587 -into another language, under the above conditions for verbatim copies.
9588 -@end ignore
9589 -
9590 -@ifinfo
9591 -@format
9592 -START-INFO-DIR-ENTRY
9593 -* Bzip2: (bzip2).              A program and library for data compression.
9594 -END-INFO-DIR-ENTRY
9595 -@end format
9596 -
9597 -@end ifinfo
9598 -
9599 -@iftex
9600 -@c @finalout
9601 -@settitle bzip2 and libbzip2
9602 -@titlepage
9603 -@title bzip2 and libbzip2
9604 -@subtitle a program and library for data compression
9605 -@subtitle copyright (C) 1996-2002 Julian Seward
9606 -@subtitle version 1.0.2 of 30 December 2001
9607 -@author Julian Seward
9608 -
9609 -@end titlepage
9610 -
9611 -@parindent 0mm
9612 -@parskip 2mm
9613 -
9614 -@end iftex
9615 -@node Top,,, (dir)
9616 -
9617 -The following text is the License for this software.  You should
9618 -find it identical to that contained in the file LICENSE in the 
9619 -source distribution.
9620 -
9621 -@bf{------------------ START OF THE LICENSE ------------------}
9622 -
9623 -This program, @code{bzip2}, 
9624 -and associated library @code{libbzip2}, are
9625 -Copyright (C) 1996-2002 Julian R Seward.  All rights reserved.
9626 -
9627 -Redistribution and use in source and binary forms, with or without
9628 -modification, are permitted provided that the following conditions
9629 -are met:
9630 -@itemize @bullet
9631 -@item
9632 -   Redistributions of source code must retain the above copyright
9633 -   notice, this list of conditions and the following disclaimer.
9634 -@item
9635 -   The origin of this software must not be misrepresented; you must 
9636 -   not claim that you wrote the original software.  If you use this 
9637 -   software in a product, an acknowledgment in the product 
9638 -   documentation would be appreciated but is not required.
9639 -@item
9640 -   Altered source versions must be plainly marked as such, and must
9641 -   not be misrepresented as being the original software.
9642 -@item
9643 -   The name of the author may not be used to endorse or promote 
9644 -   products derived from this software without specific prior written 
9645 -   permission.
9646 -@end itemize
9647 -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
9648 -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
9649 -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
9650 -ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
9651 -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
9652 -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
9653 -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
9654 -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
9655 -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
9656 -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
9657 -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9658 -
9659 -Julian Seward, Cambridge, UK.
9660 -
9661 -@code{jseward@@acm.org}
9662 -
9663 -@code{bzip2}/@code{libbzip2} version 1.0.2 of 30 December 2001.
9664 -
9665 -@bf{------------------ END OF THE LICENSE ------------------}
9666 -
9667 -Web sites:
9668 -
9669 -@code{http://sources.redhat.com/bzip2}
9670 -
9671 -@code{http://www.cacheprof.org}
9672 -
9673 -PATENTS: To the best of my knowledge, @code{bzip2} does not use any patented
9674 -algorithms.  However, I do not have the resources available to carry out
9675 -a full patent search.  Therefore I cannot give any guarantee of the
9676 -above statement.
9677 -
9678 -
9679 -
9680 -
9681 -
9682 -
9683 -
9684 -@chapter Introduction
9685 -
9686 -@code{bzip2}  compresses  files  using the Burrows-Wheeler 
9687 -block-sorting text compression algorithm,  and  Huffman  coding.
9688 -Compression  is  generally  considerably  better than that
9689 -achieved by more conventional LZ77/LZ78-based compressors,
9690 -and  approaches  the performance of the PPM family of statistical compressors.
9691 -
9692 -@code{bzip2} is built on top of @code{libbzip2}, a flexible library
9693 -for handling compressed data in the @code{bzip2} format.  This manual
9694 -describes both how to use the program and 
9695 -how to work with the library interface.  Most of the
9696 -manual is devoted to this library, not the program, 
9697 -which is good news if your interest is only in the program.
9698 -
9699 -Chapter 2 describes how to use @code{bzip2}; this is the only part 
9700 -you need to read if you just want to know how to operate the program.
9701 -Chapter 3 describes the programming interfaces in detail, and
9702 -Chapter 4 records some miscellaneous notes which I thought
9703 -ought to be recorded somewhere.
9704 -
9705 -
9706 -@chapter How to use @code{bzip2}
9707 -
9708 -This chapter contains a copy of the @code{bzip2} man page,
9709 -and nothing else.
9710 -
9711 -@quotation
9712 -
9713 -@unnumberedsubsubsec NAME
9714 -@itemize
9715 -@item @code{bzip2}, @code{bunzip2}
9716 -- a block-sorting file compressor, v1.0.2
9717 -@item @code{bzcat} 
9718 -- decompresses files to stdout
9719 -@item @code{bzip2recover}
9720 -- recovers data from damaged bzip2 files
9721 -@end itemize
9722 -
9723 -@unnumberedsubsubsec SYNOPSIS
9724 -@itemize
9725 -@item @code{bzip2} [ -cdfkqstvzVL123456789 ] [ filenames ...  ]
9726 -@item @code{bunzip2} [ -fkvsVL ] [ filenames ...  ]
9727 -@item @code{bzcat} [ -s ] [ filenames ...  ]
9728 -@item @code{bzip2recover} filename
9729 -@end itemize
9730 -
9731 -@unnumberedsubsubsec DESCRIPTION
9732 -
9733 -@code{bzip2} compresses files using the Burrows-Wheeler block sorting
9734 -text compression algorithm, and Huffman coding.  Compression is
9735 -generally considerably better than that achieved by more conventional
9736 -LZ77/LZ78-based compressors, and approaches the performance of the PPM
9737 -family of statistical compressors.
9738 -
9739 -The command-line options are deliberately very similar to those of GNU
9740 -@code{gzip}, but they are not identical.
9741 -
9742 -@code{bzip2} expects a list of file names to accompany the command-line
9743 -flags.  Each file is replaced by a compressed version of itself, with
9744 -the name @code{original_name.bz2}.  Each compressed file has the same
9745 -modification date, permissions, and, when possible, ownership as the
9746 -corresponding original, so that these properties can be correctly
9747 -restored at decompression time.  File name handling is naive in the
9748 -sense that there is no mechanism for preserving original file names,
9749 -permissions, ownerships or dates in filesystems which lack these
9750 -concepts, or have serious file name length restrictions, such as MS-DOS.
9751 -
9752 -@code{bzip2} and @code{bunzip2} will by default not overwrite existing
9753 -files.  If you want this to happen, specify the @code{-f} flag.
9754 -
9755 -If no file names are specified, @code{bzip2} compresses from standard
9756 -input to standard output.  In this case, @code{bzip2} will decline to
9757 -write compressed output to a terminal, as this would be entirely
9758 -incomprehensible and therefore pointless.
9759 -
9760 -@code{bunzip2} (or @code{bzip2 -d}) decompresses all
9761 -specified files.  Files which were not created by @code{bzip2}
9762 -will be detected and ignored, and a warning issued.  
9763 -@code{bzip2} attempts to guess the filename for the decompressed file 
9764 -from that of the compressed file as follows:
9765 -@itemize
9766 -@item @code{filename.bz2 } becomes @code{filename}
9767 -@item @code{filename.bz  } becomes @code{filename}
9768 -@item @code{filename.tbz2} becomes @code{filename.tar}
9769 -@item @code{filename.tbz } becomes @code{filename.tar}
9770 -@item @code{anyothername } becomes @code{anyothername.out}
9771 -@end itemize
9772 -If the file does not end in one of the recognised endings, 
9773 -@code{.bz2}, @code{.bz}, 
9774 -@code{.tbz2} or @code{.tbz}, @code{bzip2} complains that it cannot
9775 -guess the name of the original file, and uses the original name
9776 -with @code{.out} appended.
9777 -
9778 -As with compression, supplying no
9779 -filenames causes decompression from standard input to standard output.
9780 -
9781 -@code{bunzip2} will correctly decompress a file which is the
9782 -concatenation of two or more compressed files.  The result is the
9783 -concatenation of the corresponding uncompressed files.  Integrity
9784 -testing (@code{-t}) of concatenated compressed files is also supported.
9785 -
9786 -You can also compress or decompress files to the standard output by
9787 -giving the @code{-c} flag.  Multiple files may be compressed and
9788 -decompressed like this.  The resulting outputs are fed sequentially to
9789 -stdout.  Compression of multiple files in this manner generates a stream
9790 -containing multiple compressed file representations.  Such a stream
9791 -can be decompressed correctly only by @code{bzip2} version 0.9.0 or
9792 -later.  Earlier versions of @code{bzip2} will stop after decompressing
9793 -the first file in the stream.
9794 -
9795 -@code{bzcat} (or @code{bzip2 -dc}) decompresses all specified files to
9796 -the standard output.
9797 -
9798 -@code{bzip2} will read arguments from the environment variables
9799 -@code{BZIP2} and @code{BZIP}, in that order, and will process them
9800 -before any arguments read from the command line.  This gives a 
9801 -convenient way to supply default arguments.
9802 -
9803 -Compression is always performed, even if the compressed file is slightly
9804 -larger than the original.  Files of less than about one hundred bytes
9805 -tend to get larger, since the compression mechanism has a constant
9806 -overhead in the region of 50 bytes.  Random data (including the output
9807 -of most file compressors) is coded at about 8.05 bits per byte, giving
9808 -an expansion of around 0.5%.
9809 -
9810 -As a self-check for your protection, @code{bzip2} uses 32-bit CRCs to
9811 -make sure that the decompressed version of a file is identical to the
9812 -original.  This guards against corruption of the compressed data, and
9813 -against undetected bugs in @code{bzip2} (hopefully very unlikely).  The
9814 -chances of data corruption going undetected is microscopic, about one
9815 -chance in four billion for each file processed.  Be aware, though, that
9816 -the check occurs upon decompression, so it can only tell you that
9817 -something is wrong.  It can't help you recover the original uncompressed
9818 -data.  You can use @code{bzip2recover} to try to recover data from
9819 -damaged files.
9820 -
9821 -Return values: 0 for a normal exit, 1 for environmental problems (file
9822 -not found, invalid flags, I/O errors, &c), 2 to indicate a corrupt
9823 -compressed file, 3 for an internal consistency error (eg, bug) which
9824 -caused @code{bzip2} to panic.
9825 -
9826 -
9827 -@unnumberedsubsubsec OPTIONS
9828 -@table @code
9829 -@item -c  --stdout
9830 -Compress or decompress to standard output.
9831 -@item -d  --decompress
9832 -Force decompression.  @code{bzip2}, @code{bunzip2} and @code{bzcat} are
9833 -really the same program, and the decision about what actions to take is
9834 -done on the basis of which name is used.  This flag overrides that
9835 -mechanism, and forces bzip2 to decompress.
9836 -@item -z --compress
9837 -The complement to @code{-d}: forces compression, regardless of the
9838 -invokation name.
9839 -@item -t --test
9840 -Check integrity of the specified file(s), but don't decompress them.
9841 -This really performs a trial decompression and throws away the result.
9842 -@item -f --force
9843 -Force overwrite of output files.  Normally, @code{bzip2} will not overwrite
9844 -existing output files.  Also forces @code{bzip2} to break hard links
9845 -to files, which it otherwise wouldn't do.
9846 -
9847 -@code{bzip2} normally declines to decompress files which don't have the
9848 -correct magic header bytes.  If forced (@code{-f}), however, it will
9849 -pass such files through unmodified.  This is how GNU @code{gzip}
9850 -behaves.
9851 -@item -k --keep
9852 -Keep (don't delete) input files during compression
9853 -or decompression.
9854 -@item -s --small
9855 -Reduce memory usage, for compression, decompression and testing.  Files
9856 -are decompressed and tested using a modified algorithm which only
9857 -requires 2.5 bytes per block byte.  This means any file can be
9858 -decompressed in 2300k of memory, albeit at about half the normal speed.
9859 -
9860 -During compression, @code{-s} selects a block size of 200k, which limits
9861 -memory use to around the same figure, at the expense of your compression
9862 -ratio.  In short, if your machine is low on memory (8 megabytes or
9863 -less), use -s for everything.  See MEMORY MANAGEMENT below.
9864 -@item -q --quiet
9865 -Suppress non-essential warning messages.  Messages pertaining to
9866 -I/O errors and other critical events will not be suppressed.
9867 -@item -v --verbose
9868 -Verbose mode -- show the compression ratio for each file processed.
9869 -Further @code{-v}'s increase the verbosity level, spewing out lots of
9870 -information which is primarily of interest for diagnostic purposes.
9871 -@item -L --license -V --version
9872 -Display the software version, license terms and conditions.
9873 -@item -1 (or --fast) to -9 (or --best)
9874 -Set the block size to 100 k, 200 k ..  900 k when compressing.  Has no
9875 -effect when decompressing.  See MEMORY MANAGEMENT below.
9876 -The @code{--fast} and @code{--best} aliases are primarily for GNU
9877 -@code{gzip} compatibility.  In particular, @code{--fast} doesn't make
9878 -things significantly faster.  And @code{--best} merely selects the
9879 -default behaviour.
9880 -@item --
9881 -Treats all subsequent arguments as file names, even if they start
9882 -with a dash.  This is so you can handle files with names beginning
9883 -with a dash, for example: @code{bzip2 -- -myfilename}.
9884 -@item --repetitive-fast 
9885 -@item --repetitive-best
9886 -These flags are redundant in versions 0.9.5 and above.  They provided
9887 -some coarse control over the behaviour of the sorting algorithm in
9888 -earlier versions, which was sometimes useful.  0.9.5 and above have an
9889 -improved algorithm which renders these flags irrelevant.
9890 -@end table
9891 -
9892 -
9893 -@unnumberedsubsubsec MEMORY MANAGEMENT
9894 -
9895 -@code{bzip2} compresses large files in blocks.  The block size affects
9896 -both the compression ratio achieved, and the amount of memory needed for
9897 -compression and decompression.  The flags @code{-1} through @code{-9}
9898 -specify the block size to be 100,000 bytes through 900,000 bytes (the
9899 -default) respectively.  At decompression time, the block size used for
9900 -compression is read from the header of the compressed file, and
9901 -@code{bunzip2} then allocates itself just enough memory to decompress
9902 -the file.  Since block sizes are stored in compressed files, it follows
9903 -that the flags @code{-1} to @code{-9} are irrelevant to and so ignored
9904 -during decompression.
9905 -
9906 -Compression and decompression requirements, in bytes, can be estimated
9907 -as:
9908 -@example
9909 -     Compression:   400k + ( 8 x block size )
9910 -
9911 -     Decompression: 100k + ( 4 x block size ), or
9912 -                    100k + ( 2.5 x block size )
9913 -@end example
9914 -Larger block sizes give rapidly diminishing marginal returns.  Most of
9915 -the compression comes from the first two or three hundred k of block
9916 -size, a fact worth bearing in mind when using @code{bzip2} on small machines.
9917 -It is also important to appreciate that the decompression memory
9918 -requirement is set at compression time by the choice of block size.
9919 -
9920 -For files compressed with the default 900k block size, @code{bunzip2}
9921 -will require about 3700 kbytes to decompress.  To support decompression
9922 -of any file on a 4 megabyte machine, @code{bunzip2} has an option to
9923 -decompress using approximately half this amount of memory, about 2300
9924 -kbytes.  Decompression speed is also halved, so you should use this
9925 -option only where necessary.  The relevant flag is @code{-s}.
9926 -
9927 -In general, try and use the largest block size memory constraints allow,
9928 -since that maximises the compression achieved.  Compression and
9929 -decompression speed are virtually unaffected by block size.
9930 -
9931 -Another significant point applies to files which fit in a single block
9932 --- that means most files you'd encounter using a large block size.  The
9933 -amount of real memory touched is proportional to the size of the file,
9934 -since the file is smaller than a block.  For example, compressing a file
9935 -20,000 bytes long with the flag @code{-9} will cause the compressor to
9936 -allocate around 7600k of memory, but only touch 400k + 20000 * 8 = 560
9937 -kbytes of it.  Similarly, the decompressor will allocate 3700k but only
9938 -touch 100k + 20000 * 4 = 180 kbytes.
9939 -
9940 -Here is a table which summarises the maximum memory usage for different
9941 -block sizes.  Also recorded is the total compressed size for 14 files of
9942 -the Calgary Text Compression Corpus totalling 3,141,622 bytes.  This
9943 -column gives some feel for how compression varies with block size.
9944 -These figures tend to understate the advantage of larger block sizes for
9945 -larger files, since the Corpus is dominated by smaller files.
9946 -@example
9947 -          Compress   Decompress   Decompress   Corpus
9948 -   Flag     usage      usage       -s usage     Size
9949 -
9950 -    -1      1200k       500k         350k      914704
9951 -    -2      2000k       900k         600k      877703
9952 -    -3      2800k      1300k         850k      860338
9953 -    -4      3600k      1700k        1100k      846899
9954 -    -5      4400k      2100k        1350k      845160
9955 -    -6      5200k      2500k        1600k      838626
9956 -    -7      6100k      2900k        1850k      834096
9957 -    -8      6800k      3300k        2100k      828642
9958 -    -9      7600k      3700k        2350k      828642
9959 -@end example
9960 -
9961 -@unnumberedsubsubsec RECOVERING DATA FROM DAMAGED FILES
9962 -
9963 -@code{bzip2} compresses files in blocks, usually 900kbytes long.  Each
9964 -block is handled independently.  If a media or transmission error causes
9965 -a multi-block @code{.bz2} file to become damaged, it may be possible to
9966 -recover data from the undamaged blocks in the file.
9967 -
9968 -The compressed representation of each block is delimited by a 48-bit
9969 -pattern, which makes it possible to find the block boundaries with
9970 -reasonable certainty.  Each block also carries its own 32-bit CRC, so
9971 -damaged blocks can be distinguished from undamaged ones.
9972 -
9973 -@code{bzip2recover} is a simple program whose purpose is to search for
9974 -blocks in @code{.bz2} files, and write each block out into its own
9975 -@code{.bz2} file.  You can then use @code{bzip2 -t} to test the
9976 -integrity of the resulting files, and decompress those which are
9977 -undamaged.
9978 -
9979 -@code{bzip2recover} 
9980 -takes a single argument, the name of the damaged file, and writes a
9981 -number of files @code{rec00001file.bz2}, @code{rec00002file.bz2}, etc,
9982 -containing the extracted blocks.  The output filenames are designed so
9983 -that the use of wildcards in subsequent processing -- for example,
9984 -@code{bzip2 -dc rec*file.bz2 > recovered_data} -- processes the files in
9985 -the correct order.
9986 -
9987 -@code{bzip2recover} should be of most use dealing with large @code{.bz2}
9988 -files, as these will contain many blocks.  It is clearly futile to use
9989 -it on damaged single-block files, since a damaged block cannot be
9990 -recovered.  If you wish to minimise any potential data loss through
9991 -media or transmission errors, you might consider compressing with a
9992 -smaller block size.
9993 -
9994 -
9995 -@unnumberedsubsubsec PERFORMANCE NOTES
9996 -
9997 -The sorting phase of compression gathers together similar strings in the
9998 -file.  Because of this, files containing very long runs of repeated
9999 -symbols, like "aabaabaabaab ..."  (repeated several hundred times) may
10000 -compress more slowly than normal.  Versions 0.9.5 and above fare much
10001 -better than previous versions in this respect.  The ratio between
10002 -worst-case and average-case compression time is in the region of 10:1.
10003 -For previous versions, this figure was more like 100:1.  You can use the
10004 -@code{-vvvv} option to monitor progress in great detail, if you want.
10005 -
10006 -Decompression speed is unaffected by these phenomena.
10007 -
10008 -@code{bzip2} usually allocates several megabytes of memory to operate
10009 -in, and then charges all over it in a fairly random fashion.  This means
10010 -that performance, both for compressing and decompressing, is largely
10011 -determined by the speed at which your machine can service cache misses.
10012 -Because of this, small changes to the code to reduce the miss rate have
10013 -been observed to give disproportionately large performance improvements.
10014 -I imagine @code{bzip2} will perform best on machines with very large
10015 -caches.
10016 -
10017 -
10018 -@unnumberedsubsubsec CAVEATS
10019 -
10020 -I/O error messages are not as helpful as they could be.  @code{bzip2}
10021 -tries hard to detect I/O errors and exit cleanly, but the details of
10022 -what the problem is sometimes seem rather misleading.
10023 -
10024 -This manual page pertains to version 1.0.2 of @code{bzip2}.  Compressed
10025 -data created by this version is entirely forwards and backwards
10026 -compatible with the previous public releases, versions 0.1pl2, 0.9.0,
10027 -0.9.5, 1.0.0 and 1.0.1, but with the following exception: 0.9.0 and
10028 -above can correctly decompress multiple concatenated compressed files.
10029 -0.1pl2 cannot do this; it will stop after decompressing just the first
10030 -file in the stream.
10031 -
10032 -@code{bzip2recover} versions prior to this one, 1.0.2, used 32-bit
10033 -integers to represent bit positions in compressed files, so it could not
10034 -handle compressed files more than 512 megabytes long.  Version 1.0.2 and
10035 -above uses 64-bit ints on some platforms which support them (GNU
10036 -supported targets, and Windows).  To establish whether or not
10037 -@code{bzip2recover} was built with such a limitation, run it without
10038 -arguments.  In any event you can build yourself an unlimited version if
10039 -you can recompile it with @code{MaybeUInt64} set to be an unsigned
10040 -64-bit integer.
10041 -
10042 -
10043 -
10044 -@unnumberedsubsubsec AUTHOR
10045 -Julian Seward, @code{jseward@@acm.org}.
10046 -
10047 -@code{http://sources.redhat.com/bzip2}
10048 -
10049 -The ideas embodied in @code{bzip2} are due to (at least) the following
10050 -people: Michael Burrows and David Wheeler (for the block sorting
10051 -transformation), David Wheeler (again, for the Huffman coder), Peter
10052 -Fenwick (for the structured coding model in the original @code{bzip},
10053 -and many refinements), and Alistair Moffat, Radford Neal and Ian Witten
10054 -(for the arithmetic coder in the original @code{bzip}).  I am much
10055 -indebted for their help, support and advice.  See the manual in the
10056 -source distribution for pointers to sources of documentation.  Christian
10057 -von Roques encouraged me to look for faster sorting algorithms, so as to
10058 -speed up compression.  Bela Lubkin encouraged me to improve the
10059 -worst-case compression performance.  The @code{bz*} scripts are derived
10060 -from those of GNU @code{gzip}.  Many people sent patches, helped with
10061 -portability problems, lent machines, gave advice and were generally
10062 -helpful.
10063 -
10064 -@end quotation
10065 -
10066 -
10067 -
10068 -
10069 -@chapter Programming with @code{libbzip2}
10070 -
10071 -This chapter describes the programming interface to @code{libbzip2}.
10072 -
10073 -For general background information, particularly about memory
10074 -use and performance aspects, you'd be well advised to read Chapter 2
10075 -as well.
10076 -
10077 -@section Top-level structure
10078 -
10079 -@code{libbzip2} is a flexible library for compressing and decompressing
10080 -data in the @code{bzip2} data format.  Although packaged as a single
10081 -entity, it helps to regard the library as three separate parts: the low
10082 -level interface, and the high level interface, and some utility
10083 -functions.
10084 -
10085 -The structure of @code{libbzip2}'s interfaces is similar to
10086 -that of Jean-loup Gailly's and Mark Adler's excellent @code{zlib} 
10087 -library.
10088 -
10089 -All externally visible symbols have names beginning @code{BZ2_}.
10090 -This is new in version 1.0.  The intention is to minimise pollution
10091 -of the namespaces of library clients.
10092 -
10093 -@subsection Low-level summary
10094 -
10095 -This interface provides services for compressing and decompressing
10096 -data in memory.  There's no provision for dealing with files, streams
10097 -or any other I/O mechanisms, just straight memory-to-memory work.
10098 -In fact, this part of the library can be compiled without inclusion
10099 -of @code{stdio.h}, which may be helpful for embedded applications.
10100 -
10101 -The low-level part of the library has no global variables and
10102 -is therefore thread-safe.
10103 -
10104 -Six routines make up the low level interface: 
10105 -@code{BZ2_bzCompressInit}, @code{BZ2_bzCompress}, and @* @code{BZ2_bzCompressEnd}
10106 -for compression,
10107 -and a corresponding trio @code{BZ2_bzDecompressInit}, @* @code{BZ2_bzDecompress}
10108 -and @code{BZ2_bzDecompressEnd} for decompression.  
10109 -The @code{*Init} functions allocate
10110 -memory for compression/decompression and do other
10111 -initialisations, whilst the @code{*End} functions close down operations
10112 -and release memory.
10113 -
10114 -The real work is done by @code{BZ2_bzCompress} and @code{BZ2_bzDecompress}.  
10115 -These compress and decompress data from a user-supplied input buffer
10116 -to a user-supplied output buffer.  These buffers can be any size;
10117 -arbitrary quantities of data are handled by making repeated calls
10118 -to these functions.  This is a flexible mechanism allowing a 
10119 -consumer-pull style of activity, or producer-push, or a mixture of
10120 -both.
10121 -
10122 -
10123 -
10124 -@subsection High-level summary
10125 -
10126 -This interface provides some handy wrappers around the low-level
10127 -interface to facilitate reading and writing @code{bzip2} format
10128 -files (@code{.bz2} files).  The routines provide hooks to facilitate
10129 -reading files in which the @code{bzip2} data stream is embedded 
10130 -within some larger-scale file structure, or where there are
10131 -multiple @code{bzip2} data streams concatenated end-to-end.
10132 -
10133 -For reading files, @code{BZ2_bzReadOpen}, @code{BZ2_bzRead},
10134 -@code{BZ2_bzReadClose} and @* @code{BZ2_bzReadGetUnused} are supplied.  For
10135 -writing files, @code{BZ2_bzWriteOpen}, @code{BZ2_bzWrite} and
10136 -@code{BZ2_bzWriteFinish} are available.
10137 -
10138 -As with the low-level library, no global variables are used
10139 -so the library is per se thread-safe.  However, if I/O errors
10140 -occur whilst reading or writing the underlying compressed files,
10141 -you may have to consult @code{errno} to determine the cause of
10142 -the error.  In that case, you'd need a C library which correctly
10143 -supports @code{errno} in a multithreaded environment.
10144 -
10145 -To make the library a little simpler and more portable,
10146 -@code{BZ2_bzReadOpen} and @code{BZ2_bzWriteOpen} require you to pass them file
10147 -handles (@code{FILE*}s) which have previously been opened for reading or
10148 -writing respectively.  That avoids portability problems associated with
10149 -file operations and file attributes, whilst not being much of an
10150 -imposition on the programmer.
10151 -
10152 -
10153 -
10154 -@subsection Utility functions summary
10155 -For very simple needs, @code{BZ2_bzBuffToBuffCompress} and
10156 -@code{BZ2_bzBuffToBuffDecompress} are provided.  These compress
10157 -data in memory from one buffer to another buffer in a single
10158 -function call.  You should assess whether these functions
10159 -fulfill your memory-to-memory compression/decompression
10160 -requirements before investing effort in understanding the more
10161 -general but more complex low-level interface.
10162 -
10163 -Yoshioka Tsuneo (@code{QWF00133@@niftyserve.or.jp} /
10164 -@code{tsuneo-y@@is.aist-nara.ac.jp}) has contributed some functions to
10165 -give better @code{zlib} compatibility.  These functions are
10166 -@code{BZ2_bzopen}, @code{BZ2_bzread}, @code{BZ2_bzwrite}, @code{BZ2_bzflush},
10167 -@code{BZ2_bzclose},
10168 -@code{BZ2_bzerror} and @code{BZ2_bzlibVersion}.  You may find these functions
10169 -more convenient for simple file reading and writing, than those in the
10170 -high-level interface.  These functions are not (yet) officially part of
10171 -the library, and are minimally documented here.  If they break, you
10172 -get to keep all the pieces.  I hope to document them properly when time
10173 -permits.
10174 -
10175 -Yoshioka also contributed modifications to allow the library to be
10176 -built as a Windows DLL.
10177 -
10178 -
10179 -@section Error handling
10180 -
10181 -The library is designed to recover cleanly in all situations, including
10182 -the worst-case situation of decompressing random data.  I'm not 
10183 -100% sure that it can always do this, so you might want to add
10184 -a signal handler to catch segmentation violations during decompression
10185 -if you are feeling especially paranoid.  I would be interested in
10186 -hearing more about the robustness of the library to corrupted
10187 -compressed data.
10188 -
10189 -Version 1.0 is much more robust in this respect than
10190 -0.9.0 or 0.9.5.  Investigations with Checker (a tool for 
10191 -detecting problems with memory management, similar to Purify)
10192 -indicate that, at least for the few files I tested, all single-bit
10193 -errors in the decompressed data are caught properly, with no
10194 -segmentation faults, no reads of uninitialised data and no 
10195 -out of range reads or writes.  So it's certainly much improved,
10196 -although I wouldn't claim it to be totally bombproof.
10197 -
10198 -The file @code{bzlib.h} contains all definitions needed to use
10199 -the library.  In particular, you should definitely not include
10200 -@code{bzlib_private.h}.
10201 -
10202 -In @code{bzlib.h}, the various return values are defined.  The following
10203 -list is not intended as an exhaustive description of the circumstances 
10204 -in which a given value may be returned -- those descriptions are given
10205 -later.  Rather, it is intended to convey the rough meaning of each
10206 -return value.  The first five actions are normal and not intended to 
10207 -denote an error situation.
10208 -@table @code
10209 -@item BZ_OK
10210 -The requested action was completed successfully.
10211 -@item BZ_RUN_OK
10212 -@itemx BZ_FLUSH_OK
10213 -@itemx BZ_FINISH_OK
10214 -In @code{BZ2_bzCompress}, the requested flush/finish/nothing-special action
10215 -was completed successfully.
10216 -@item BZ_STREAM_END
10217 -Compression of data was completed, or the logical stream end was
10218 -detected during decompression.
10219 -@end table
10220 -
10221 -The following return values indicate an error of some kind.
10222 -@table @code
10223 -@item BZ_CONFIG_ERROR
10224 -Indicates that the library has been improperly compiled on your
10225 -platform -- a major configuration error.  Specifically, it means
10226 -that @code{sizeof(char)}, @code{sizeof(short)} and @code{sizeof(int)}
10227 -are not 1, 2 and 4 respectively, as they should be.  Note that the 
10228 -library should still work properly on 64-bit platforms which follow
10229 -the LP64 programming model -- that is, where @code{sizeof(long)}
10230 -and @code{sizeof(void*)} are 8.  Under LP64, @code{sizeof(int)} is
10231 -still 4, so @code{libbzip2}, which doesn't use the @code{long} type,
10232 -is OK.
10233 -@item BZ_SEQUENCE_ERROR
10234 -When using the library, it is important to call the functions in the
10235 -correct sequence and with data structures (buffers etc) in the correct
10236 -states.  @code{libbzip2} checks as much as it can to ensure this is
10237 -happening, and returns @code{BZ_SEQUENCE_ERROR} if not.  Code which
10238 -complies precisely with the function semantics, as detailed below,
10239 -should never receive this value; such an event denotes buggy code
10240 -which you should investigate.
10241 -@item BZ_PARAM_ERROR
10242 -Returned when a parameter to a function call is out of range 
10243 -or otherwise manifestly incorrect.  As with @code{BZ_SEQUENCE_ERROR},
10244 -this denotes a bug in the client code.  The distinction between
10245 -@code{BZ_PARAM_ERROR} and @code{BZ_SEQUENCE_ERROR} is a bit hazy, but still worth
10246 -making.
10247 -@item BZ_MEM_ERROR
10248 -Returned when a request to allocate memory failed.  Note that the
10249 -quantity of memory needed to decompress a stream cannot be determined
10250 -until the stream's header has been read.  So @code{BZ2_bzDecompress} and
10251 -@code{BZ2_bzRead} may return @code{BZ_MEM_ERROR} even though some of
10252 -the compressed data has been read.  The same is not true for
10253 -compression; once @code{BZ2_bzCompressInit} or @code{BZ2_bzWriteOpen} have
10254 -successfully completed, @code{BZ_MEM_ERROR} cannot occur.
10255 -@item BZ_DATA_ERROR
10256 -Returned when a data integrity error is detected during decompression.
10257 -Most importantly, this means when stored and computed CRCs for the
10258 -data do not match.  This value is also returned upon detection of any
10259 -other anomaly in the compressed data.
10260 -@item BZ_DATA_ERROR_MAGIC
10261 -As a special case of @code{BZ_DATA_ERROR}, it is sometimes useful to
10262 -know when the compressed stream does not start with the correct
10263 -magic bytes (@code{'B' 'Z' 'h'}).  
10264 -@item BZ_IO_ERROR
10265 -Returned by @code{BZ2_bzRead} and @code{BZ2_bzWrite} when there is an error
10266 -reading or writing in the compressed file, and by @code{BZ2_bzReadOpen}
10267 -and @code{BZ2_bzWriteOpen} for attempts to use a file for which the
10268 -error indicator (viz, @code{ferror(f)}) is set.
10269 -On receipt of @code{BZ_IO_ERROR}, the caller should consult
10270 -@code{errno} and/or @code{perror} to acquire operating-system
10271 -specific information about the problem.
10272 -@item BZ_UNEXPECTED_EOF
10273 -Returned by @code{BZ2_bzRead} when the compressed file finishes
10274 -before the logical end of stream is detected.
10275 -@item BZ_OUTBUFF_FULL
10276 -Returned by @code{BZ2_bzBuffToBuffCompress} and
10277 -@code{BZ2_bzBuffToBuffDecompress} to indicate that the output data
10278 -will not fit into the output buffer provided.
10279 -@end table
10280 -
10281 -
10282 -
10283 -@section Low-level interface
10284 -
10285 -@subsection @code{BZ2_bzCompressInit}
10286 -@example
10287 -typedef 
10288 -   struct @{
10289 -      char *next_in;
10290 -      unsigned int avail_in;
10291 -      unsigned int total_in_lo32;
10292 -      unsigned int total_in_hi32;
10293 -
10294 -      char *next_out;
10295 -      unsigned int avail_out;
10296 -      unsigned int total_out_lo32;
10297 -      unsigned int total_out_hi32;
10298 -
10299 -      void *state;
10300 -
10301 -      void *(*bzalloc)(void *,int,int);
10302 -      void (*bzfree)(void *,void *);
10303 -      void *opaque;
10304 -   @} 
10305 -   bz_stream;
10306 -
10307 -int BZ2_bzCompressInit ( bz_stream *strm, 
10308 -                         int blockSize100k, 
10309 -                         int verbosity,
10310 -                         int workFactor );
10311 -
10312 -@end example
10313 -
10314 -Prepares for compression.  The @code{bz_stream} structure
10315 -holds all data pertaining to the compression activity.  
10316 -A @code{bz_stream} structure should be allocated and initialised
10317 -prior to the call.
10318 -The fields of @code{bz_stream}
10319 -comprise the entirety of the user-visible data.  @code{state}
10320 -is a pointer to the private data structures required for compression.
10321 -
10322 -Custom memory allocators are supported, via fields @code{bzalloc}, 
10323 -@code{bzfree},
10324 -and @code{opaque}.  The value 
10325 -@code{opaque} is passed to as the first argument to
10326 -all calls to @code{bzalloc} and @code{bzfree}, but is 
10327 -otherwise ignored by the library.
10328 -The call @code{bzalloc ( opaque, n, m )} is expected to return a 
10329 -pointer @code{p} to
10330 -@code{n * m} bytes of memory, and @code{bzfree ( opaque, p )} 
10331 -should free
10332 -that memory.
10333 -
10334 -If you don't want to use a custom memory allocator, set @code{bzalloc}, 
10335 -@code{bzfree} and
10336 -@code{opaque} to @code{NULL}, 
10337 -and the library will then use the standard @code{malloc}/@code{free}
10338 -routines.
10339 -
10340 -Before calling @code{BZ2_bzCompressInit}, fields @code{bzalloc}, 
10341 -@code{bzfree} and @code{opaque} should
10342 -be filled appropriately, as just described.  Upon return, the internal
10343 -state will have been allocated and initialised, and @code{total_in_lo32}, 
10344 -@code{total_in_hi32}, @code{total_out_lo32} and 
10345 -@code{total_out_hi32} will have been set to zero.  
10346 -These four fields are used by the library
10347 -to inform the caller of the total amount of data passed into and out of
10348 -the library, respectively.  You should not try to change them.
10349 -As of version 1.0, 64-bit counts are maintained, even on 32-bit
10350 -platforms, using the @code{_hi32} fields to store the upper 32 bits
10351 -of the count.  So, for example, the total amount of data in
10352 -is @code{(total_in_hi32 << 32) + total_in_lo32}.
10353 -
10354 -Parameter @code{blockSize100k} specifies the block size to be used for
10355 -compression.  It should be a value between 1 and 9 inclusive, and the
10356 -actual block size used is 100000 x this figure.  9 gives the best
10357 -compression but takes most memory.
10358 -
10359 -Parameter @code{verbosity} should be set to a number between 0 and 4
10360 -inclusive.  0 is silent, and greater numbers give increasingly verbose
10361 -monitoring/debugging output.  If the library has been compiled with
10362 -@code{-DBZ_NO_STDIO}, no such output will appear for any verbosity
10363 -setting.
10364 -
10365 -Parameter @code{workFactor} controls how the compression phase behaves
10366 -when presented with worst case, highly repetitive, input data.  If
10367 -compression runs into difficulties caused by repetitive data, the
10368 -library switches from the standard sorting algorithm to a fallback
10369 -algorithm.  The fallback is slower than the standard algorithm by
10370 -perhaps a factor of three, but always behaves reasonably, no matter how
10371 -bad the input.
10372 -
10373 -Lower values of @code{workFactor} reduce the amount of effort the
10374 -standard algorithm will expend before resorting to the fallback.  You
10375 -should set this parameter carefully; too low, and many inputs will be
10376 -handled by the fallback algorithm and so compress rather slowly, too
10377 -high, and your average-to-worst case compression times can become very
10378 -large.  The default value of 30 gives reasonable behaviour over a wide
10379 -range of circumstances.
10380 -
10381 -Allowable values range from 0 to 250 inclusive.  0 is a special case,
10382 -equivalent to using the default value of 30.
10383 -
10384 -Note that the compressed output generated is the same regardless of
10385 -whether or not the fallback algorithm is used.
10386 -
10387 -Be aware also that this parameter may disappear entirely in future
10388 -versions of the library.  In principle it should be possible to devise a
10389 -good way to automatically choose which algorithm to use.  Such a
10390 -mechanism would render the parameter obsolete.
10391 -
10392 -Possible return values:
10393 -@display
10394 -      @code{BZ_CONFIG_ERROR}
10395 -         if the library has been mis-compiled
10396 -      @code{BZ_PARAM_ERROR} 
10397 -         if @code{strm} is @code{NULL} 
10398 -         or @code{blockSize} < 1 or @code{blockSize} > 9
10399 -         or @code{verbosity} < 0 or @code{verbosity} > 4
10400 -         or @code{workFactor} < 0 or @code{workFactor} > 250
10401 -      @code{BZ_MEM_ERROR} 
10402 -         if not enough memory is available
10403 -      @code{BZ_OK} 
10404 -         otherwise
10405 -@end display
10406 -Allowable next actions:
10407 -@display
10408 -      @code{BZ2_bzCompress} 
10409 -         if @code{BZ_OK} is returned
10410 -      no specific action needed in case of error
10411 -@end display
10412 -
10413 -@subsection @code{BZ2_bzCompress}
10414 -@example
10415 -   int BZ2_bzCompress ( bz_stream *strm, int action );
10416 -@end example
10417 -Provides more input and/or output buffer space for the library.  The
10418 -caller maintains input and output buffers, and calls @code{BZ2_bzCompress} to
10419 -transfer data between them.
10420 -
10421 -Before each call to @code{BZ2_bzCompress}, @code{next_in} should point at
10422 -the data to be compressed, and @code{avail_in} should indicate how many
10423 -bytes the library may read.  @code{BZ2_bzCompress} updates @code{next_in},
10424 -@code{avail_in} and @code{total_in} to reflect the number of bytes it
10425 -has read.
10426 -
10427 -Similarly, @code{next_out} should point to a buffer in which the
10428 -compressed data is to be placed, with @code{avail_out} indicating how
10429 -much output space is available.  @code{BZ2_bzCompress} updates
10430 -@code{next_out}, @code{avail_out} and @code{total_out} to reflect the
10431 -number of bytes output.
10432 -
10433 -You may provide and remove as little or as much data as you like on each
10434 -call of @code{BZ2_bzCompress}.  In the limit, it is acceptable to supply and
10435 -remove data one byte at a time, although this would be terribly
10436 -inefficient.  You should always ensure that at least one byte of output
10437 -space is available at each call.
10438 -
10439 -A second purpose of @code{BZ2_bzCompress} is to request a change of mode of the
10440 -compressed stream.  
10441 -
10442 -Conceptually, a compressed stream can be in one of four states: IDLE,
10443 -RUNNING, FLUSHING and FINISHING.  Before initialisation
10444 -(@code{BZ2_bzCompressInit}) and after termination (@code{BZ2_bzCompressEnd}), a
10445 -stream is regarded as IDLE.
10446 -
10447 -Upon initialisation (@code{BZ2_bzCompressInit}), the stream is placed in the
10448 -RUNNING state.  Subsequent calls to @code{BZ2_bzCompress} should pass
10449 -@code{BZ_RUN} as the requested action; other actions are illegal and
10450 -will result in @code{BZ_SEQUENCE_ERROR}.
10451 -
10452 -At some point, the calling program will have provided all the input data
10453 -it wants to.  It will then want to finish up -- in effect, asking the
10454 -library to process any data it might have buffered internally.  In this
10455 -state, @code{BZ2_bzCompress} will no longer attempt to read data from
10456 -@code{next_in}, but it will want to write data to @code{next_out}.
10457 -Because the output buffer supplied by the user can be arbitrarily small,
10458 -the finishing-up operation cannot necessarily be done with a single call
10459 -of @code{BZ2_bzCompress}.
10460 -
10461 -Instead, the calling program passes @code{BZ_FINISH} as an action to
10462 -@code{BZ2_bzCompress}.  This changes the stream's state to FINISHING.  Any
10463 -remaining input (ie, @code{next_in[0 .. avail_in-1]}) is compressed and
10464 -transferred to the output buffer.  To do this, @code{BZ2_bzCompress} must be
10465 -called repeatedly until all the output has been consumed.  At that
10466 -point, @code{BZ2_bzCompress} returns @code{BZ_STREAM_END}, and the stream's
10467 -state is set back to IDLE.  @code{BZ2_bzCompressEnd} should then be
10468 -called.
10469 -
10470 -Just to make sure the calling program does not cheat, the library makes
10471 -a note of @code{avail_in} at the time of the first call to
10472 -@code{BZ2_bzCompress} which has @code{BZ_FINISH} as an action (ie, at the
10473 -time the program has announced its intention to not supply any more
10474 -input).  By comparing this value with that of @code{avail_in} over
10475 -subsequent calls to @code{BZ2_bzCompress}, the library can detect any
10476 -attempts to slip in more data to compress.  Any calls for which this is
10477 -detected will return @code{BZ_SEQUENCE_ERROR}.  This indicates a
10478 -programming mistake which should be corrected.
10479 -
10480 -Instead of asking to finish, the calling program may ask
10481 -@code{BZ2_bzCompress} to take all the remaining input, compress it and
10482 -terminate the current (Burrows-Wheeler) compression block.  This could
10483 -be useful for error control purposes.  The mechanism is analogous to
10484 -that for finishing: call @code{BZ2_bzCompress} with an action of
10485 -@code{BZ_FLUSH}, remove output data, and persist with the
10486 -@code{BZ_FLUSH} action until the value @code{BZ_RUN} is returned.  As
10487 -with finishing, @code{BZ2_bzCompress} detects any attempt to provide more
10488 -input data once the flush has begun.
10489 -
10490 -Once the flush is complete, the stream returns to the normal RUNNING
10491 -state.
10492 -
10493 -This all sounds pretty complex, but isn't really.  Here's a table
10494 -which shows which actions are allowable in each state, what action
10495 -will be taken, what the next state is, and what the non-error return
10496 -values are.  Note that you can't explicitly ask what state the
10497 -stream is in, but nor do you need to -- it can be inferred from the
10498 -values returned by @code{BZ2_bzCompress}.
10499 -@display
10500 -IDLE/@code{any}           
10501 -      Illegal.  IDLE state only exists after @code{BZ2_bzCompressEnd} or
10502 -      before @code{BZ2_bzCompressInit}.
10503 -      Return value = @code{BZ_SEQUENCE_ERROR}
10504 -
10505 -RUNNING/@code{BZ_RUN}     
10506 -      Compress from @code{next_in} to @code{next_out} as much as possible.
10507 -      Next state = RUNNING
10508 -      Return value = @code{BZ_RUN_OK}
10509 -
10510 -RUNNING/@code{BZ_FLUSH}   
10511 -      Remember current value of @code{next_in}.  Compress from @code{next_in}
10512 -      to @code{next_out} as much as possible, but do not accept any more input.  
10513 -      Next state = FLUSHING
10514 -      Return value = @code{BZ_FLUSH_OK}
10515 -
10516 -RUNNING/@code{BZ_FINISH}  
10517 -      Remember current value of @code{next_in}.  Compress from @code{next_in}
10518 -      to @code{next_out} as much as possible, but do not accept any more input.
10519 -      Next state = FINISHING
10520 -      Return value = @code{BZ_FINISH_OK}
10521 -
10522 -FLUSHING/@code{BZ_FLUSH}  
10523 -      Compress from @code{next_in} to @code{next_out} as much as possible, 
10524 -      but do not accept any more input.  
10525 -      If all the existing input has been used up and all compressed
10526 -      output has been removed
10527 -         Next state = RUNNING; Return value = @code{BZ_RUN_OK}
10528 -      else
10529 -         Next state = FLUSHING; Return value = @code{BZ_FLUSH_OK}
10530 -
10531 -FLUSHING/other     
10532 -      Illegal.
10533 -      Return value = @code{BZ_SEQUENCE_ERROR}
10534 -
10535 -FINISHING/@code{BZ_FINISH}  
10536 -      Compress from @code{next_in} to @code{next_out} as much as possible,
10537 -      but to not accept any more input.  
10538 -      If all the existing input has been used up and all compressed
10539 -      output has been removed
10540 -         Next state = IDLE; Return value = @code{BZ_STREAM_END}
10541 -      else
10542 -         Next state = FINISHING; Return value = @code{BZ_FINISHING}
10543 -
10544 -FINISHING/other
10545 -      Illegal.
10546 -      Return value = @code{BZ_SEQUENCE_ERROR}
10547 -@end display
10548 -
10549 -That still looks complicated?  Well, fair enough.  The usual sequence
10550 -of calls for compressing a load of data is:
10551 -@itemize @bullet
10552 -@item Get started with @code{BZ2_bzCompressInit}.
10553 -@item Shovel data in and shlurp out its compressed form using zero or more
10554 -calls of @code{BZ2_bzCompress} with action = @code{BZ_RUN}.
10555 -@item Finish up.  
10556 -Repeatedly call @code{BZ2_bzCompress} with action = @code{BZ_FINISH}, 
10557 -copying out the compressed output, until @code{BZ_STREAM_END} is returned.
10558 -@item Close up and go home.  Call @code{BZ2_bzCompressEnd}.
10559 -@end itemize
10560 -If the data you want to compress fits into your input buffer all
10561 -at once, you can skip the calls of @code{BZ2_bzCompress ( ..., BZ_RUN )} and 
10562 -just do the @code{BZ2_bzCompress ( ..., BZ_FINISH )} calls.
10563 -
10564 -All required memory is allocated by @code{BZ2_bzCompressInit}.  The
10565 -compression library can accept any data at all (obviously).  So you
10566 -shouldn't get any error return values from the @code{BZ2_bzCompress} calls.
10567 -If you do, they will be @code{BZ_SEQUENCE_ERROR}, and indicate a bug in
10568 -your programming.
10569 -
10570 -Trivial other possible return values:
10571 -@display
10572 -      @code{BZ_PARAM_ERROR}   
10573 -         if @code{strm} is @code{NULL}, or @code{strm->s} is @code{NULL}
10574 -@end display
10575 -
10576 -@subsection @code{BZ2_bzCompressEnd}
10577 -@example
10578 -int BZ2_bzCompressEnd ( bz_stream *strm );
10579 -@end example
10580 -Releases all memory associated with a compression stream.
10581 -
10582 -Possible return values:
10583 -@display
10584 -   @code{BZ_PARAM_ERROR}    if @code{strm} is @code{NULL} or @code{strm->s} is @code{NULL}
10585 -   @code{BZ_OK}    otherwise
10586 -@end display
10587 -
10588 -
10589 -@subsection @code{BZ2_bzDecompressInit}
10590 -@example
10591 -int BZ2_bzDecompressInit ( bz_stream *strm, int verbosity, int small );
10592 -@end example
10593 -Prepares for decompression.  As with @code{BZ2_bzCompressInit}, a
10594 -@code{bz_stream} record should be allocated and initialised before the
10595 -call.  Fields @code{bzalloc}, @code{bzfree} and @code{opaque} should be
10596 -set if a custom memory allocator is required, or made @code{NULL} for
10597 -the normal @code{malloc}/@code{free} routines.  Upon return, the internal
10598 -state will have been initialised, and @code{total_in} and
10599 -@code{total_out} will be zero.
10600 -
10601 -For the meaning of parameter @code{verbosity}, see @code{BZ2_bzCompressInit}.
10602 -
10603 -If @code{small} is nonzero, the library will use an alternative
10604 -decompression algorithm which uses less memory but at the cost of
10605 -decompressing more slowly (roughly speaking, half the speed, but the
10606 -maximum memory requirement drops to around 2300k).  See Chapter 2 for
10607 -more information on memory management.
10608 -
10609 -Note that the amount of memory needed to decompress
10610 -a stream cannot be determined until the stream's header has been read,
10611 -so even if @code{BZ2_bzDecompressInit} succeeds, a subsequent
10612 -@code{BZ2_bzDecompress} could fail with @code{BZ_MEM_ERROR}.
10613 -
10614 -Possible return values:
10615 -@display
10616 -      @code{BZ_CONFIG_ERROR}
10617 -         if the library has been mis-compiled
10618 -      @code{BZ_PARAM_ERROR}
10619 -         if @code{(small != 0 && small != 1)}
10620 -         or @code{(verbosity < 0 || verbosity > 4)}
10621 -      @code{BZ_MEM_ERROR}
10622 -         if insufficient memory is available
10623 -@end display
10624 -
10625 -Allowable next actions:
10626 -@display
10627 -      @code{BZ2_bzDecompress}
10628 -         if @code{BZ_OK} was returned
10629 -      no specific action required in case of error
10630 -@end display
10631 -
10632
10633 -
10634 -@subsection @code{BZ2_bzDecompress}
10635 -@example
10636 -int BZ2_bzDecompress ( bz_stream *strm );
10637 -@end example
10638 -Provides more input and/out output buffer space for the library.  The
10639 -caller maintains input and output buffers, and uses @code{BZ2_bzDecompress}
10640 -to transfer data between them.
10641 -
10642 -Before each call to @code{BZ2_bzDecompress}, @code{next_in} 
10643 -should point at the compressed data,
10644 -and @code{avail_in} should indicate how many bytes the library
10645 -may read.  @code{BZ2_bzDecompress} updates @code{next_in}, @code{avail_in} 
10646 -and @code{total_in}
10647 -to reflect the number of bytes it has read.
10648 -
10649 -Similarly, @code{next_out} should point to a buffer in which the uncompressed
10650 -output is to be placed, with @code{avail_out} indicating how much output space
10651 -is available.  @code{BZ2_bzCompress} updates @code{next_out},
10652 -@code{avail_out} and @code{total_out} to reflect
10653 -the number of bytes output.
10654 -
10655 -You may provide and remove as little or as much data as you like on
10656 -each call of @code{BZ2_bzDecompress}.  
10657 -In the limit, it is acceptable to
10658 -supply and remove data one byte at a time, although this would be
10659 -terribly inefficient.  You should always ensure that at least one
10660 -byte of output space is available at each call.
10661 -
10662 -Use of @code{BZ2_bzDecompress} is simpler than @code{BZ2_bzCompress}.
10663 -
10664 -You should provide input and remove output as described above, and
10665 -repeatedly call @code{BZ2_bzDecompress} until @code{BZ_STREAM_END} is
10666 -returned.  Appearance of @code{BZ_STREAM_END} denotes that
10667 -@code{BZ2_bzDecompress} has detected the logical end of the compressed
10668 -stream.  @code{BZ2_bzDecompress} will not produce @code{BZ_STREAM_END} until
10669 -all output data has been placed into the output buffer, so once
10670 -@code{BZ_STREAM_END} appears, you are guaranteed to have available all
10671 -the decompressed output, and @code{BZ2_bzDecompressEnd} can safely be
10672 -called.
10673 -
10674 -If case of an error return value, you should call @code{BZ2_bzDecompressEnd}
10675 -to clean up and release memory.
10676 -
10677 -Possible return values:
10678 -@display
10679 -      @code{BZ_PARAM_ERROR}
10680 -         if @code{strm} is @code{NULL} or @code{strm->s} is @code{NULL}
10681 -         or @code{strm->avail_out < 1}
10682 -      @code{BZ_DATA_ERROR}
10683 -         if a data integrity error is detected in the compressed stream
10684 -      @code{BZ_DATA_ERROR_MAGIC}
10685 -         if the compressed stream doesn't begin with the right magic bytes
10686 -      @code{BZ_MEM_ERROR}
10687 -         if there wasn't enough memory available
10688 -      @code{BZ_STREAM_END}
10689 -         if the logical end of the data stream was detected and all
10690 -         output in has been consumed, eg @code{s->avail_out > 0}
10691 -      @code{BZ_OK}
10692 -         otherwise
10693 -@end display
10694 -Allowable next actions:
10695 -@display
10696 -      @code{BZ2_bzDecompress}
10697 -         if @code{BZ_OK} was returned
10698 -      @code{BZ2_bzDecompressEnd}
10699 -         otherwise
10700 -@end display
10701 -
10702 -
10703 -@subsection @code{BZ2_bzDecompressEnd}
10704 -@example
10705 -int BZ2_bzDecompressEnd ( bz_stream *strm );
10706 -@end example
10707 -Releases all memory associated with a decompression stream.
10708 -
10709 -Possible return values:
10710 -@display
10711 -      @code{BZ_PARAM_ERROR}
10712 -         if @code{strm} is @code{NULL} or @code{strm->s} is @code{NULL}
10713 -      @code{BZ_OK}
10714 -         otherwise
10715 -@end display
10716 -
10717 -Allowable next actions:
10718 -@display
10719 -      None.
10720 -@end display
10721 -
10722 -
10723 -@section High-level interface
10724 -
10725 -This interface provides functions for reading and writing 
10726 -@code{bzip2} format files.  First, some general points.
10727 -
10728 -@itemize @bullet
10729 -@item All of the functions take an @code{int*} first argument,
10730 -  @code{bzerror}.
10731 -  After each call, @code{bzerror} should be consulted first to determine
10732 -  the outcome of the call.  If @code{bzerror} is @code{BZ_OK}, 
10733 -  the call completed
10734 -  successfully, and only then should the return value of the function
10735 -  (if any) be consulted.  If @code{bzerror} is @code{BZ_IO_ERROR}, 
10736 -  there was an error
10737 -  reading/writing the underlying compressed file, and you should
10738 -  then consult @code{errno}/@code{perror} to determine the 
10739 -  cause of the difficulty.
10740 -  @code{bzerror} may also be set to various other values; precise details are
10741 -  given on a per-function basis below.
10742 -@item If @code{bzerror} indicates an error 
10743 -  (ie, anything except @code{BZ_OK} and @code{BZ_STREAM_END}),
10744 -  you should immediately call @code{BZ2_bzReadClose} (or @code{BZ2_bzWriteClose},
10745 -  depending on whether you are attempting to read or to write)
10746 -  to free up all resources associated
10747 -  with the stream.  Once an error has been indicated, behaviour of all calls
10748 -  except @code{BZ2_bzReadClose} (@code{BZ2_bzWriteClose}) is undefined.  
10749 -  The implication is that (1) @code{bzerror} should
10750 -  be checked after each call, and (2) if @code{bzerror} indicates an error, 
10751 -  @code{BZ2_bzReadClose} (@code{BZ2_bzWriteClose}) should then be called to clean up.
10752 -@item The @code{FILE*} arguments passed to
10753 -   @code{BZ2_bzReadOpen}/@code{BZ2_bzWriteOpen}  
10754 -  should be set to binary mode.
10755 -  Most Unix systems will do this by default, but other platforms,
10756 -  including Windows and Mac, will not.  If you omit this, you may
10757 -  encounter problems when moving code to new platforms.
10758 -@item Memory allocation requests are handled by
10759 -  @code{malloc}/@code{free}.  
10760 -  At present
10761 -  there is no facility for user-defined memory allocators in the file I/O
10762 -  functions (could easily be added, though).
10763 -@end itemize
10764 -
10765 -
10766 -
10767 -@subsection @code{BZ2_bzReadOpen}
10768 -@example
10769 -   typedef void BZFILE;
10770 -
10771 -   BZFILE *BZ2_bzReadOpen ( int *bzerror, FILE *f, 
10772 -                            int small, int verbosity,
10773 -                            void *unused, int nUnused );
10774 -@end example
10775 -Prepare to read compressed data from file handle @code{f}.  @code{f}
10776 -should refer to a file which has been opened for reading, and for which
10777 -the error indicator (@code{ferror(f)})is not set.  If @code{small} is 1,
10778 -the library will try to decompress using less memory, at the expense of
10779 -speed.
10780 -
10781 -For reasons explained below, @code{BZ2_bzRead} will decompress the
10782 -@code{nUnused} bytes starting at @code{unused}, before starting to read
10783 -from the file @code{f}.  At most @code{BZ_MAX_UNUSED} bytes may be
10784 -supplied like this.  If this facility is not required, you should pass
10785 -@code{NULL} and @code{0} for @code{unused} and n@code{Unused}
10786 -respectively.
10787 -
10788 -For the meaning of parameters @code{small} and @code{verbosity},
10789 -see @code{BZ2_bzDecompressInit}.
10790 -
10791 -The amount of memory needed to decompress a file cannot be determined
10792 -until the file's header has been read.  So it is possible that
10793 -@code{BZ2_bzReadOpen} returns @code{BZ_OK} but a subsequent call of
10794 -@code{BZ2_bzRead} will return @code{BZ_MEM_ERROR}.
10795 -
10796 -Possible assignments to @code{bzerror}:
10797 -@display
10798 -      @code{BZ_CONFIG_ERROR}
10799 -         if the library has been mis-compiled
10800 -      @code{BZ_PARAM_ERROR}
10801 -         if @code{f} is @code{NULL} 
10802 -         or @code{small} is neither @code{0} nor @code{1}                 
10803 -         or @code{(unused == NULL && nUnused != 0)}
10804 -         or @code{(unused != NULL && !(0 <= nUnused <= BZ_MAX_UNUSED))}
10805 -      @code{BZ_IO_ERROR}    
10806 -         if @code{ferror(f)} is nonzero
10807 -      @code{BZ_MEM_ERROR}   
10808 -         if insufficient memory is available
10809 -      @code{BZ_OK}
10810 -         otherwise.
10811 -@end display
10812 -
10813 -Possible return values:
10814 -@display
10815 -      Pointer to an abstract @code{BZFILE}        
10816 -         if @code{bzerror} is @code{BZ_OK}   
10817 -      @code{NULL}
10818 -         otherwise
10819 -@end display
10820 -
10821 -Allowable next actions:
10822 -@display
10823 -      @code{BZ2_bzRead}
10824 -         if @code{bzerror} is @code{BZ_OK}   
10825 -      @code{BZ2_bzClose} 
10826 -         otherwise
10827 -@end display
10828 -
10829 -
10830 -@subsection @code{BZ2_bzRead}
10831 -@example
10832 -   int BZ2_bzRead ( int *bzerror, BZFILE *b, void *buf, int len );
10833 -@end example
10834 -Reads up to @code{len} (uncompressed) bytes from the compressed file 
10835 -@code{b} into
10836 -the buffer @code{buf}.  If the read was successful, 
10837 -@code{bzerror} is set to @code{BZ_OK}
10838 -and the number of bytes read is returned.  If the logical end-of-stream
10839 -was detected, @code{bzerror} will be set to @code{BZ_STREAM_END}, 
10840 -and the number
10841 -of bytes read is returned.  All other @code{bzerror} values denote an error.
10842 -
10843 -@code{BZ2_bzRead} will supply @code{len} bytes,
10844 -unless the logical stream end is detected
10845 -or an error occurs.  Because of this, it is possible to detect the 
10846 -stream end by observing when the number of bytes returned is 
10847 -less than the number
10848 -requested.  Nevertheless, this is regarded as inadvisable; you should
10849 -instead check @code{bzerror} after every call and watch out for
10850 -@code{BZ_STREAM_END}.
10851 -
10852 -Internally, @code{BZ2_bzRead} copies data from the compressed file in chunks
10853 -of size @code{BZ_MAX_UNUSED} bytes
10854 -before decompressing it.  If the file contains more bytes than strictly
10855 -needed to reach the logical end-of-stream, @code{BZ2_bzRead} will almost certainly
10856 -read some of the trailing data before signalling @code{BZ_SEQUENCE_END}.
10857 -To collect the read but unused data once @code{BZ_SEQUENCE_END} has 
10858 -appeared, call @code{BZ2_bzReadGetUnused} immediately before @code{BZ2_bzReadClose}.
10859 -
10860 -Possible assignments to @code{bzerror}:
10861 -@display
10862 -      @code{BZ_PARAM_ERROR}
10863 -         if @code{b} is @code{NULL} or @code{buf} is @code{NULL} or @code{len < 0}
10864 -      @code{BZ_SEQUENCE_ERROR} 
10865 -         if @code{b} was opened with @code{BZ2_bzWriteOpen}
10866 -      @code{BZ_IO_ERROR} 
10867 -         if there is an error reading from the compressed file
10868 -      @code{BZ_UNEXPECTED_EOF} 
10869 -         if the compressed file ended before the logical end-of-stream was detected
10870 -      @code{BZ_DATA_ERROR} 
10871 -         if a data integrity error was detected in the compressed stream
10872 -      @code{BZ_DATA_ERROR_MAGIC}
10873 -         if the stream does not begin with the requisite header bytes (ie, is not 
10874 -         a @code{bzip2} data file).  This is really a special case of @code{BZ_DATA_ERROR}.
10875 -      @code{BZ_MEM_ERROR} 
10876 -         if insufficient memory was available
10877 -      @code{BZ_STREAM_END} 
10878 -         if the logical end of stream was detected.
10879 -      @code{BZ_OK}
10880 -         otherwise.
10881 -@end display
10882 -
10883 -Possible return values:
10884 -@display
10885 -      number of bytes read
10886 -         if @code{bzerror} is @code{BZ_OK} or @code{BZ_STREAM_END}
10887 -      undefined
10888 -         otherwise
10889 -@end display
10890 -
10891 -Allowable next actions:
10892 -@display
10893 -      collect data from @code{buf}, then @code{BZ2_bzRead} or @code{BZ2_bzReadClose}
10894 -         if @code{bzerror} is @code{BZ_OK} 
10895 -      collect data from @code{buf}, then @code{BZ2_bzReadClose} or @code{BZ2_bzReadGetUnused} 
10896 -         if @code{bzerror} is @code{BZ_SEQUENCE_END}   
10897 -      @code{BZ2_bzReadClose} 
10898 -         otherwise
10899 -@end display
10900 -
10901 -
10902 -
10903 -@subsection @code{BZ2_bzReadGetUnused}
10904 -@example
10905 -   void BZ2_bzReadGetUnused ( int* bzerror, BZFILE *b, 
10906 -                              void** unused, int* nUnused );
10907 -@end example
10908 -Returns data which was read from the compressed file but was not needed
10909 -to get to the logical end-of-stream.  @code{*unused} is set to the address
10910 -of the data, and @code{*nUnused} to the number of bytes.  @code{*nUnused} will
10911 -be set to a value between @code{0} and @code{BZ_MAX_UNUSED} inclusive.
10912 -
10913 -This function may only be called once @code{BZ2_bzRead} has signalled 
10914 -@code{BZ_STREAM_END} but before @code{BZ2_bzReadClose}.
10915 -
10916 -Possible assignments to @code{bzerror}:
10917 -@display
10918 -      @code{BZ_PARAM_ERROR} 
10919 -         if @code{b} is @code{NULL} 
10920 -         or @code{unused} is @code{NULL} or @code{nUnused} is @code{NULL}
10921 -      @code{BZ_SEQUENCE_ERROR} 
10922 -         if @code{BZ_STREAM_END} has not been signalled
10923 -         or if @code{b} was opened with @code{BZ2_bzWriteOpen}
10924 -     @code{BZ_OK}
10925 -         otherwise
10926 -@end display
10927 -
10928 -Allowable next actions:
10929 -@display 
10930 -      @code{BZ2_bzReadClose}
10931 -@end display
10932 -
10933 -
10934 -@subsection @code{BZ2_bzReadClose}
10935 -@example
10936 -   void BZ2_bzReadClose ( int *bzerror, BZFILE *b );
10937 -@end example
10938 -Releases all memory pertaining to the compressed file @code{b}.  
10939 -@code{BZ2_bzReadClose} does not call @code{fclose} on the underlying file
10940 -handle, so you should do that yourself if appropriate.
10941 -@code{BZ2_bzReadClose} should be called to clean up after all error
10942 -situations.
10943 -
10944 -Possible assignments to @code{bzerror}:
10945 -@display
10946 -      @code{BZ_SEQUENCE_ERROR} 
10947 -         if @code{b} was opened with @code{BZ2_bzOpenWrite} 
10948 -      @code{BZ_OK} 
10949 -         otherwise
10950 -@end display
10951 -
10952 -Allowable next actions:
10953 -@display
10954 -      none
10955 -@end display
10956 -
10957 -
10958 -
10959 -@subsection @code{BZ2_bzWriteOpen}
10960 -@example
10961 -   BZFILE *BZ2_bzWriteOpen ( int *bzerror, FILE *f, 
10962 -                             int blockSize100k, int verbosity,
10963 -                             int workFactor );
10964 -@end example
10965 -Prepare to write compressed data to file handle @code{f}.  
10966 -@code{f} should refer to
10967 -a file which has been opened for writing, and for which the error
10968 -indicator (@code{ferror(f)})is not set.  
10969 -
10970 -For the meaning of parameters @code{blockSize100k},
10971 -@code{verbosity} and @code{workFactor}, see
10972 -@* @code{BZ2_bzCompressInit}.
10973 -
10974 -All required memory is allocated at this stage, so if the call
10975 -completes successfully, @code{BZ_MEM_ERROR} cannot be signalled by a
10976 -subsequent call to @code{BZ2_bzWrite}.
10977 -
10978 -Possible assignments to @code{bzerror}:
10979 -@display 
10980 -      @code{BZ_CONFIG_ERROR}
10981 -         if the library has been mis-compiled
10982 -      @code{BZ_PARAM_ERROR} 
10983 -         if @code{f} is @code{NULL} 
10984 -         or @code{blockSize100k < 1} or @code{blockSize100k > 9}
10985 -      @code{BZ_IO_ERROR} 
10986 -         if @code{ferror(f)} is nonzero
10987 -      @code{BZ_MEM_ERROR} 
10988 -         if insufficient memory is available
10989 -      @code{BZ_OK} 
10990 -         otherwise
10991 -@end display
10992 -
10993 -Possible return values:
10994 -@display
10995 -      Pointer to an abstract @code{BZFILE}  
10996 -         if @code{bzerror} is @code{BZ_OK}   
10997 -      @code{NULL} 
10998 -         otherwise
10999 -@end display
11000 -
11001 -Allowable next actions:
11002 -@display
11003 -      @code{BZ2_bzWrite} 
11004 -         if @code{bzerror} is @code{BZ_OK} 
11005 -         (you could go directly to @code{BZ2_bzWriteClose}, but this would be pretty pointless)
11006 -      @code{BZ2_bzWriteClose} 
11007 -         otherwise
11008 -@end display
11009 -
11010 -
11011 -
11012 -@subsection @code{BZ2_bzWrite}
11013 -@example
11014 -   void BZ2_bzWrite ( int *bzerror, BZFILE *b, void *buf, int len );
11015 -@end example
11016 -Absorbs @code{len} bytes from the buffer @code{buf}, eventually to be
11017 -compressed and written to the file.
11018 -
11019 -Possible assignments to @code{bzerror}:
11020 -@display
11021 -      @code{BZ_PARAM_ERROR} 
11022 -         if @code{b} is @code{NULL} or @code{buf} is @code{NULL} or @code{len < 0}
11023 -      @code{BZ_SEQUENCE_ERROR} 
11024 -         if b was opened with @code{BZ2_bzReadOpen}
11025 -      @code{BZ_IO_ERROR} 
11026 -         if there is an error writing the compressed file.
11027 -      @code{BZ_OK} 
11028 -         otherwise
11029 -@end display
11030 -
11031 -
11032 -
11033 -
11034 -@subsection @code{BZ2_bzWriteClose}
11035 -@example
11036 -   void BZ2_bzWriteClose ( int *bzerror, BZFILE* f,
11037 -                           int abandon,
11038 -                           unsigned int* nbytes_in,
11039 -                           unsigned int* nbytes_out );
11040 -
11041 -   void BZ2_bzWriteClose64 ( int *bzerror, BZFILE* f,
11042 -                             int abandon,
11043 -                             unsigned int* nbytes_in_lo32,
11044 -                             unsigned int* nbytes_in_hi32,
11045 -                             unsigned int* nbytes_out_lo32,
11046 -                             unsigned int* nbytes_out_hi32 );
11047 -@end example
11048 -
11049 -Compresses and flushes to the compressed file all data so far supplied
11050 -by @code{BZ2_bzWrite}.  The logical end-of-stream markers are also written, so
11051 -subsequent calls to @code{BZ2_bzWrite} are illegal.  All memory associated 
11052 -with the compressed file @code{b} is released.  
11053 -@code{fflush} is called on the
11054 -compressed file, but it is not @code{fclose}'d.
11055 -
11056 -If @code{BZ2_bzWriteClose} is called to clean up after an error, the only
11057 -action is to release the memory.  The library records the error codes
11058 -issued by previous calls, so this situation will be detected
11059 -automatically.  There is no attempt to complete the compression
11060 -operation, nor to @code{fflush} the compressed file.  You can force this
11061 -behaviour to happen even in the case of no error, by passing a nonzero
11062 -value to @code{abandon}.
11063 -
11064 -If @code{nbytes_in} is non-null, @code{*nbytes_in} will be set to be the
11065 -total volume of uncompressed data handled.  Similarly, @code{nbytes_out}
11066 -will be set to the total volume of compressed data written.  For 
11067 -compatibility with older versions of the library, @code{BZ2_bzWriteClose}
11068 -only yields the lower 32 bits of these counts.  Use
11069 -@code{BZ2_bzWriteClose64} if you want the full 64 bit counts.  These
11070 -two functions are otherwise absolutely identical.
11071 -
11072 -
11073 -Possible assignments to @code{bzerror}:
11074 -@display
11075 -      @code{BZ_SEQUENCE_ERROR} 
11076 -         if @code{b} was opened with @code{BZ2_bzReadOpen}
11077 -      @code{BZ_IO_ERROR} 
11078 -         if there is an error writing the compressed file
11079 -      @code{BZ_OK} 
11080 -         otherwise
11081 -@end display
11082 -
11083 -@subsection Handling embedded compressed data streams
11084 -
11085 -The high-level library facilitates use of
11086 -@code{bzip2} data streams which form some part of a surrounding, larger
11087 -data stream.
11088 -@itemize @bullet
11089 -@item For writing, the library takes an open file handle, writes
11090 -compressed data to it, @code{fflush}es it but does not @code{fclose} it.
11091 -The calling application can write its own data before and after the
11092 -compressed data stream, using that same file handle.
11093 -@item Reading is more complex, and the facilities are not as general
11094 -as they could be since generality is hard to reconcile with efficiency.
11095 -@code{BZ2_bzRead} reads from the compressed file in blocks of size
11096 -@code{BZ_MAX_UNUSED} bytes, and in doing so probably will overshoot
11097 -the logical end of compressed stream.
11098 -To recover this data once decompression has
11099 -ended, call @code{BZ2_bzReadGetUnused} after the last call of @code{BZ2_bzRead}
11100 -(the one returning @code{BZ_STREAM_END}) but before calling
11101 -@code{BZ2_bzReadClose}.
11102 -@end itemize
11103 -
11104 -This mechanism makes it easy to decompress multiple @code{bzip2}
11105 -streams placed end-to-end.  As the end of one stream, when @code{BZ2_bzRead}
11106 -returns @code{BZ_STREAM_END}, call @code{BZ2_bzReadGetUnused} to collect the
11107 -unused data (copy it into your own buffer somewhere).  
11108 -That data forms the start of the next compressed stream.
11109 -To start uncompressing that next stream, call @code{BZ2_bzReadOpen} again,
11110 -feeding in the unused data via the @code{unused}/@code{nUnused}
11111 -parameters.
11112 -Keep doing this until @code{BZ_STREAM_END} return coincides with the
11113 -physical end of file (@code{feof(f)}).  In this situation
11114 -@code{BZ2_bzReadGetUnused}
11115 -will of course return no data.
11116 -
11117 -This should give some feel for how the high-level interface can be used.
11118 -If you require extra flexibility, you'll have to bite the bullet and get
11119 -to grips with the low-level interface.
11120 -
11121 -@subsection Standard file-reading/writing code
11122 -Here's how you'd write data to a compressed file:
11123 -@example @code
11124 -FILE*   f;
11125 -BZFILE* b;
11126 -int     nBuf;
11127 -char    buf[ /* whatever size you like */ ];
11128 -int     bzerror;
11129 -int     nWritten;
11130 -
11131 -f = fopen ( "myfile.bz2", "w" );
11132 -if (!f) @{
11133 -   /* handle error */
11134 -@}
11135 -b = BZ2_bzWriteOpen ( &bzerror, f, 9 );
11136 -if (bzerror != BZ_OK) @{
11137 -   BZ2_bzWriteClose ( b );
11138 -   /* handle error */
11139 -@}
11140 -
11141 -while ( /* condition */ ) @{
11142 -   /* get data to write into buf, and set nBuf appropriately */
11143 -   nWritten = BZ2_bzWrite ( &bzerror, b, buf, nBuf );
11144 -   if (bzerror == BZ_IO_ERROR) @{ 
11145 -      BZ2_bzWriteClose ( &bzerror, b );
11146 -      /* handle error */
11147 -   @}
11148 -@}
11149 -
11150 -BZ2_bzWriteClose ( &bzerror, b );
11151 -if (bzerror == BZ_IO_ERROR) @{
11152 -   /* handle error */
11153 -@}
11154 -@end example
11155 -And to read from a compressed file:
11156 -@example
11157 -FILE*   f;
11158 -BZFILE* b;
11159 -int     nBuf;
11160 -char    buf[ /* whatever size you like */ ];
11161 -int     bzerror;
11162 -int     nWritten;
11163 -
11164 -f = fopen ( "myfile.bz2", "r" );
11165 -if (!f) @{
11166 -   /* handle error */
11167 -@}
11168 -b = BZ2_bzReadOpen ( &bzerror, f, 0, NULL, 0 );
11169 -if (bzerror != BZ_OK) @{
11170 -   BZ2_bzReadClose ( &bzerror, b );
11171 -   /* handle error */
11172 -@}
11173 -
11174 -bzerror = BZ_OK;
11175 -while (bzerror == BZ_OK && /* arbitrary other conditions */) @{
11176 -   nBuf = BZ2_bzRead ( &bzerror, b, buf, /* size of buf */ );
11177 -   if (bzerror == BZ_OK) @{
11178 -      /* do something with buf[0 .. nBuf-1] */
11179 -   @}
11180 -@}
11181 -if (bzerror != BZ_STREAM_END) @{
11182 -   BZ2_bzReadClose ( &bzerror, b );
11183 -   /* handle error */
11184 -@} else @{
11185 -   BZ2_bzReadClose ( &bzerror );
11186 -@}
11187 -@end example
11188 -
11189 -
11190 -
11191 -@section Utility functions
11192 -@subsection @code{BZ2_bzBuffToBuffCompress}
11193 -@example
11194 -   int BZ2_bzBuffToBuffCompress( char*         dest,
11195 -                                 unsigned int* destLen,
11196 -                                 char*         source,
11197 -                                 unsigned int  sourceLen,
11198 -                                 int           blockSize100k,
11199 -                                 int           verbosity,
11200 -                                 int           workFactor );
11201 -@end example
11202 -Attempts to compress the data in @code{source[0 .. sourceLen-1]}
11203 -into the destination buffer, @code{dest[0 .. *destLen-1]}.
11204 -If the destination buffer is big enough, @code{*destLen} is
11205 -set to the size of the compressed data, and @code{BZ_OK} is
11206 -returned.  If the compressed data won't fit, @code{*destLen}
11207 -is unchanged, and @code{BZ_OUTBUFF_FULL} is returned.
11208 -
11209 -Compression in this manner is a one-shot event, done with a single call
11210 -to this function.  The resulting compressed data is a complete
11211 -@code{bzip2} format data stream.  There is no mechanism for making
11212 -additional calls to provide extra input data.  If you want that kind of
11213 -mechanism, use the low-level interface.
11214 -
11215 -For the meaning of parameters @code{blockSize100k}, @code{verbosity}
11216 -and @code{workFactor}, @* see @code{BZ2_bzCompressInit}.
11217 -
11218 -To guarantee that the compressed data will fit in its buffer, allocate
11219 -an output buffer of size 1% larger than the uncompressed data, plus
11220 -six hundred extra bytes.
11221 -
11222 -@code{BZ2_bzBuffToBuffDecompress} will not write data at or
11223 -beyond @code{dest[*destLen]}, even in case of buffer overflow.
11224 -
11225 -Possible return values:
11226 -@display
11227 -      @code{BZ_CONFIG_ERROR}
11228 -         if the library has been mis-compiled
11229 -      @code{BZ_PARAM_ERROR} 
11230 -         if @code{dest} is @code{NULL} or @code{destLen} is @code{NULL}
11231 -         or @code{blockSize100k < 1} or @code{blockSize100k > 9}
11232 -         or @code{verbosity < 0} or @code{verbosity > 4} 
11233 -         or @code{workFactor < 0} or @code{workFactor > 250}
11234 -      @code{BZ_MEM_ERROR}
11235 -         if insufficient memory is available 
11236 -      @code{BZ_OUTBUFF_FULL}
11237 -         if the size of the compressed data exceeds @code{*destLen}
11238 -      @code{BZ_OK} 
11239 -         otherwise
11240 -@end display
11241 -
11242 -
11243 -
11244 -@subsection @code{BZ2_bzBuffToBuffDecompress}
11245 -@example
11246 -   int BZ2_bzBuffToBuffDecompress ( char*         dest,
11247 -                                    unsigned int* destLen,
11248 -                                    char*         source,
11249 -                                    unsigned int  sourceLen,
11250 -                                    int           small,
11251 -                                    int           verbosity );
11252 -@end example
11253 -Attempts to decompress the data in @code{source[0 .. sourceLen-1]}
11254 -into the destination buffer, @code{dest[0 .. *destLen-1]}.
11255 -If the destination buffer is big enough, @code{*destLen} is
11256 -set to the size of the uncompressed data, and @code{BZ_OK} is
11257 -returned.  If the compressed data won't fit, @code{*destLen}
11258 -is unchanged, and @code{BZ_OUTBUFF_FULL} is returned.
11259 -
11260 -@code{source} is assumed to hold a complete @code{bzip2} format
11261 -data stream.  @* @code{BZ2_bzBuffToBuffDecompress} tries to decompress
11262 -the entirety of the stream into the output buffer.
11263 -
11264 -For the meaning of parameters @code{small} and @code{verbosity},
11265 -see @code{BZ2_bzDecompressInit}.
11266 -
11267 -Because the compression ratio of the compressed data cannot be known in
11268 -advance, there is no easy way to guarantee that the output buffer will
11269 -be big enough.  You may of course make arrangements in your code to
11270 -record the size of the uncompressed data, but such a mechanism is beyond
11271 -the scope of this library.
11272 -
11273 -@code{BZ2_bzBuffToBuffDecompress} will not write data at or
11274 -beyond @code{dest[*destLen]}, even in case of buffer overflow.
11275 -
11276 -Possible return values:
11277 -@display
11278 -      @code{BZ_CONFIG_ERROR}
11279 -         if the library has been mis-compiled
11280 -      @code{BZ_PARAM_ERROR} 
11281 -         if @code{dest} is @code{NULL} or @code{destLen} is @code{NULL}
11282 -         or @code{small != 0 && small != 1}
11283 -         or @code{verbosity < 0} or @code{verbosity > 4} 
11284 -      @code{BZ_MEM_ERROR}
11285 -         if insufficient memory is available 
11286 -      @code{BZ_OUTBUFF_FULL}
11287 -         if the size of the compressed data exceeds @code{*destLen}
11288 -      @code{BZ_DATA_ERROR}
11289 -         if a data integrity error was detected in the compressed data
11290 -      @code{BZ_DATA_ERROR_MAGIC}
11291 -         if the compressed data doesn't begin with the right magic bytes
11292 -      @code{BZ_UNEXPECTED_EOF}
11293 -         if the compressed data ends unexpectedly
11294 -      @code{BZ_OK} 
11295 -         otherwise
11296 -@end display
11297 -
11298 -
11299 -
11300 -@section @code{zlib} compatibility functions
11301 -Yoshioka Tsuneo has contributed some functions to
11302 -give better @code{zlib} compatibility.  These functions are
11303 -@code{BZ2_bzopen}, @code{BZ2_bzread}, @code{BZ2_bzwrite}, @code{BZ2_bzflush},
11304 -@code{BZ2_bzclose},
11305 -@code{BZ2_bzerror} and @code{BZ2_bzlibVersion}.
11306 -These functions are not (yet) officially part of
11307 -the library.  If they break, you get to keep all the pieces.
11308 -Nevertheless, I think they work ok.
11309 -@example
11310 -typedef void BZFILE;
11311 -
11312 -const char * BZ2_bzlibVersion ( void );
11313 -@end example
11314 -Returns a string indicating the library version.
11315 -@example
11316 -BZFILE * BZ2_bzopen  ( const char *path, const char *mode );
11317 -BZFILE * BZ2_bzdopen ( int        fd,    const char *mode );
11318 -@end example
11319 -Opens a @code{.bz2} file for reading or writing, using either its name
11320 -or a pre-existing file descriptor. 
11321 -Analogous to @code{fopen} and @code{fdopen}.
11322 -@example         
11323 -int BZ2_bzread  ( BZFILE* b, void* buf, int len );
11324 -int BZ2_bzwrite ( BZFILE* b, void* buf, int len );
11325 -@end example
11326 -Reads/writes data from/to a previously opened @code{BZFILE}.
11327 -Analogous to @code{fread} and @code{fwrite}.
11328 -@example
11329 -int  BZ2_bzflush ( BZFILE* b );
11330 -void BZ2_bzclose ( BZFILE* b );
11331 -@end example
11332 -Flushes/closes a @code{BZFILE}.  @code{BZ2_bzflush} doesn't actually do
11333 -anything.  Analogous to @code{fflush} and @code{fclose}.
11334 -
11335 -@example 
11336 -const char * BZ2_bzerror ( BZFILE *b, int *errnum )
11337 -@end example
11338 -Returns a string describing the more recent error status of
11339 -@code{b}, and also sets @code{*errnum} to its numerical value.
11340 -
11341 -
11342 -@section Using the library in a @code{stdio}-free environment
11343 -
11344 -@subsection Getting rid of @code{stdio}
11345 -
11346 -In a deeply embedded application, you might want to use just
11347 -the memory-to-memory functions.  You can do this conveniently
11348 -by compiling the library with preprocessor symbol @code{BZ_NO_STDIO}
11349 -defined.  Doing this gives you a library containing only the following
11350 -eight functions:
11351 -
11352 -@code{BZ2_bzCompressInit}, @code{BZ2_bzCompress}, @code{BZ2_bzCompressEnd} @*
11353 -@code{BZ2_bzDecompressInit}, @code{BZ2_bzDecompress}, @code{BZ2_bzDecompressEnd} @*
11354 -@code{BZ2_bzBuffToBuffCompress}, @code{BZ2_bzBuffToBuffDecompress}
11355 -
11356 -When compiled like this, all functions will ignore @code{verbosity}
11357 -settings.
11358 -
11359 -@subsection Critical error handling
11360 -@code{libbzip2} contains a number of internal assertion checks which
11361 -should, needless to say, never be activated.  Nevertheless, if an
11362 -assertion should fail, behaviour depends on whether or not the library
11363 -was compiled with @code{BZ_NO_STDIO} set.
11364 -
11365 -For a normal compile, an assertion failure yields the message
11366 -@example
11367 -   bzip2/libbzip2: internal error number N.
11368 -   This is a bug in bzip2/libbzip2, 1.0.2, 30-Dec-2001.
11369 -   Please report it to me at: jseward@@acm.org.  If this happened
11370 -   when you were using some program which uses libbzip2 as a
11371 -   component, you should also report this bug to the author(s)
11372 -   of that program.  Please make an effort to report this bug;
11373 -   timely and accurate bug reports eventually lead to higher
11374 -   quality software.  Thanks.  Julian Seward, 30 December 2001.
11375 -@end example
11376 -where @code{N} is some error code number.  If @code{N == 1007}, it also
11377 -prints some extra text advising the reader that unreliable memory is
11378 -often associated with internal error 1007.  (This is a
11379 -frequently-observed-phenomenon with versions 1.0.0/1.0.1).
11380 -
11381 -@code{exit(3)} is then called.
11382 -
11383 -For a @code{stdio}-free library, assertion failures result
11384 -in a call to a function declared as:
11385 -@example
11386 -   extern void bz_internal_error ( int errcode );
11387 -@end example
11388 -The relevant code is passed as a parameter.  You should supply
11389 -such a function.
11390 -
11391 -In either case, once an assertion failure has occurred, any 
11392 -@code{bz_stream} records involved can be regarded as invalid.
11393 -You should not attempt to resume normal operation with them.
11394 -
11395 -You may, of course, change critical error handling to suit
11396 -your needs.  As I said above, critical errors indicate bugs
11397 -in the library and should not occur.  All "normal" error
11398 -situations are indicated via error return codes from functions,
11399 -and can be recovered from.
11400 -
11401 -
11402 -@section Making a Windows DLL
11403 -Everything related to Windows has been contributed by Yoshioka Tsuneo
11404 -@* (@code{QWF00133@@niftyserve.or.jp} /
11405 -@code{tsuneo-y@@is.aist-nara.ac.jp}), so you should send your queries to
11406 -him (but perhaps Cc: me, @code{jseward@@acm.org}).
11407 -
11408 -My vague understanding of what to do is: using Visual C++ 5.0,
11409 -open the project file @code{libbz2.dsp}, and build.  That's all.
11410 -
11411 -If you can't
11412 -open the project file for some reason, make a new one, naming these files:
11413 -@code{blocksort.c}, @code{bzlib.c}, @code{compress.c}, 
11414 -@code{crctable.c}, @code{decompress.c}, @code{huffman.c}, @*
11415 -@code{randtable.c} and @code{libbz2.def}.  You will also need
11416 -to name the header files @code{bzlib.h} and @code{bzlib_private.h}.
11417 -
11418 -If you don't use VC++, you may need to define the proprocessor symbol
11419 -@code{_WIN32}. 
11420 -
11421 -Finally, @code{dlltest.c} is a sample program using the DLL.  It has a
11422 -project file, @code{dlltest.dsp}.
11423 -
11424 -If you just want a makefile for Visual C, have a look at
11425 -@code{makefile.msc}.
11426 -
11427 -Be aware that if you compile @code{bzip2} itself on Win32, you must set
11428 -@code{BZ_UNIX} to 0 and @code{BZ_LCCWIN32} to 1, in the file
11429 -@code{bzip2.c}, before compiling.  Otherwise the resulting binary won't
11430 -work correctly.
11431 -
11432 -I haven't tried any of this stuff myself, but it all looks plausible.
11433 -
11434 -
11435 -
11436 -@chapter Miscellanea
11437 -
11438 -These are just some random thoughts of mine.  Your mileage may
11439 -vary.
11440 -
11441 -@section Limitations of the compressed file format
11442 -@code{bzip2-1.0}, @code{0.9.5} and @code{0.9.0}
11443 -use exactly the same file format as the previous
11444 -version, @code{bzip2-0.1}.  This decision was made in the interests of
11445 -stability.  Creating yet another incompatible compressed file format
11446 -would create further confusion and disruption for users.
11447 -
11448 -Nevertheless, this is not a painless decision.  Development
11449 -work since the release of @code{bzip2-0.1} in August 1997
11450 -has shown complexities in the file format which slow down
11451 -decompression and, in retrospect, are unnecessary.  These are:
11452 -@itemize @bullet
11453 -@item The run-length encoder, which is the first of the 
11454 -      compression transformations, is entirely irrelevant.
11455 -      The original purpose was to protect the sorting algorithm
11456 -      from the very worst case input: a string of repeated
11457 -      symbols.  But algorithm steps Q6a and Q6b in the original
11458 -      Burrows-Wheeler technical report (SRC-124) show how
11459 -      repeats can be handled without difficulty in block
11460 -      sorting.
11461 -@item The randomisation mechanism doesn't really need to be
11462 -      there.  Udi Manber and Gene Myers published a suffix
11463 -      array construction algorithm a few years back, which
11464 -      can be employed to sort any block, no matter how 
11465 -      repetitive, in O(N log N) time.  Subsequent work by
11466 -      Kunihiko Sadakane has produced a derivative O(N (log N)^2) 
11467 -      algorithm which usually outperforms the Manber-Myers
11468 -      algorithm.
11469 -
11470 -      I could have changed to Sadakane's algorithm, but I find
11471 -      it to be slower than @code{bzip2}'s existing algorithm for
11472 -      most inputs, and the randomisation mechanism protects
11473 -      adequately against bad cases.  I didn't think it was
11474 -      a good tradeoff to make.  Partly this is due to the fact
11475 -      that I was not flooded with email complaints about
11476 -      @code{bzip2-0.1}'s performance on repetitive data, so
11477 -      perhaps it isn't a problem for real inputs.
11478 -
11479 -      Probably the best long-term solution,
11480 -      and the one I have incorporated into 0.9.5 and above,
11481 -      is to use the existing sorting
11482 -      algorithm initially, and fall back to a O(N (log N)^2)
11483 -      algorithm if the standard algorithm gets into difficulties.
11484 -@item The compressed file format was never designed to be
11485 -      handled by a library, and I have had to jump though
11486 -      some hoops to produce an efficient implementation of
11487 -      decompression.  It's a bit hairy.  Try passing
11488 -      @code{decompress.c} through the C preprocessor 
11489 -      and you'll see what I mean.  Much of this complexity
11490 -      could have been avoided if the compressed size of
11491 -      each block of data was recorded in the data stream.
11492 -@item An Adler-32 checksum, rather than a CRC32 checksum,
11493 -      would be faster to compute.
11494 -@end itemize
11495 -It would be fair to say that the @code{bzip2} format was frozen
11496 -before I properly and fully understood the performance
11497 -consequences of doing so.
11498 -
11499 -Improvements which I was able to incorporate into
11500 -0.9.0, despite using the same file format, are:
11501 -@itemize @bullet
11502 -@item Single array implementation of the inverse BWT.  This
11503 -      significantly speeds up decompression, presumably
11504 -      because it reduces the number of cache misses.
11505 -@item Faster inverse MTF transform for large MTF values.  The
11506 -      new implementation is based on the notion of sliding blocks
11507 -      of values.
11508 -@item @code{bzip2-0.9.0} now reads and writes files with @code{fread}
11509 -      and @code{fwrite}; version 0.1 used @code{putc} and @code{getc}.
11510 -      Duh!  Well, you live and learn.
11511 -
11512 -@end itemize
11513 -Further ahead, it would be nice 
11514 -to be able to do random access into files.  This will 
11515 -require some careful design of compressed file formats.
11516 -
11517 -
11518 -
11519 -@section Portability issues
11520 -After some consideration, I have decided not to use
11521 -GNU @code{autoconf} to configure 0.9.5 or 1.0.
11522 -
11523 -@code{autoconf}, admirable and wonderful though it is, 
11524 -mainly assists with portability problems between Unix-like
11525 -platforms.  But @code{bzip2} doesn't have much in the way
11526 -of portability problems on Unix; most of the difficulties appear
11527 -when porting to the Mac, or to Microsoft's operating systems.
11528 -@code{autoconf} doesn't help in those cases, and brings in a 
11529 -whole load of new complexity.
11530 -
11531 -Most people should be able to compile the library and program
11532 -under Unix straight out-of-the-box, so to speak, especially 
11533 -if you have a version of GNU C available.
11534 -
11535 -There are a couple of @code{__inline__} directives in the code.  GNU C
11536 -(@code{gcc}) should be able to handle them.  If you're not using
11537 -GNU C, your C compiler shouldn't see them at all.
11538 -If your compiler does, for some reason, see them and doesn't
11539 -like them, just @code{#define} @code{__inline__} to be @code{/* */}.  One
11540 -easy way to do this is to compile with the flag @code{-D__inline__=}, 
11541 -which should be understood by most Unix compilers.
11542 -
11543 -If you still have difficulties, try compiling with the macro
11544 -@code{BZ_STRICT_ANSI} defined.  This should enable you to build the
11545 -library in a strictly ANSI compliant environment.  Building the program
11546 -itself like this is dangerous and not supported, since you remove
11547 -@code{bzip2}'s checks against compressing directories, symbolic links,
11548 -devices, and other not-really-a-file entities.  This could cause
11549 -filesystem corruption!
11550 -
11551 -One other thing: if you create a @code{bzip2} binary for public
11552 -distribution, please try and link it statically (@code{gcc -s}).  This
11553 -avoids all sorts of library-version issues that others may encounter
11554 -later on.
11555 -
11556 -If you build @code{bzip2} on Win32, you must set @code{BZ_UNIX} to 0 and
11557 -@code{BZ_LCCWIN32} to 1, in the file @code{bzip2.c}, before compiling.
11558 -Otherwise the resulting binary won't work correctly.
11559 -
11560 -
11561 -
11562 -@section Reporting bugs
11563 -I tried pretty hard to make sure @code{bzip2} is
11564 -bug free, both by design and by testing.  Hopefully
11565 -you'll never need to read this section for real.
11566 -
11567 -Nevertheless, if @code{bzip2} dies with a segmentation
11568 -fault, a bus error or an internal assertion failure, it
11569 -will ask you to email me a bug report.  Experience with
11570 -version 0.1 shows that almost all these problems can
11571 -be traced to either compiler bugs or hardware problems.
11572 -@itemize @bullet
11573 -@item
11574 -Recompile the program with no optimisation, and see if it
11575 -works.  And/or try a different compiler.
11576 -I heard all sorts of stories about various flavours
11577 -of GNU C (and other compilers) generating bad code for
11578 -@code{bzip2}, and I've run across two such examples myself.
11579 -
11580 -2.7.X versions of GNU C are known to generate bad code from
11581 -time to time, at high optimisation levels.  
11582 -If you get problems, try using the flags
11583 -@code{-O2} @code{-fomit-frame-pointer} @code{-fno-strength-reduce}.
11584 -You should specifically @emph{not} use @code{-funroll-loops}.
11585 -
11586 -You may notice that the Makefile runs six tests as part of
11587 -the build process.  If the program passes all of these, it's
11588 -a pretty good (but not 100%) indication that the compiler has
11589 -done its job correctly.
11590 -@item
11591 -If @code{bzip2} crashes randomly, and the crashes are not
11592 -repeatable, you may have a flaky memory subsystem.  @code{bzip2}
11593 -really hammers your memory hierarchy, and if it's a bit marginal,
11594 -you may get these problems.  Ditto if your disk or I/O subsystem
11595 -is slowly failing.  Yup, this really does happen.
11596 -
11597 -Try using a different machine of the same type, and see if
11598 -you can repeat the problem.
11599 -@item This isn't really a bug, but ... If @code{bzip2} tells
11600 -you your file is corrupted on decompression, and you
11601 -obtained the file via FTP, there is a possibility that you
11602 -forgot to tell FTP to do a binary mode transfer.  That absolutely
11603 -will cause the file to be non-decompressible.  You'll have to transfer
11604 -it again.
11605 -@end itemize
11606 -
11607 -If you've incorporated @code{libbzip2} into your own program
11608 -and are getting problems, please, please, please, check that the 
11609 -parameters you are passing in calls to the library, are
11610 -correct, and in accordance with what the documentation says
11611 -is allowable.  I have tried to make the library robust against
11612 -such problems, but I'm sure I haven't succeeded.
11613 -
11614 -Finally, if the above comments don't help, you'll have to send
11615 -me a bug report.  Now, it's just amazing how many people will 
11616 -send me a bug report saying something like
11617 -@display
11618 -   bzip2 crashed with segmentation fault on my machine
11619 -@end display
11620 -and absolutely nothing else.  Needless to say, a such a report
11621 -is @emph{totally, utterly, completely and comprehensively 100% useless; 
11622 -a waste of your time, my time, and net bandwidth}.
11623 -With no details at all, there's no way I can possibly begin
11624 -to figure out what the problem is.
11625 -
11626 -The rules of the game are: facts, facts, facts.  Don't omit
11627 -them because "oh, they won't be relevant".  At the bare 
11628 -minimum:
11629 -@display
11630 -   Machine type.  Operating system version.  
11631 -   Exact version of @code{bzip2} (do @code{bzip2 -V}).  
11632 -   Exact version of the compiler used.  
11633 -   Flags passed to the compiler.
11634 -@end display
11635 -However, the most important single thing that will help me is
11636 -the file that you were trying to compress or decompress at the
11637 -time the problem happened.  Without that, my ability to do anything
11638 -more than speculate about the cause, is limited.
11639 -
11640 -Please remember that I connect to the Internet with a modem, so
11641 -you should contact me before mailing me huge files.
11642 -
11643 -
11644 -@section Did you get the right package?
11645 -
11646 -@code{bzip2} is a resource hog.  It soaks up large amounts of CPU cycles
11647 -and memory.  Also, it gives very large latencies.  In the worst case, you
11648 -can feed many megabytes of uncompressed data into the library before
11649 -getting any compressed output, so this probably rules out applications
11650 -requiring interactive behaviour.
11651 -
11652 -These aren't faults of my implementation, I hope, but more
11653 -an intrinsic property of the Burrows-Wheeler transform (unfortunately).  
11654 -Maybe this isn't what you want.
11655 -
11656 -If you want a compressor and/or library which is faster, uses less
11657 -memory but gets pretty good compression, and has minimal latency,
11658 -consider Jean-loup
11659 -Gailly's and Mark Adler's work, @code{zlib-1.1.3} and
11660 -@code{gzip-1.2.4}.  Look for them at
11661 -
11662 -@code{http://www.zlib.org} and
11663 -@code{http://www.gzip.org} respectively.
11664 -
11665 -For something faster and lighter still, you might try Markus F X J
11666 -Oberhumer's @code{LZO} real-time compression/decompression library, at
11667 -@* @code{http://wildsau.idv.uni-linz.ac.at/mfx/lzo.html}.
11668 -
11669 -If you want to use the @code{bzip2} algorithms to compress small blocks
11670 -of data, 64k bytes or smaller, for example on an on-the-fly disk
11671 -compressor, you'd be well advised not to use this library.  Instead,
11672 -I've made a special library tuned for that kind of use.  It's part of
11673 -@code{e2compr-0.40}, an on-the-fly disk compressor for the Linux
11674 -@code{ext2} filesystem.  Look at
11675 -@code{http://www.netspace.net.au/~reiter/e2compr}.
11676 -
11677 -
11678 -
11679 -@section Testing
11680 -
11681 -A record of the tests I've done.
11682 -
11683 -First, some data sets:
11684 -@itemize @bullet
11685 -@item B: a directory containing 6001 files, one for every length in the
11686 -      range 0 to 6000 bytes.  The files contain random lowercase
11687 -      letters.  18.7 megabytes.
11688 -@item H: my home directory tree.  Documents, source code, mail files,
11689 -      compressed data.  H contains B, and also a directory of 
11690 -      files designed as boundary cases for the sorting; mostly very
11691 -      repetitive, nasty files.  565 megabytes.
11692 -@item A: directory tree holding various applications built from source:
11693 -      @code{egcs}, @code{gcc-2.8.1}, KDE, GTK, Octave, etc.
11694 -      2200 megabytes.
11695 -@end itemize
11696 -The tests conducted are as follows.  Each test means compressing 
11697 -(a copy of) each file in the data set, decompressing it and
11698 -comparing it against the original.
11699 -
11700 -First, a bunch of tests with block sizes and internal buffer
11701 -sizes set very small, 
11702 -to detect any problems with the
11703 -blocking and buffering mechanisms.  
11704 -This required modifying the source code so as to try to 
11705 -break it.
11706 -@enumerate
11707 -@item Data set H, with
11708 -      buffer size of 1 byte, and block size of 23 bytes.
11709 -@item Data set B, buffer sizes 1 byte, block size 1 byte.
11710 -@item As (2) but small-mode decompression.
11711 -@item As (2) with block size 2 bytes.
11712 -@item As (2) with block size 3 bytes.
11713 -@item As (2) with block size 4 bytes.
11714 -@item As (2) with block size 5 bytes.
11715 -@item As (2) with block size 6 bytes and small-mode decompression.
11716 -@item H with buffer size of 1 byte, but normal block
11717 -      size (up to 900000 bytes).
11718 -@end enumerate
11719 -Then some tests with unmodified source code.
11720 -@enumerate
11721 -@item H, all settings normal.
11722 -@item As (1), with small-mode decompress.
11723 -@item H, compress with flag @code{-1}.
11724 -@item H, compress with flag @code{-s}, decompress with flag @code{-s}.
11725 -@item Forwards compatibility: H, @code{bzip2-0.1pl2} compressing,
11726 -      @code{bzip2-0.9.5} decompressing, all settings normal.
11727 -@item Backwards compatibility:  H, @code{bzip2-0.9.5} compressing,
11728 -      @code{bzip2-0.1pl2} decompressing, all settings normal.
11729 -@item Bigger tests: A, all settings normal.
11730 -@item As (7), using the fallback (Sadakane-like) sorting algorithm.
11731 -@item As (8), compress with flag @code{-1}, decompress with flag
11732 -      @code{-s}.
11733 -@item H, using the fallback sorting algorithm.
11734 -@item Forwards compatibility: A, @code{bzip2-0.1pl2} compressing,
11735 -      @code{bzip2-0.9.5} decompressing, all settings normal.
11736 -@item Backwards compatibility:  A, @code{bzip2-0.9.5} compressing,
11737 -      @code{bzip2-0.1pl2} decompressing, all settings normal.
11738 -@item Misc test: about 400 megabytes of @code{.tar} files with
11739 -      @code{bzip2} compiled with Checker (a memory access error
11740 -       detector, like Purify).
11741 -@item Misc tests to make sure it builds and runs ok on non-Linux/x86
11742 -      platforms.
11743 -@end enumerate
11744 -These tests were conducted on a 225 MHz IDT WinChip machine, running
11745 -Linux 2.0.36.  They represent nearly a week of continuous computation.
11746 -All tests completed successfully.
11747 -
11748 -
11749 -@section Further reading
11750 -@code{bzip2} is not research work, in the sense that it doesn't present
11751 -any new ideas.  Rather, it's an engineering exercise based on existing
11752 -ideas.
11753 -
11754 -Four documents describe essentially all the ideas behind @code{bzip2}:
11755 -@example
11756 -Michael Burrows and D. J. Wheeler:
11757 -  "A block-sorting lossless data compression algorithm"
11758 -   10th May 1994. 
11759 -   Digital SRC Research Report 124.
11760 -   ftp://ftp.digital.com/pub/DEC/SRC/research-reports/SRC-124.ps.gz
11761 -   If you have trouble finding it, try searching at the
11762 -   New Zealand Digital Library, http://www.nzdl.org.
11763 -
11764 -Daniel S. Hirschberg and Debra A. LeLewer
11765 -  "Efficient Decoding of Prefix Codes"
11766 -   Communications of the ACM, April 1990, Vol 33, Number 4.
11767 -   You might be able to get an electronic copy of this
11768 -      from the ACM Digital Library.
11769 -
11770 -David J. Wheeler
11771 -   Program bred3.c and accompanying document bred3.ps.
11772 -   This contains the idea behind the multi-table Huffman
11773 -   coding scheme.
11774 -   ftp://ftp.cl.cam.ac.uk/users/djw3/
11775 -
11776 -Jon L. Bentley and Robert Sedgewick
11777 -  "Fast Algorithms for Sorting and Searching Strings"
11778 -   Available from Sedgewick's web page,
11779 -   www.cs.princeton.edu/~rs
11780 -@end example
11781 -The following paper gives valuable additional insights into the
11782 -algorithm, but is not immediately the basis of any code
11783 -used in bzip2.
11784 -@example
11785 -Peter Fenwick:
11786 -   Block Sorting Text Compression
11787 -   Proceedings of the 19th Australasian Computer Science Conference,
11788 -     Melbourne, Australia.  Jan 31 - Feb 2, 1996.
11789 -   ftp://ftp.cs.auckland.ac.nz/pub/peter-f/ACSC96paper.ps
11790 -@end example
11791 -Kunihiko Sadakane's sorting algorithm, mentioned above,
11792 -is available from:
11793 -@example
11794 -http://naomi.is.s.u-tokyo.ac.jp/~sada/papers/Sada98b.ps.gz
11795 -@end example
11796 -The Manber-Myers suffix array construction
11797 -algorithm is described in a paper
11798 -available from:
11799 -@example
11800 -http://www.cs.arizona.edu/people/gene/PAPERS/suffix.ps
11801 -@end example
11802 -Finally, the following paper documents some recent investigations
11803 -I made into the performance of sorting algorithms:
11804 -@example
11805 -Julian Seward:
11806 -   On the Performance of BWT Sorting Algorithms
11807 -   Proceedings of the IEEE Data Compression Conference 2000
11808 -     Snowbird, Utah.  28-30 March 2000.
11809 -@end example
11810 -
11811 -
11812 -@contents
11813 -
11814 -@bye
11815 -
11816 diff -Nru bzip2-1.0.2/manual_1.html bzip2-1.0.2.new/manual_1.html
11817 --- bzip2-1.0.2/manual_1.html   Sat Jan  5 01:53:05 2002
11818 +++ bzip2-1.0.2.new/manual_1.html       Thu Jan  1 01:00:00 1970
11819 @@ -1,81 +0,0 @@
11820 -<HTML>
11821 -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
11822 -<!-- Created on January, 5  2002 by texi2html 1.64 -->
11823 -<!-- 
11824 -Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
11825 -            Karl Berry  <karl@freefriends.org>
11826 -            Olaf Bachmann <obachman@mathematik.uni-kl.de>
11827 -            and many others.
11828 -Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
11829 -Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
11830
11831 --->
11832 -<HEAD>
11833 -<TITLE>Untitled Document: 1. Introduction</TITLE>
11834 -
11835 -<META NAME="description" CONTENT="Untitled Document: 1. Introduction">
11836 -<META NAME="keywords" CONTENT="Untitled Document: 1. Introduction">
11837 -<META NAME="resource-type" CONTENT="document">
11838 -<META NAME="distribution" CONTENT="global">
11839 -<META NAME="Generator" CONTENT="texi2html 1.64">
11840 -
11841 -</HEAD>
11842 -
11843 -<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
11844 -
11845 -<A NAME="SEC1"></A>
11846 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
11847 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> &lt; </A>]</TD>
11848 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC2"> &gt; </A>]</TD>
11849 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
11850 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
11851 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
11852 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
11853 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
11854 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
11855 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
11856 -</TR></TABLE>
11857 -<H1> 1. Introduction </H1>
11858 -<!--docid::SEC1::-->
11859 -<P>
11860 -
11861 -<CODE>bzip2</CODE>  compresses  files  using the Burrows-Wheeler 
11862 -block-sorting text compression algorithm,  and  Huffman  coding.
11863 -Compression  is  generally  considerably  better than that
11864 -achieved by more conventional LZ77/LZ78-based compressors,
11865 -and  approaches  the performance of the PPM family of statistical compressors.
11866 -</P><P>
11867 -
11868 -<CODE>bzip2</CODE> is built on top of <CODE>libbzip2</CODE>, a flexible library
11869 -for handling compressed data in the <CODE>bzip2</CODE> format.  This manual
11870 -describes both how to use the program and 
11871 -how to work with the library interface.  Most of the
11872 -manual is devoted to this library, not the program, 
11873 -which is good news if your interest is only in the program.
11874 -</P><P>
11875 -
11876 -Chapter 2 describes how to use <CODE>bzip2</CODE>; this is the only part 
11877 -you need to read if you just want to know how to operate the program.
11878 -Chapter 3 describes the programming interfaces in detail, and
11879 -Chapter 4 records some miscellaneous notes which I thought
11880 -ought to be recorded somewhere.
11881 -</P><P>
11882 -
11883 -<HR SIZE="6">
11884 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
11885 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
11886 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
11887 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
11888 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
11889 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
11890 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
11891 -</TR></TABLE>
11892 -<BR>  
11893 -<FONT SIZE="-1">
11894 -This document was generated
11895 -by <I>Julian Seward</I> on <I>January, 5  2002</I>
11896 -using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
11897 -"><I>texi2html</I></A>
11898 -
11899 -</BODY>
11900 -</HTML>
11901 diff -Nru bzip2-1.0.2/manual_2.html bzip2-1.0.2.new/manual_2.html
11902 --- bzip2-1.0.2/manual_2.html   Sat Jan  5 01:53:05 2002
11903 +++ bzip2-1.0.2.new/manual_2.html       Thu Jan  1 01:00:00 1970
11904 @@ -1,579 +0,0 @@
11905 -<HTML>
11906 -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
11907 -<!-- Created on January, 5  2002 by texi2html 1.64 -->
11908 -<!-- 
11909 -Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
11910 -            Karl Berry  <karl@freefriends.org>
11911 -            Olaf Bachmann <obachman@mathematik.uni-kl.de>
11912 -            and many others.
11913 -Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
11914 -Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
11915
11916 --->
11917 -<HEAD>
11918 -<TITLE>Untitled Document: 2. How to use <CODE>bzip2</CODE></TITLE>
11919 -
11920 -<META NAME="description" CONTENT="Untitled Document: 2. How to use <CODE>bzip2</CODE>">
11921 -<META NAME="keywords" CONTENT="Untitled Document: 2. How to use <CODE>bzip2</CODE>">
11922 -<META NAME="resource-type" CONTENT="document">
11923 -<META NAME="distribution" CONTENT="global">
11924 -<META NAME="Generator" CONTENT="texi2html 1.64">
11925 -
11926 -</HEAD>
11927 -
11928 -<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
11929 -
11930 -<A NAME="SEC2"></A>
11931 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
11932 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_1.html#SEC1"> &lt; </A>]</TD>
11933 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC3"> &gt; </A>]</TD>
11934 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
11935 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
11936 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
11937 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
11938 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
11939 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
11940 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
11941 -</TR></TABLE>
11942 -<H1> 2. How to use <CODE>bzip2</CODE> </H1>
11943 -<!--docid::SEC2::-->
11944 -<P>
11945 -
11946 -This chapter contains a copy of the <CODE>bzip2</CODE> man page,
11947 -and nothing else.
11948 -</P><P>
11949 -
11950 -<BLOCKQUOTE>
11951 -<P>
11952 -
11953 -<HR SIZE="6">
11954 -<A NAME="SEC3"></A>
11955 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
11956 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC2"> &lt; </A>]</TD>
11957 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC4"> &gt; </A>]</TD>
11958 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
11959 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
11960 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
11961 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
11962 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
11963 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
11964 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
11965 -</TR></TABLE>
11966 -<H4> NAME </H4>
11967 -<!--docid::SEC3::-->
11968 -<UL>
11969 -<LI><CODE>bzip2</CODE>, <CODE>bunzip2</CODE>
11970 -- a block-sorting file compressor, v1.0.2
11971 -<LI><CODE>bzcat</CODE>
11972 -- decompresses files to stdout
11973 -<LI><CODE>bzip2recover</CODE>
11974 -- recovers data from damaged bzip2 files
11975 -</UL>
11976 -<P>
11977 -
11978 -<HR SIZE="6">
11979 -<A NAME="SEC4"></A>
11980 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
11981 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC3"> &lt; </A>]</TD>
11982 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC5"> &gt; </A>]</TD>
11983 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
11984 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
11985 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
11986 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
11987 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
11988 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
11989 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
11990 -</TR></TABLE>
11991 -<H4> SYNOPSIS </H4>
11992 -<!--docid::SEC4::-->
11993 -<UL>
11994 -<LI><CODE>bzip2</CODE> [ -cdfkqstvzVL123456789 ] [ filenames ...  ]
11995 -<LI><CODE>bunzip2</CODE> [ -fkvsVL ] [ filenames ...  ]
11996 -<LI><CODE>bzcat</CODE> [ -s ] [ filenames ...  ]
11997 -<LI><CODE>bzip2recover</CODE> filename
11998 -</UL>
11999 -<P>
12000 -
12001 -<HR SIZE="6">
12002 -<A NAME="SEC5"></A>
12003 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
12004 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC4"> &lt; </A>]</TD>
12005 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC6"> &gt; </A>]</TD>
12006 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
12007 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
12008 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
12009 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
12010 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
12011 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
12012 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
12013 -</TR></TABLE>
12014 -<H4> DESCRIPTION </H4>
12015 -<!--docid::SEC5::-->
12016 -<P>
12017 -
12018 -<CODE>bzip2</CODE> compresses files using the Burrows-Wheeler block sorting
12019 -text compression algorithm, and Huffman coding.  Compression is
12020 -generally considerably better than that achieved by more conventional
12021 -LZ77/LZ78-based compressors, and approaches the performance of the PPM
12022 -family of statistical compressors.
12023 -</P><P>
12024 -
12025 -The command-line options are deliberately very similar to those of GNU
12026 -<CODE>gzip</CODE>, but they are not identical.
12027 -</P><P>
12028 -
12029 -<CODE>bzip2</CODE> expects a list of file names to accompany the command-line
12030 -flags.  Each file is replaced by a compressed version of itself, with
12031 -the name <CODE>original_name.bz2</CODE>.  Each compressed file has the same
12032 -modification date, permissions, and, when possible, ownership as the
12033 -corresponding original, so that these properties can be correctly
12034 -restored at decompression time.  File name handling is naive in the
12035 -sense that there is no mechanism for preserving original file names,
12036 -permissions, ownerships or dates in filesystems which lack these
12037 -concepts, or have serious file name length restrictions, such as MS-DOS.
12038 -</P><P>
12039 -
12040 -<CODE>bzip2</CODE> and <CODE>bunzip2</CODE> will by default not overwrite existing
12041 -files.  If you want this to happen, specify the <CODE>-f</CODE> flag.
12042 -</P><P>
12043 -
12044 -If no file names are specified, <CODE>bzip2</CODE> compresses from standard
12045 -input to standard output.  In this case, <CODE>bzip2</CODE> will decline to
12046 -write compressed output to a terminal, as this would be entirely
12047 -incomprehensible and therefore pointless.
12048 -</P><P>
12049 -
12050 -<CODE>bunzip2</CODE> (or <CODE>bzip2 -d</CODE>) decompresses all
12051 -specified files.  Files which were not created by <CODE>bzip2</CODE>
12052 -will be detected and ignored, and a warning issued.  
12053 -<CODE>bzip2</CODE> attempts to guess the filename for the decompressed file 
12054 -from that of the compressed file as follows:
12055 -<UL>
12056 -<LI><CODE>filename.bz2 </CODE> becomes <CODE>filename</CODE>
12057 -<LI><CODE>filename.bz  </CODE> becomes <CODE>filename</CODE>
12058 -<LI><CODE>filename.tbz2</CODE> becomes <CODE>filename.tar</CODE>
12059 -<LI><CODE>filename.tbz </CODE> becomes <CODE>filename.tar</CODE>
12060 -<LI><CODE>anyothername </CODE> becomes <CODE>anyothername.out</CODE>
12061 -</UL>
12062 -If the file does not end in one of the recognised endings, 
12063 -<CODE>.bz2</CODE>, <CODE>.bz</CODE>, 
12064 -<CODE>.tbz2</CODE> or <CODE>.tbz</CODE>, <CODE>bzip2</CODE> complains that it cannot
12065 -guess the name of the original file, and uses the original name
12066 -with <CODE>.out</CODE> appended.
12067 -<P>
12068 -
12069 -As with compression, supplying no
12070 -filenames causes decompression from standard input to standard output.
12071 -</P><P>
12072 -
12073 -<CODE>bunzip2</CODE> will correctly decompress a file which is the
12074 -concatenation of two or more compressed files.  The result is the
12075 -concatenation of the corresponding uncompressed files.  Integrity
12076 -testing (<CODE>-t</CODE>) of concatenated compressed files is also supported.
12077 -</P><P>
12078 -
12079 -You can also compress or decompress files to the standard output by
12080 -giving the <CODE>-c</CODE> flag.  Multiple files may be compressed and
12081 -decompressed like this.  The resulting outputs are fed sequentially to
12082 -stdout.  Compression of multiple files in this manner generates a stream
12083 -containing multiple compressed file representations.  Such a stream
12084 -can be decompressed correctly only by <CODE>bzip2</CODE> version 0.9.0 or
12085 -later.  Earlier versions of <CODE>bzip2</CODE> will stop after decompressing
12086 -the first file in the stream.
12087 -</P><P>
12088 -
12089 -<CODE>bzcat</CODE> (or <CODE>bzip2 -dc</CODE>) decompresses all specified files to
12090 -the standard output.
12091 -</P><P>
12092 -
12093 -<CODE>bzip2</CODE> will read arguments from the environment variables
12094 -<CODE>BZIP2</CODE> and <CODE>BZIP</CODE>, in that order, and will process them
12095 -before any arguments read from the command line.  This gives a 
12096 -convenient way to supply default arguments.
12097 -</P><P>
12098 -
12099 -Compression is always performed, even if the compressed file is slightly
12100 -larger than the original.  Files of less than about one hundred bytes
12101 -tend to get larger, since the compression mechanism has a constant
12102 -overhead in the region of 50 bytes.  Random data (including the output
12103 -of most file compressors) is coded at about 8.05 bits per byte, giving
12104 -an expansion of around 0.5%.
12105 -</P><P>
12106 -
12107 -As a self-check for your protection, <CODE>bzip2</CODE> uses 32-bit CRCs to
12108 -make sure that the decompressed version of a file is identical to the
12109 -original.  This guards against corruption of the compressed data, and
12110 -against undetected bugs in <CODE>bzip2</CODE> (hopefully very unlikely).  The
12111 -chances of data corruption going undetected is microscopic, about one
12112 -chance in four billion for each file processed.  Be aware, though, that
12113 -the check occurs upon decompression, so it can only tell you that
12114 -something is wrong.  It can't help you recover the original uncompressed
12115 -data.  You can use <CODE>bzip2recover</CODE> to try to recover data from
12116 -damaged files.
12117 -</P><P>
12118 -
12119 -Return values: 0 for a normal exit, 1 for environmental problems (file
12120 -not found, invalid flags, I/O errors, &#38;c), 2 to indicate a corrupt
12121 -compressed file, 3 for an internal consistency error (eg, bug) which
12122 -caused <CODE>bzip2</CODE> to panic.
12123 -</P><P>
12124 -
12125 -<HR SIZE="6">
12126 -<A NAME="SEC6"></A>
12127 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
12128 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC5"> &lt; </A>]</TD>
12129 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC7"> &gt; </A>]</TD>
12130 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
12131 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
12132 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
12133 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
12134 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
12135 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
12136 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
12137 -</TR></TABLE>
12138 -<H4> OPTIONS </H4>
12139 -<!--docid::SEC6::-->
12140 -<DL COMPACT>
12141 -<DT><CODE>-c  --stdout</CODE>
12142 -<DD>Compress or decompress to standard output.
12143 -<DT><CODE>-d  --decompress</CODE>
12144 -<DD>Force decompression.  <CODE>bzip2</CODE>, <CODE>bunzip2</CODE> and <CODE>bzcat</CODE> are
12145 -really the same program, and the decision about what actions to take is
12146 -done on the basis of which name is used.  This flag overrides that
12147 -mechanism, and forces bzip2 to decompress.
12148 -<DT><CODE>-z --compress</CODE>
12149 -<DD>The complement to <CODE>-d</CODE>: forces compression, regardless of the
12150 -invokation name.
12151 -<DT><CODE>-t --test</CODE>
12152 -<DD>Check integrity of the specified file(s), but don't decompress them.
12153 -This really performs a trial decompression and throws away the result.
12154 -<DT><CODE>-f --force</CODE>
12155 -<DD>Force overwrite of output files.  Normally, <CODE>bzip2</CODE> will not overwrite
12156 -existing output files.  Also forces <CODE>bzip2</CODE> to break hard links
12157 -to files, which it otherwise wouldn't do.
12158 -<P>
12159 -
12160 -<CODE>bzip2</CODE> normally declines to decompress files which don't have the
12161 -correct magic header bytes.  If forced (<CODE>-f</CODE>), however, it will
12162 -pass such files through unmodified.  This is how GNU <CODE>gzip</CODE>
12163 -behaves.
12164 -<DT><CODE>-k --keep</CODE>
12165 -<DD>Keep (don't delete) input files during compression
12166 -or decompression.
12167 -<DT><CODE>-s --small</CODE>
12168 -<DD>Reduce memory usage, for compression, decompression and testing.  Files
12169 -are decompressed and tested using a modified algorithm which only
12170 -requires 2.5 bytes per block byte.  This means any file can be
12171 -decompressed in 2300k of memory, albeit at about half the normal speed.
12172 -<P>
12173 -
12174 -During compression, <CODE>-s</CODE> selects a block size of 200k, which limits
12175 -memory use to around the same figure, at the expense of your compression
12176 -ratio.  In short, if your machine is low on memory (8 megabytes or
12177 -less), use -s for everything.  See MEMORY MANAGEMENT below.
12178 -<DT><CODE>-q --quiet</CODE>
12179 -<DD>Suppress non-essential warning messages.  Messages pertaining to
12180 -I/O errors and other critical events will not be suppressed.
12181 -<DT><CODE>-v --verbose</CODE>
12182 -<DD>Verbose mode -- show the compression ratio for each file processed.
12183 -Further <CODE>-v</CODE>'s increase the verbosity level, spewing out lots of
12184 -information which is primarily of interest for diagnostic purposes.
12185 -<DT><CODE>-L --license -V --version</CODE>
12186 -<DD>Display the software version, license terms and conditions.
12187 -<DT><CODE>-1 (or --fast) to -9 (or --best)</CODE>
12188 -<DD>Set the block size to 100 k, 200 k ..  900 k when compressing.  Has no
12189 -effect when decompressing.  See MEMORY MANAGEMENT below.
12190 -The <CODE>--fast</CODE> and <CODE>--best</CODE> aliases are primarily for GNU
12191 -<CODE>gzip</CODE> compatibility.  In particular, <CODE>--fast</CODE> doesn't make
12192 -things significantly faster.  And <CODE>--best</CODE> merely selects the
12193 -default behaviour.
12194 -<DT><CODE>--</CODE>
12195 -<DD>Treats all subsequent arguments as file names, even if they start
12196 -with a dash.  This is so you can handle files with names beginning
12197 -with a dash, for example: <CODE>bzip2 -- -myfilename</CODE>.
12198 -<DT><CODE>--repetitive-fast</CODE>
12199 -<DD><DT><CODE>--repetitive-best</CODE>
12200 -<DD>These flags are redundant in versions 0.9.5 and above.  They provided
12201 -some coarse control over the behaviour of the sorting algorithm in
12202 -earlier versions, which was sometimes useful.  0.9.5 and above have an
12203 -improved algorithm which renders these flags irrelevant.
12204 -</DL>
12205 -<P>
12206 -
12207 -<HR SIZE="6">
12208 -<A NAME="SEC7"></A>
12209 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
12210 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC6"> &lt; </A>]</TD>
12211 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC8"> &gt; </A>]</TD>
12212 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
12213 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
12214 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
12215 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
12216 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
12217 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
12218 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
12219 -</TR></TABLE>
12220 -<H4> MEMORY MANAGEMENT </H4>
12221 -<!--docid::SEC7::-->
12222 -<P>
12223 -
12224 -<CODE>bzip2</CODE> compresses large files in blocks.  The block size affects
12225 -both the compression ratio achieved, and the amount of memory needed for
12226 -compression and decompression.  The flags <CODE>-1</CODE> through <CODE>-9</CODE>
12227 -specify the block size to be 100,000 bytes through 900,000 bytes (the
12228 -default) respectively.  At decompression time, the block size used for
12229 -compression is read from the header of the compressed file, and
12230 -<CODE>bunzip2</CODE> then allocates itself just enough memory to decompress
12231 -the file.  Since block sizes are stored in compressed files, it follows
12232 -that the flags <CODE>-1</CODE> to <CODE>-9</CODE> are irrelevant to and so ignored
12233 -during decompression.
12234 -</P><P>
12235 -
12236 -Compression and decompression requirements, in bytes, can be estimated
12237 -as:
12238 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>     Compression:   400k + ( 8 x block size )
12239 -
12240 -     Decompression: 100k + ( 4 x block size ), or
12241 -                    100k + ( 2.5 x block size )
12242 -</pre></td></tr></table>Larger block sizes give rapidly diminishing marginal returns.  Most of
12243 -the compression comes from the first two or three hundred k of block
12244 -size, a fact worth bearing in mind when using <CODE>bzip2</CODE> on small machines.
12245 -It is also important to appreciate that the decompression memory
12246 -requirement is set at compression time by the choice of block size.
12247 -</P><P>
12248 -
12249 -For files compressed with the default 900k block size, <CODE>bunzip2</CODE>
12250 -will require about 3700 kbytes to decompress.  To support decompression
12251 -of any file on a 4 megabyte machine, <CODE>bunzip2</CODE> has an option to
12252 -decompress using approximately half this amount of memory, about 2300
12253 -kbytes.  Decompression speed is also halved, so you should use this
12254 -option only where necessary.  The relevant flag is <CODE>-s</CODE>.
12255 -</P><P>
12256 -
12257 -In general, try and use the largest block size memory constraints allow,
12258 -since that maximises the compression achieved.  Compression and
12259 -decompression speed are virtually unaffected by block size.
12260 -</P><P>
12261 -
12262 -Another significant point applies to files which fit in a single block
12263 --- that means most files you'd encounter using a large block size.  The
12264 -amount of real memory touched is proportional to the size of the file,
12265 -since the file is smaller than a block.  For example, compressing a file
12266 -20,000 bytes long with the flag <CODE>-9</CODE> will cause the compressor to
12267 -allocate around 7600k of memory, but only touch 400k + 20000 * 8 = 560
12268 -kbytes of it.  Similarly, the decompressor will allocate 3700k but only
12269 -touch 100k + 20000 * 4 = 180 kbytes.
12270 -</P><P>
12271 -
12272 -Here is a table which summarises the maximum memory usage for different
12273 -block sizes.  Also recorded is the total compressed size for 14 files of
12274 -the Calgary Text Compression Corpus totalling 3,141,622 bytes.  This
12275 -column gives some feel for how compression varies with block size.
12276 -These figures tend to understate the advantage of larger block sizes for
12277 -larger files, since the Corpus is dominated by smaller files.
12278 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>          Compress   Decompress   Decompress   Corpus
12279 -   Flag     usage      usage       -s usage     Size
12280 -
12281 -    -1      1200k       500k         350k      914704
12282 -    -2      2000k       900k         600k      877703
12283 -    -3      2800k      1300k         850k      860338
12284 -    -4      3600k      1700k        1100k      846899
12285 -    -5      4400k      2100k        1350k      845160
12286 -    -6      5200k      2500k        1600k      838626
12287 -    -7      6100k      2900k        1850k      834096
12288 -    -8      6800k      3300k        2100k      828642
12289 -    -9      7600k      3700k        2350k      828642
12290 -</pre></td></tr></table></P><P>
12291 -
12292 -<HR SIZE="6">
12293 -<A NAME="SEC8"></A>
12294 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
12295 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC7"> &lt; </A>]</TD>
12296 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC9"> &gt; </A>]</TD>
12297 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
12298 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
12299 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
12300 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
12301 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
12302 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
12303 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
12304 -</TR></TABLE>
12305 -<H4> RECOVERING DATA FROM DAMAGED FILES </H4>
12306 -<!--docid::SEC8::-->
12307 -<P>
12308 -
12309 -<CODE>bzip2</CODE> compresses files in blocks, usually 900kbytes long.  Each
12310 -block is handled independently.  If a media or transmission error causes
12311 -a multi-block <CODE>.bz2</CODE> file to become damaged, it may be possible to
12312 -recover data from the undamaged blocks in the file.
12313 -</P><P>
12314 -
12315 -The compressed representation of each block is delimited by a 48-bit
12316 -pattern, which makes it possible to find the block boundaries with
12317 -reasonable certainty.  Each block also carries its own 32-bit CRC, so
12318 -damaged blocks can be distinguished from undamaged ones.
12319 -</P><P>
12320 -
12321 -<CODE>bzip2recover</CODE> is a simple program whose purpose is to search for
12322 -blocks in <CODE>.bz2</CODE> files, and write each block out into its own
12323 -<CODE>.bz2</CODE> file.  You can then use <CODE>bzip2 -t</CODE> to test the
12324 -integrity of the resulting files, and decompress those which are
12325 -undamaged.
12326 -</P><P>
12327 -
12328 -<CODE>bzip2recover</CODE> 
12329 -takes a single argument, the name of the damaged file, and writes a
12330 -number of files <CODE>rec00001file.bz2</CODE>, <CODE>rec00002file.bz2</CODE>, etc,
12331 -containing the extracted blocks.  The output filenames are designed so
12332 -that the use of wildcards in subsequent processing -- for example,
12333 -<CODE>bzip2 -dc rec*file.bz2 &#62; recovered_data</CODE> -- processes the files in
12334 -the correct order.
12335 -</P><P>
12336 -
12337 -<CODE>bzip2recover</CODE> should be of most use dealing with large <CODE>.bz2</CODE>
12338 -files, as these will contain many blocks.  It is clearly futile to use
12339 -it on damaged single-block files, since a damaged block cannot be
12340 -recovered.  If you wish to minimise any potential data loss through
12341 -media or transmission errors, you might consider compressing with a
12342 -smaller block size.
12343 -</P><P>
12344 -
12345 -<HR SIZE="6">
12346 -<A NAME="SEC9"></A>
12347 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
12348 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC8"> &lt; </A>]</TD>
12349 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC10"> &gt; </A>]</TD>
12350 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
12351 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
12352 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
12353 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
12354 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
12355 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
12356 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
12357 -</TR></TABLE>
12358 -<H4> PERFORMANCE NOTES </H4>
12359 -<!--docid::SEC9::-->
12360 -<P>
12361 -
12362 -The sorting phase of compression gathers together similar strings in the
12363 -file.  Because of this, files containing very long runs of repeated
12364 -symbols, like "aabaabaabaab ..."  (repeated several hundred times) may
12365 -compress more slowly than normal.  Versions 0.9.5 and above fare much
12366 -better than previous versions in this respect.  The ratio between
12367 -worst-case and average-case compression time is in the region of 10:1.
12368 -For previous versions, this figure was more like 100:1.  You can use the
12369 -<CODE>-vvvv</CODE> option to monitor progress in great detail, if you want.
12370 -</P><P>
12371 -
12372 -Decompression speed is unaffected by these phenomena.
12373 -</P><P>
12374 -
12375 -<CODE>bzip2</CODE> usually allocates several megabytes of memory to operate
12376 -in, and then charges all over it in a fairly random fashion.  This means
12377 -that performance, both for compressing and decompressing, is largely
12378 -determined by the speed at which your machine can service cache misses.
12379 -Because of this, small changes to the code to reduce the miss rate have
12380 -been observed to give disproportionately large performance improvements.
12381 -I imagine <CODE>bzip2</CODE> will perform best on machines with very large
12382 -caches.
12383 -</P><P>
12384 -
12385 -<HR SIZE="6">
12386 -<A NAME="SEC10"></A>
12387 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
12388 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC9"> &lt; </A>]</TD>
12389 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC11"> &gt; </A>]</TD>
12390 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
12391 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
12392 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
12393 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
12394 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
12395 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
12396 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
12397 -</TR></TABLE>
12398 -<H4> CAVEATS </H4>
12399 -<!--docid::SEC10::-->
12400 -<P>
12401 -
12402 -I/O error messages are not as helpful as they could be.  <CODE>bzip2</CODE>
12403 -tries hard to detect I/O errors and exit cleanly, but the details of
12404 -what the problem is sometimes seem rather misleading.
12405 -</P><P>
12406 -
12407 -This manual page pertains to version 1.0.2 of <CODE>bzip2</CODE>.  Compressed
12408 -data created by this version is entirely forwards and backwards
12409 -compatible with the previous public releases, versions 0.1pl2, 0.9.0,
12410 -0.9.5, 1.0.0 and 1.0.1, but with the following exception: 0.9.0 and
12411 -above can correctly decompress multiple concatenated compressed files.
12412 -0.1pl2 cannot do this; it will stop after decompressing just the first
12413 -file in the stream.
12414 -</P><P>
12415 -
12416 -<CODE>bzip2recover</CODE> versions prior to this one, 1.0.2, used 32-bit
12417 -integers to represent bit positions in compressed files, so it could not
12418 -handle compressed files more than 512 megabytes long.  Version 1.0.2 and
12419 -above uses 64-bit ints on some platforms which support them (GNU
12420 -supported targets, and Windows).  To establish whether or not
12421 -<CODE>bzip2recover</CODE> was built with such a limitation, run it without
12422 -arguments.  In any event you can build yourself an unlimited version if
12423 -you can recompile it with <CODE>MaybeUInt64</CODE> set to be an unsigned
12424 -64-bit integer.
12425 -</P><P>
12426 -
12427 -<HR SIZE="6">
12428 -<A NAME="SEC11"></A>
12429 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
12430 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC10"> &lt; </A>]</TD>
12431 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC12"> &gt; </A>]</TD>
12432 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
12433 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
12434 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
12435 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
12436 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
12437 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
12438 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
12439 -</TR></TABLE>
12440 -<H4> AUTHOR </H4>
12441 -<!--docid::SEC11::-->
12442 -Julian Seward, <CODE>jseward@acm.org</CODE>.
12443 -<P>
12444 -
12445 -<CODE>http://sources.redhat.com/bzip2</CODE>
12446 -</P><P>
12447 -
12448 -The ideas embodied in <CODE>bzip2</CODE> are due to (at least) the following
12449 -people: Michael Burrows and David Wheeler (for the block sorting
12450 -transformation), David Wheeler (again, for the Huffman coder), Peter
12451 -Fenwick (for the structured coding model in the original <CODE>bzip</CODE>,
12452 -and many refinements), and Alistair Moffat, Radford Neal and Ian Witten
12453 -(for the arithmetic coder in the original <CODE>bzip</CODE>).  I am much
12454 -indebted for their help, support and advice.  See the manual in the
12455 -source distribution for pointers to sources of documentation.  Christian
12456 -von Roques encouraged me to look for faster sorting algorithms, so as to
12457 -speed up compression.  Bela Lubkin encouraged me to improve the
12458 -worst-case compression performance.  The <CODE>bz*</CODE> scripts are derived
12459 -from those of GNU <CODE>gzip</CODE>.  Many people sent patches, helped with
12460 -portability problems, lent machines, gave advice and were generally
12461 -helpful.
12462 -</P><P>
12463 -
12464 -</BLOCKQUOTE>
12465 -
12466 -<HR SIZE="6">
12467 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
12468 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
12469 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
12470 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
12471 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
12472 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
12473 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
12474 -</TR></TABLE>
12475 -<BR>  
12476 -<FONT SIZE="-1">
12477 -This document was generated
12478 -by <I>Julian Seward</I> on <I>January, 5  2002</I>
12479 -using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
12480 -"><I>texi2html</I></A>
12481 -
12482 -</BODY>
12483 -</HTML>
12484 diff -Nru bzip2-1.0.2/manual_3.html bzip2-1.0.2.new/manual_3.html
12485 --- bzip2-1.0.2/manual_3.html   Sat Jan  5 01:53:05 2002
12486 +++ bzip2-1.0.2.new/manual_3.html       Thu Jan  1 01:00:00 1970
12487 @@ -1,1855 +0,0 @@
12488 -<HTML>
12489 -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
12490 -<!-- Created on January, 5  2002 by texi2html 1.64 -->
12491 -<!-- 
12492 -Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
12493 -            Karl Berry  <karl@freefriends.org>
12494 -            Olaf Bachmann <obachman@mathematik.uni-kl.de>
12495 -            and many others.
12496 -Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
12497 -Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
12498
12499 --->
12500 -<HEAD>
12501 -<TITLE>Untitled Document: 3. Programming with <CODE>libbzip2</CODE></TITLE>
12502 -
12503 -<META NAME="description" CONTENT="Untitled Document: 3. Programming with <CODE>libbzip2</CODE>">
12504 -<META NAME="keywords" CONTENT="Untitled Document: 3. Programming with <CODE>libbzip2</CODE>">
12505 -<META NAME="resource-type" CONTENT="document">
12506 -<META NAME="distribution" CONTENT="global">
12507 -<META NAME="Generator" CONTENT="texi2html 1.64">
12508 -
12509 -</HEAD>
12510 -
12511 -<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
12512 -
12513 -<A NAME="SEC12"></A>
12514 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
12515 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC11"> &lt; </A>]</TD>
12516 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC13"> &gt; </A>]</TD>
12517 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
12518 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
12519 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
12520 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
12521 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
12522 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
12523 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
12524 -</TR></TABLE>
12525 -<H1> 3. Programming with <CODE>libbzip2</CODE> </H1>
12526 -<!--docid::SEC12::-->
12527 -<P>
12528 -
12529 -This chapter describes the programming interface to <CODE>libbzip2</CODE>.
12530 -</P><P>
12531 -
12532 -For general background information, particularly about memory
12533 -use and performance aspects, you'd be well advised to read Chapter 2
12534 -as well.
12535 -</P><P>
12536 -
12537 -<HR SIZE="6">
12538 -<A NAME="SEC13"></A>
12539 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
12540 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC12"> &lt; </A>]</TD>
12541 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC14"> &gt; </A>]</TD>
12542 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
12543 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
12544 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
12545 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
12546 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
12547 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
12548 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
12549 -</TR></TABLE>
12550 -<H2> 3.1 Top-level structure </H2>
12551 -<!--docid::SEC13::-->
12552 -<P>
12553 -
12554 -<CODE>libbzip2</CODE> is a flexible library for compressing and decompressing
12555 -data in the <CODE>bzip2</CODE> data format.  Although packaged as a single
12556 -entity, it helps to regard the library as three separate parts: the low
12557 -level interface, and the high level interface, and some utility
12558 -functions.
12559 -</P><P>
12560 -
12561 -The structure of <CODE>libbzip2</CODE>'s interfaces is similar to
12562 -that of Jean-loup Gailly's and Mark Adler's excellent <CODE>zlib</CODE> 
12563 -library.
12564 -</P><P>
12565 -
12566 -All externally visible symbols have names beginning <CODE>BZ2_</CODE>.
12567 -This is new in version 1.0.  The intention is to minimise pollution
12568 -of the namespaces of library clients.
12569 -</P><P>
12570 -
12571 -<HR SIZE="6">
12572 -<A NAME="SEC14"></A>
12573 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
12574 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC13"> &lt; </A>]</TD>
12575 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC15"> &gt; </A>]</TD>
12576 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
12577 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
12578 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
12579 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
12580 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
12581 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
12582 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
12583 -</TR></TABLE>
12584 -<H3> 3.1.1 Low-level summary </H3>
12585 -<!--docid::SEC14::-->
12586 -<P>
12587 -
12588 -This interface provides services for compressing and decompressing
12589 -data in memory.  There's no provision for dealing with files, streams
12590 -or any other I/O mechanisms, just straight memory-to-memory work.
12591 -In fact, this part of the library can be compiled without inclusion
12592 -of <CODE>stdio.h</CODE>, which may be helpful for embedded applications.
12593 -</P><P>
12594 -
12595 -The low-level part of the library has no global variables and
12596 -is therefore thread-safe.
12597 -</P><P>
12598 -
12599 -Six routines make up the low level interface: 
12600 -<CODE>BZ2_bzCompressInit</CODE>, <CODE>BZ2_bzCompress</CODE>, and <BR> <CODE>BZ2_bzCompressEnd</CODE>
12601 -for compression,
12602 -and a corresponding trio <CODE>BZ2_bzDecompressInit</CODE>, <BR> <CODE>BZ2_bzDecompress</CODE>
12603 -and <CODE>BZ2_bzDecompressEnd</CODE> for decompression.  
12604 -The <CODE>*Init</CODE> functions allocate
12605 -memory for compression/decompression and do other
12606 -initialisations, whilst the <CODE>*End</CODE> functions close down operations
12607 -and release memory.
12608 -</P><P>
12609 -
12610 -The real work is done by <CODE>BZ2_bzCompress</CODE> and <CODE>BZ2_bzDecompress</CODE>.  
12611 -These compress and decompress data from a user-supplied input buffer
12612 -to a user-supplied output buffer.  These buffers can be any size;
12613 -arbitrary quantities of data are handled by making repeated calls
12614 -to these functions.  This is a flexible mechanism allowing a 
12615 -consumer-pull style of activity, or producer-push, or a mixture of
12616 -both.
12617 -</P><P>
12618 -
12619 -<HR SIZE="6">
12620 -<A NAME="SEC15"></A>
12621 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
12622 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC14"> &lt; </A>]</TD>
12623 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC16"> &gt; </A>]</TD>
12624 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
12625 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
12626 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
12627 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
12628 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
12629 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
12630 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
12631 -</TR></TABLE>
12632 -<H3> 3.1.2 High-level summary </H3>
12633 -<!--docid::SEC15::-->
12634 -<P>
12635 -
12636 -This interface provides some handy wrappers around the low-level
12637 -interface to facilitate reading and writing <CODE>bzip2</CODE> format
12638 -files (<CODE>.bz2</CODE> files).  The routines provide hooks to facilitate
12639 -reading files in which the <CODE>bzip2</CODE> data stream is embedded 
12640 -within some larger-scale file structure, or where there are
12641 -multiple <CODE>bzip2</CODE> data streams concatenated end-to-end.
12642 -</P><P>
12643 -
12644 -For reading files, <CODE>BZ2_bzReadOpen</CODE>, <CODE>BZ2_bzRead</CODE>,
12645 -<CODE>BZ2_bzReadClose</CODE> and <BR> <CODE>BZ2_bzReadGetUnused</CODE> are supplied.  For
12646 -writing files, <CODE>BZ2_bzWriteOpen</CODE>, <CODE>BZ2_bzWrite</CODE> and
12647 -<CODE>BZ2_bzWriteFinish</CODE> are available.
12648 -</P><P>
12649 -
12650 -As with the low-level library, no global variables are used
12651 -so the library is per se thread-safe.  However, if I/O errors
12652 -occur whilst reading or writing the underlying compressed files,
12653 -you may have to consult <CODE>errno</CODE> to determine the cause of
12654 -the error.  In that case, you'd need a C library which correctly
12655 -supports <CODE>errno</CODE> in a multithreaded environment.
12656 -</P><P>
12657 -
12658 -To make the library a little simpler and more portable,
12659 -<CODE>BZ2_bzReadOpen</CODE> and <CODE>BZ2_bzWriteOpen</CODE> require you to pass them file
12660 -handles (<CODE>FILE*</CODE>s) which have previously been opened for reading or
12661 -writing respectively.  That avoids portability problems associated with
12662 -file operations and file attributes, whilst not being much of an
12663 -imposition on the programmer.
12664 -</P><P>
12665 -
12666 -<HR SIZE="6">
12667 -<A NAME="SEC16"></A>
12668 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
12669 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC15"> &lt; </A>]</TD>
12670 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC17"> &gt; </A>]</TD>
12671 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
12672 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
12673 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
12674 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
12675 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
12676 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
12677 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
12678 -</TR></TABLE>
12679 -<H3> 3.1.3 Utility functions summary </H3>
12680 -<!--docid::SEC16::-->
12681 -For very simple needs, <CODE>BZ2_bzBuffToBuffCompress</CODE> and
12682 -<CODE>BZ2_bzBuffToBuffDecompress</CODE> are provided.  These compress
12683 -data in memory from one buffer to another buffer in a single
12684 -function call.  You should assess whether these functions
12685 -fulfill your memory-to-memory compression/decompression
12686 -requirements before investing effort in understanding the more
12687 -general but more complex low-level interface.
12688 -<P>
12689 -
12690 -Yoshioka Tsuneo (<CODE>QWF00133@niftyserve.or.jp</CODE> /
12691 -<CODE>tsuneo-y@is.aist-nara.ac.jp</CODE>) has contributed some functions to
12692 -give better <CODE>zlib</CODE> compatibility.  These functions are
12693 -<CODE>BZ2_bzopen</CODE>, <CODE>BZ2_bzread</CODE>, <CODE>BZ2_bzwrite</CODE>, <CODE>BZ2_bzflush</CODE>,
12694 -<CODE>BZ2_bzclose</CODE>,
12695 -<CODE>BZ2_bzerror</CODE> and <CODE>BZ2_bzlibVersion</CODE>.  You may find these functions
12696 -more convenient for simple file reading and writing, than those in the
12697 -high-level interface.  These functions are not (yet) officially part of
12698 -the library, and are minimally documented here.  If they break, you
12699 -get to keep all the pieces.  I hope to document them properly when time
12700 -permits.
12701 -</P><P>
12702 -
12703 -Yoshioka also contributed modifications to allow the library to be
12704 -built as a Windows DLL.
12705 -</P><P>
12706 -
12707 -<HR SIZE="6">
12708 -<A NAME="SEC17"></A>
12709 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
12710 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC16"> &lt; </A>]</TD>
12711 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC18"> &gt; </A>]</TD>
12712 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
12713 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
12714 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
12715 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
12716 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
12717 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
12718 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
12719 -</TR></TABLE>
12720 -<H2> 3.2 Error handling </H2>
12721 -<!--docid::SEC17::-->
12722 -<P>
12723 -
12724 -The library is designed to recover cleanly in all situations, including
12725 -the worst-case situation of decompressing random data.  I'm not 
12726 -100% sure that it can always do this, so you might want to add
12727 -a signal handler to catch segmentation violations during decompression
12728 -if you are feeling especially paranoid.  I would be interested in
12729 -hearing more about the robustness of the library to corrupted
12730 -compressed data.
12731 -</P><P>
12732 -
12733 -Version 1.0 is much more robust in this respect than
12734 -0.9.0 or 0.9.5.  Investigations with Checker (a tool for 
12735 -detecting problems with memory management, similar to Purify)
12736 -indicate that, at least for the few files I tested, all single-bit
12737 -errors in the decompressed data are caught properly, with no
12738 -segmentation faults, no reads of uninitialised data and no 
12739 -out of range reads or writes.  So it's certainly much improved,
12740 -although I wouldn't claim it to be totally bombproof.
12741 -</P><P>
12742 -
12743 -The file <CODE>bzlib.h</CODE> contains all definitions needed to use
12744 -the library.  In particular, you should definitely not include
12745 -<CODE>bzlib_private.h</CODE>.
12746 -</P><P>
12747 -
12748 -In <CODE>bzlib.h</CODE>, the various return values are defined.  The following
12749 -list is not intended as an exhaustive description of the circumstances 
12750 -in which a given value may be returned -- those descriptions are given
12751 -later.  Rather, it is intended to convey the rough meaning of each
12752 -return value.  The first five actions are normal and not intended to 
12753 -denote an error situation.
12754 -<DL COMPACT>
12755 -<DT><CODE>BZ_OK</CODE>
12756 -<DD>The requested action was completed successfully.
12757 -<DT><CODE>BZ_RUN_OK</CODE>
12758 -<DD><DT><CODE>BZ_FLUSH_OK</CODE>
12759 -<DD><DT><CODE>BZ_FINISH_OK</CODE>
12760 -<DD>In <CODE>BZ2_bzCompress</CODE>, the requested flush/finish/nothing-special action
12761 -was completed successfully.
12762 -<DT><CODE>BZ_STREAM_END</CODE>
12763 -<DD>Compression of data was completed, or the logical stream end was
12764 -detected during decompression.
12765 -</DL>
12766 -<P>
12767 -
12768 -The following return values indicate an error of some kind.
12769 -<DL COMPACT>
12770 -<DT><CODE>BZ_CONFIG_ERROR</CODE>
12771 -<DD>Indicates that the library has been improperly compiled on your
12772 -platform -- a major configuration error.  Specifically, it means
12773 -that <CODE>sizeof(char)</CODE>, <CODE>sizeof(short)</CODE> and <CODE>sizeof(int)</CODE>
12774 -are not 1, 2 and 4 respectively, as they should be.  Note that the 
12775 -library should still work properly on 64-bit platforms which follow
12776 -the LP64 programming model -- that is, where <CODE>sizeof(long)</CODE>
12777 -and <CODE>sizeof(void*)</CODE> are 8.  Under LP64, <CODE>sizeof(int)</CODE> is
12778 -still 4, so <CODE>libbzip2</CODE>, which doesn't use the <CODE>long</CODE> type,
12779 -is OK.
12780 -<DT><CODE>BZ_SEQUENCE_ERROR</CODE>
12781 -<DD>When using the library, it is important to call the functions in the
12782 -correct sequence and with data structures (buffers etc) in the correct
12783 -states.  <CODE>libbzip2</CODE> checks as much as it can to ensure this is
12784 -happening, and returns <CODE>BZ_SEQUENCE_ERROR</CODE> if not.  Code which
12785 -complies precisely with the function semantics, as detailed below,
12786 -should never receive this value; such an event denotes buggy code
12787 -which you should investigate.
12788 -<DT><CODE>BZ_PARAM_ERROR</CODE>
12789 -<DD>Returned when a parameter to a function call is out of range 
12790 -or otherwise manifestly incorrect.  As with <CODE>BZ_SEQUENCE_ERROR</CODE>,
12791 -this denotes a bug in the client code.  The distinction between
12792 -<CODE>BZ_PARAM_ERROR</CODE> and <CODE>BZ_SEQUENCE_ERROR</CODE> is a bit hazy, but still worth
12793 -making.
12794 -<DT><CODE>BZ_MEM_ERROR</CODE>
12795 -<DD>Returned when a request to allocate memory failed.  Note that the
12796 -quantity of memory needed to decompress a stream cannot be determined
12797 -until the stream's header has been read.  So <CODE>BZ2_bzDecompress</CODE> and
12798 -<CODE>BZ2_bzRead</CODE> may return <CODE>BZ_MEM_ERROR</CODE> even though some of
12799 -the compressed data has been read.  The same is not true for
12800 -compression; once <CODE>BZ2_bzCompressInit</CODE> or <CODE>BZ2_bzWriteOpen</CODE> have
12801 -successfully completed, <CODE>BZ_MEM_ERROR</CODE> cannot occur.
12802 -<DT><CODE>BZ_DATA_ERROR</CODE>
12803 -<DD>Returned when a data integrity error is detected during decompression.
12804 -Most importantly, this means when stored and computed CRCs for the
12805 -data do not match.  This value is also returned upon detection of any
12806 -other anomaly in the compressed data.
12807 -<DT><CODE>BZ_DATA_ERROR_MAGIC</CODE>
12808 -<DD>As a special case of <CODE>BZ_DATA_ERROR</CODE>, it is sometimes useful to
12809 -know when the compressed stream does not start with the correct
12810 -magic bytes (<CODE>'B' 'Z' 'h'</CODE>).  
12811 -<DT><CODE>BZ_IO_ERROR</CODE>
12812 -<DD>Returned by <CODE>BZ2_bzRead</CODE> and <CODE>BZ2_bzWrite</CODE> when there is an error
12813 -reading or writing in the compressed file, and by <CODE>BZ2_bzReadOpen</CODE>
12814 -and <CODE>BZ2_bzWriteOpen</CODE> for attempts to use a file for which the
12815 -error indicator (viz, <CODE>ferror(f)</CODE>) is set.
12816 -On receipt of <CODE>BZ_IO_ERROR</CODE>, the caller should consult
12817 -<CODE>errno</CODE> and/or <CODE>perror</CODE> to acquire operating-system
12818 -specific information about the problem.
12819 -<DT><CODE>BZ_UNEXPECTED_EOF</CODE>
12820 -<DD>Returned by <CODE>BZ2_bzRead</CODE> when the compressed file finishes
12821 -before the logical end of stream is detected.
12822 -<DT><CODE>BZ_OUTBUFF_FULL</CODE>
12823 -<DD>Returned by <CODE>BZ2_bzBuffToBuffCompress</CODE> and
12824 -<CODE>BZ2_bzBuffToBuffDecompress</CODE> to indicate that the output data
12825 -will not fit into the output buffer provided.
12826 -</DL>
12827 -<P>
12828 -
12829 -<HR SIZE="6">
12830 -<A NAME="SEC18"></A>
12831 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
12832 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC17"> &lt; </A>]</TD>
12833 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC19"> &gt; </A>]</TD>
12834 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
12835 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
12836 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
12837 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
12838 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
12839 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
12840 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
12841 -</TR></TABLE>
12842 -<H2> 3.3 Low-level interface </H2>
12843 -<!--docid::SEC18::-->
12844 -<P>
12845 -
12846 -<HR SIZE="6">
12847 -<A NAME="SEC19"></A>
12848 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
12849 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC18"> &lt; </A>]</TD>
12850 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC20"> &gt; </A>]</TD>
12851 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
12852 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
12853 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
12854 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
12855 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
12856 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
12857 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
12858 -</TR></TABLE>
12859 -<H3> 3.3.1 <CODE>BZ2_bzCompressInit</CODE> </H3>
12860 -<!--docid::SEC19::-->
12861 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>typedef 
12862 -   struct {
12863 -      char *next_in;
12864 -      unsigned int avail_in;
12865 -      unsigned int total_in_lo32;
12866 -      unsigned int total_in_hi32;
12867 -
12868 -      char *next_out;
12869 -      unsigned int avail_out;
12870 -      unsigned int total_out_lo32;
12871 -      unsigned int total_out_hi32;
12872 -
12873 -      void *state;
12874 -
12875 -      void *(*bzalloc)(void *,int,int);
12876 -      void (*bzfree)(void *,void *);
12877 -      void *opaque;
12878 -   } 
12879 -   bz_stream;
12880 -
12881 -int BZ2_bzCompressInit ( bz_stream *strm, 
12882 -                         int blockSize100k, 
12883 -                         int verbosity,
12884 -                         int workFactor );
12885 -
12886 -</pre></td></tr></table><P>
12887 -
12888 -Prepares for compression.  The <CODE>bz_stream</CODE> structure
12889 -holds all data pertaining to the compression activity.  
12890 -A <CODE>bz_stream</CODE> structure should be allocated and initialised
12891 -prior to the call.
12892 -The fields of <CODE>bz_stream</CODE>
12893 -comprise the entirety of the user-visible data.  <CODE>state</CODE>
12894 -is a pointer to the private data structures required for compression.
12895 -</P><P>
12896 -
12897 -Custom memory allocators are supported, via fields <CODE>bzalloc</CODE>, 
12898 -<CODE>bzfree</CODE>,
12899 -and <CODE>opaque</CODE>.  The value 
12900 -<CODE>opaque</CODE> is passed to as the first argument to
12901 -all calls to <CODE>bzalloc</CODE> and <CODE>bzfree</CODE>, but is 
12902 -otherwise ignored by the library.
12903 -The call <CODE>bzalloc ( opaque, n, m )</CODE> is expected to return a 
12904 -pointer <CODE>p</CODE> to
12905 -<CODE>n * m</CODE> bytes of memory, and <CODE>bzfree ( opaque, p )</CODE> 
12906 -should free
12907 -that memory.
12908 -</P><P>
12909 -
12910 -If you don't want to use a custom memory allocator, set <CODE>bzalloc</CODE>, 
12911 -<CODE>bzfree</CODE> and
12912 -<CODE>opaque</CODE> to <CODE>NULL</CODE>, 
12913 -and the library will then use the standard <CODE>malloc</CODE>/<CODE>free</CODE>
12914 -routines.
12915 -</P><P>
12916 -
12917 -Before calling <CODE>BZ2_bzCompressInit</CODE>, fields <CODE>bzalloc</CODE>, 
12918 -<CODE>bzfree</CODE> and <CODE>opaque</CODE> should
12919 -be filled appropriately, as just described.  Upon return, the internal
12920 -state will have been allocated and initialised, and <CODE>total_in_lo32</CODE>, 
12921 -<CODE>total_in_hi32</CODE>, <CODE>total_out_lo32</CODE> and 
12922 -<CODE>total_out_hi32</CODE> will have been set to zero.  
12923 -These four fields are used by the library
12924 -to inform the caller of the total amount of data passed into and out of
12925 -the library, respectively.  You should not try to change them.
12926 -As of version 1.0, 64-bit counts are maintained, even on 32-bit
12927 -platforms, using the <CODE>_hi32</CODE> fields to store the upper 32 bits
12928 -of the count.  So, for example, the total amount of data in
12929 -is <CODE>(total_in_hi32 &#60;&#60; 32) + total_in_lo32</CODE>.
12930 -</P><P>
12931 -
12932 -Parameter <CODE>blockSize100k</CODE> specifies the block size to be used for
12933 -compression.  It should be a value between 1 and 9 inclusive, and the
12934 -actual block size used is 100000 x this figure.  9 gives the best
12935 -compression but takes most memory.
12936 -</P><P>
12937 -
12938 -Parameter <CODE>verbosity</CODE> should be set to a number between 0 and 4
12939 -inclusive.  0 is silent, and greater numbers give increasingly verbose
12940 -monitoring/debugging output.  If the library has been compiled with
12941 -<CODE>-DBZ_NO_STDIO</CODE>, no such output will appear for any verbosity
12942 -setting.
12943 -</P><P>
12944 -
12945 -Parameter <CODE>workFactor</CODE> controls how the compression phase behaves
12946 -when presented with worst case, highly repetitive, input data.  If
12947 -compression runs into difficulties caused by repetitive data, the
12948 -library switches from the standard sorting algorithm to a fallback
12949 -algorithm.  The fallback is slower than the standard algorithm by
12950 -perhaps a factor of three, but always behaves reasonably, no matter how
12951 -bad the input.
12952 -</P><P>
12953 -
12954 -Lower values of <CODE>workFactor</CODE> reduce the amount of effort the
12955 -standard algorithm will expend before resorting to the fallback.  You
12956 -should set this parameter carefully; too low, and many inputs will be
12957 -handled by the fallback algorithm and so compress rather slowly, too
12958 -high, and your average-to-worst case compression times can become very
12959 -large.  The default value of 30 gives reasonable behaviour over a wide
12960 -range of circumstances.
12961 -</P><P>
12962 -
12963 -Allowable values range from 0 to 250 inclusive.  0 is a special case,
12964 -equivalent to using the default value of 30.
12965 -</P><P>
12966 -
12967 -Note that the compressed output generated is the same regardless of
12968 -whether or not the fallback algorithm is used.
12969 -</P><P>
12970 -
12971 -Be aware also that this parameter may disappear entirely in future
12972 -versions of the library.  In principle it should be possible to devise a
12973 -good way to automatically choose which algorithm to use.  Such a
12974 -mechanism would render the parameter obsolete.
12975 -</P><P>
12976 -
12977 -Possible return values:
12978 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">      <CODE>BZ_CONFIG_ERROR</CODE>
12979 -         if the library has been mis-compiled
12980 -      <CODE>BZ_PARAM_ERROR</CODE> 
12981 -         if <CODE>strm</CODE> is <CODE>NULL</CODE> 
12982 -         or <CODE>blockSize</CODE> &#60; 1 or <CODE>blockSize</CODE> &#62; 9
12983 -         or <CODE>verbosity</CODE> &#60; 0 or <CODE>verbosity</CODE> &#62; 4
12984 -         or <CODE>workFactor</CODE> &#60; 0 or <CODE>workFactor</CODE> &#62; 250
12985 -      <CODE>BZ_MEM_ERROR</CODE> 
12986 -         if not enough memory is available
12987 -      <CODE>BZ_OK</CODE> 
12988 -         otherwise
12989 -</pre></td></tr></table>Allowable next actions:
12990 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">      <CODE>BZ2_bzCompress</CODE> 
12991 -         if <CODE>BZ_OK</CODE> is returned
12992 -      no specific action needed in case of error
12993 -</pre></td></tr></table></P><P>
12994 -
12995 -<HR SIZE="6">
12996 -<A NAME="SEC20"></A>
12997 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
12998 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC19"> &lt; </A>]</TD>
12999 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC21"> &gt; </A>]</TD>
13000 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
13001 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
13002 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
13003 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
13004 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
13005 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
13006 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
13007 -</TR></TABLE>
13008 -<H3> 3.3.2 <CODE>BZ2_bzCompress</CODE> </H3>
13009 -<!--docid::SEC20::-->
13010 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>   int BZ2_bzCompress ( bz_stream *strm, int action );
13011 -</pre></td></tr></table>Provides more input and/or output buffer space for the library.  The
13012 -caller maintains input and output buffers, and calls <CODE>BZ2_bzCompress</CODE> to
13013 -transfer data between them.
13014 -<P>
13015 -
13016 -Before each call to <CODE>BZ2_bzCompress</CODE>, <CODE>next_in</CODE> should point at
13017 -the data to be compressed, and <CODE>avail_in</CODE> should indicate how many
13018 -bytes the library may read.  <CODE>BZ2_bzCompress</CODE> updates <CODE>next_in</CODE>,
13019 -<CODE>avail_in</CODE> and <CODE>total_in</CODE> to reflect the number of bytes it
13020 -has read.
13021 -</P><P>
13022 -
13023 -Similarly, <CODE>next_out</CODE> should point to a buffer in which the
13024 -compressed data is to be placed, with <CODE>avail_out</CODE> indicating how
13025 -much output space is available.  <CODE>BZ2_bzCompress</CODE> updates
13026 -<CODE>next_out</CODE>, <CODE>avail_out</CODE> and <CODE>total_out</CODE> to reflect the
13027 -number of bytes output.
13028 -</P><P>
13029 -
13030 -You may provide and remove as little or as much data as you like on each
13031 -call of <CODE>BZ2_bzCompress</CODE>.  In the limit, it is acceptable to supply and
13032 -remove data one byte at a time, although this would be terribly
13033 -inefficient.  You should always ensure that at least one byte of output
13034 -space is available at each call.
13035 -</P><P>
13036 -
13037 -A second purpose of <CODE>BZ2_bzCompress</CODE> is to request a change of mode of the
13038 -compressed stream.  
13039 -</P><P>
13040 -
13041 -Conceptually, a compressed stream can be in one of four states: IDLE,
13042 -RUNNING, FLUSHING and FINISHING.  Before initialisation
13043 -(<CODE>BZ2_bzCompressInit</CODE>) and after termination (<CODE>BZ2_bzCompressEnd</CODE>), a
13044 -stream is regarded as IDLE.
13045 -</P><P>
13046 -
13047 -Upon initialisation (<CODE>BZ2_bzCompressInit</CODE>), the stream is placed in the
13048 -RUNNING state.  Subsequent calls to <CODE>BZ2_bzCompress</CODE> should pass
13049 -<CODE>BZ_RUN</CODE> as the requested action; other actions are illegal and
13050 -will result in <CODE>BZ_SEQUENCE_ERROR</CODE>.
13051 -</P><P>
13052 -
13053 -At some point, the calling program will have provided all the input data
13054 -it wants to.  It will then want to finish up -- in effect, asking the
13055 -library to process any data it might have buffered internally.  In this
13056 -state, <CODE>BZ2_bzCompress</CODE> will no longer attempt to read data from
13057 -<CODE>next_in</CODE>, but it will want to write data to <CODE>next_out</CODE>.
13058 -Because the output buffer supplied by the user can be arbitrarily small,
13059 -the finishing-up operation cannot necessarily be done with a single call
13060 -of <CODE>BZ2_bzCompress</CODE>.
13061 -</P><P>
13062 -
13063 -Instead, the calling program passes <CODE>BZ_FINISH</CODE> as an action to
13064 -<CODE>BZ2_bzCompress</CODE>.  This changes the stream's state to FINISHING.  Any
13065 -remaining input (ie, <CODE>next_in[0 .. avail_in-1]</CODE>) is compressed and
13066 -transferred to the output buffer.  To do this, <CODE>BZ2_bzCompress</CODE> must be
13067 -called repeatedly until all the output has been consumed.  At that
13068 -point, <CODE>BZ2_bzCompress</CODE> returns <CODE>BZ_STREAM_END</CODE>, and the stream's
13069 -state is set back to IDLE.  <CODE>BZ2_bzCompressEnd</CODE> should then be
13070 -called.
13071 -</P><P>
13072 -
13073 -Just to make sure the calling program does not cheat, the library makes
13074 -a note of <CODE>avail_in</CODE> at the time of the first call to
13075 -<CODE>BZ2_bzCompress</CODE> which has <CODE>BZ_FINISH</CODE> as an action (ie, at the
13076 -time the program has announced its intention to not supply any more
13077 -input).  By comparing this value with that of <CODE>avail_in</CODE> over
13078 -subsequent calls to <CODE>BZ2_bzCompress</CODE>, the library can detect any
13079 -attempts to slip in more data to compress.  Any calls for which this is
13080 -detected will return <CODE>BZ_SEQUENCE_ERROR</CODE>.  This indicates a
13081 -programming mistake which should be corrected.
13082 -</P><P>
13083 -
13084 -Instead of asking to finish, the calling program may ask
13085 -<CODE>BZ2_bzCompress</CODE> to take all the remaining input, compress it and
13086 -terminate the current (Burrows-Wheeler) compression block.  This could
13087 -be useful for error control purposes.  The mechanism is analogous to
13088 -that for finishing: call <CODE>BZ2_bzCompress</CODE> with an action of
13089 -<CODE>BZ_FLUSH</CODE>, remove output data, and persist with the
13090 -<CODE>BZ_FLUSH</CODE> action until the value <CODE>BZ_RUN</CODE> is returned.  As
13091 -with finishing, <CODE>BZ2_bzCompress</CODE> detects any attempt to provide more
13092 -input data once the flush has begun.
13093 -</P><P>
13094 -
13095 -Once the flush is complete, the stream returns to the normal RUNNING
13096 -state.
13097 -</P><P>
13098 -
13099 -This all sounds pretty complex, but isn't really.  Here's a table
13100 -which shows which actions are allowable in each state, what action
13101 -will be taken, what the next state is, and what the non-error return
13102 -values are.  Note that you can't explicitly ask what state the
13103 -stream is in, but nor do you need to -- it can be inferred from the
13104 -values returned by <CODE>BZ2_bzCompress</CODE>.
13105 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">IDLE/<CODE>any</CODE>           
13106 -      Illegal.  IDLE state only exists after <CODE>BZ2_bzCompressEnd</CODE> or
13107 -      before <CODE>BZ2_bzCompressInit</CODE>.
13108 -      Return value = <CODE>BZ_SEQUENCE_ERROR</CODE>
13109 -
13110 -RUNNING/<CODE>BZ_RUN</CODE>     
13111 -      Compress from <CODE>next_in</CODE> to <CODE>next_out</CODE> as much as possible.
13112 -      Next state = RUNNING
13113 -      Return value = <CODE>BZ_RUN_OK</CODE>
13114 -
13115 -RUNNING/<CODE>BZ_FLUSH</CODE>   
13116 -      Remember current value of <CODE>next_in</CODE>.  Compress from <CODE>next_in</CODE>
13117 -      to <CODE>next_out</CODE> as much as possible, but do not accept any more input.  
13118 -      Next state = FLUSHING
13119 -      Return value = <CODE>BZ_FLUSH_OK</CODE>
13120 -
13121 -RUNNING/<CODE>BZ_FINISH</CODE>  
13122 -      Remember current value of <CODE>next_in</CODE>.  Compress from <CODE>next_in</CODE>
13123 -      to <CODE>next_out</CODE> as much as possible, but do not accept any more input.
13124 -      Next state = FINISHING
13125 -      Return value = <CODE>BZ_FINISH_OK</CODE>
13126 -
13127 -FLUSHING/<CODE>BZ_FLUSH</CODE>  
13128 -      Compress from <CODE>next_in</CODE> to <CODE>next_out</CODE> as much as possible, 
13129 -      but do not accept any more input.  
13130 -      If all the existing input has been used up and all compressed
13131 -      output has been removed
13132 -         Next state = RUNNING; Return value = <CODE>BZ_RUN_OK</CODE>
13133 -      else
13134 -         Next state = FLUSHING; Return value = <CODE>BZ_FLUSH_OK</CODE>
13135 -
13136 -FLUSHING/other     
13137 -      Illegal.
13138 -      Return value = <CODE>BZ_SEQUENCE_ERROR</CODE>
13139 -
13140 -FINISHING/<CODE>BZ_FINISH</CODE>  
13141 -      Compress from <CODE>next_in</CODE> to <CODE>next_out</CODE> as much as possible,
13142 -      but to not accept any more input.  
13143 -      If all the existing input has been used up and all compressed
13144 -      output has been removed
13145 -         Next state = IDLE; Return value = <CODE>BZ_STREAM_END</CODE>
13146 -      else
13147 -         Next state = FINISHING; Return value = <CODE>BZ_FINISHING</CODE>
13148 -
13149 -FINISHING/other
13150 -      Illegal.
13151 -      Return value = <CODE>BZ_SEQUENCE_ERROR</CODE>
13152 -</pre></td></tr></table></P><P>
13153 -
13154 -That still looks complicated?  Well, fair enough.  The usual sequence
13155 -of calls for compressing a load of data is:
13156 -<UL>
13157 -<LI>Get started with <CODE>BZ2_bzCompressInit</CODE>.
13158 -<LI>Shovel data in and shlurp out its compressed form using zero or more
13159 -calls of <CODE>BZ2_bzCompress</CODE> with action = <CODE>BZ_RUN</CODE>.
13160 -<LI>Finish up.
13161 -Repeatedly call <CODE>BZ2_bzCompress</CODE> with action = <CODE>BZ_FINISH</CODE>, 
13162 -copying out the compressed output, until <CODE>BZ_STREAM_END</CODE> is returned.
13163 -<LI>Close up and go home.  Call <CODE>BZ2_bzCompressEnd</CODE>.
13164 -</UL>
13165 -If the data you want to compress fits into your input buffer all
13166 -at once, you can skip the calls of <CODE>BZ2_bzCompress ( ..., BZ_RUN )</CODE> and 
13167 -just do the <CODE>BZ2_bzCompress ( ..., BZ_FINISH )</CODE> calls.
13168 -<P>
13169 -
13170 -All required memory is allocated by <CODE>BZ2_bzCompressInit</CODE>.  The
13171 -compression library can accept any data at all (obviously).  So you
13172 -shouldn't get any error return values from the <CODE>BZ2_bzCompress</CODE> calls.
13173 -If you do, they will be <CODE>BZ_SEQUENCE_ERROR</CODE>, and indicate a bug in
13174 -your programming.
13175 -</P><P>
13176 -
13177 -Trivial other possible return values:
13178 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">      <CODE>BZ_PARAM_ERROR</CODE>   
13179 -         if <CODE>strm</CODE> is <CODE>NULL</CODE>, or <CODE>strm-&#62;s</CODE> is <CODE>NULL</CODE>
13180 -</pre></td></tr></table></P><P>
13181 -
13182 -<HR SIZE="6">
13183 -<A NAME="SEC21"></A>
13184 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
13185 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC20"> &lt; </A>]</TD>
13186 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC22"> &gt; </A>]</TD>
13187 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
13188 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
13189 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
13190 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
13191 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
13192 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
13193 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
13194 -</TR></TABLE>
13195 -<H3> 3.3.3 <CODE>BZ2_bzCompressEnd</CODE> </H3>
13196 -<!--docid::SEC21::-->
13197 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>int BZ2_bzCompressEnd ( bz_stream *strm );
13198 -</pre></td></tr></table>Releases all memory associated with a compression stream.
13199 -<P>
13200 -
13201 -Possible return values:
13202 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">   <CODE>BZ_PARAM_ERROR</CODE>    if <CODE>strm</CODE> is <CODE>NULL</CODE> or <CODE>strm-&#62;s</CODE> is <CODE>NULL</CODE>
13203 -   <CODE>BZ_OK</CODE>    otherwise
13204 -</pre></td></tr></table></P><P>
13205 -
13206 -<HR SIZE="6">
13207 -<A NAME="SEC22"></A>
13208 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
13209 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC21"> &lt; </A>]</TD>
13210 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC23"> &gt; </A>]</TD>
13211 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
13212 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
13213 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
13214 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
13215 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
13216 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
13217 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
13218 -</TR></TABLE>
13219 -<H3> 3.3.4 <CODE>BZ2_bzDecompressInit</CODE> </H3>
13220 -<!--docid::SEC22::-->
13221 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>int BZ2_bzDecompressInit ( bz_stream *strm, int verbosity, int small );
13222 -</pre></td></tr></table>Prepares for decompression.  As with <CODE>BZ2_bzCompressInit</CODE>, a
13223 -<CODE>bz_stream</CODE> record should be allocated and initialised before the
13224 -call.  Fields <CODE>bzalloc</CODE>, <CODE>bzfree</CODE> and <CODE>opaque</CODE> should be
13225 -set if a custom memory allocator is required, or made <CODE>NULL</CODE> for
13226 -the normal <CODE>malloc</CODE>/<CODE>free</CODE> routines.  Upon return, the internal
13227 -state will have been initialised, and <CODE>total_in</CODE> and
13228 -<CODE>total_out</CODE> will be zero.
13229 -<P>
13230 -
13231 -For the meaning of parameter <CODE>verbosity</CODE>, see <CODE>BZ2_bzCompressInit</CODE>.
13232 -</P><P>
13233 -
13234 -If <CODE>small</CODE> is nonzero, the library will use an alternative
13235 -decompression algorithm which uses less memory but at the cost of
13236 -decompressing more slowly (roughly speaking, half the speed, but the
13237 -maximum memory requirement drops to around 2300k).  See Chapter 2 for
13238 -more information on memory management.
13239 -</P><P>
13240 -
13241 -Note that the amount of memory needed to decompress
13242 -a stream cannot be determined until the stream's header has been read,
13243 -so even if <CODE>BZ2_bzDecompressInit</CODE> succeeds, a subsequent
13244 -<CODE>BZ2_bzDecompress</CODE> could fail with <CODE>BZ_MEM_ERROR</CODE>.
13245 -</P><P>
13246 -
13247 -Possible return values:
13248 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">      <CODE>BZ_CONFIG_ERROR</CODE>
13249 -         if the library has been mis-compiled
13250 -      <CODE>BZ_PARAM_ERROR</CODE>
13251 -         if <CODE>(small != 0 &#38;&#38; small != 1)</CODE>
13252 -         or <CODE>(verbosity &#60; 0 || verbosity &#62; 4)</CODE>
13253 -      <CODE>BZ_MEM_ERROR</CODE>
13254 -         if insufficient memory is available
13255 -</pre></td></tr></table></P><P>
13256 -
13257 -Allowable next actions:
13258 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">      <CODE>BZ2_bzDecompress</CODE>
13259 -         if <CODE>BZ_OK</CODE> was returned
13260 -      no specific action required in case of error
13261 -</pre></td></tr></table></P><P>
13262 -
13263
13264 -</P><P>
13265 -
13266 -<HR SIZE="6">
13267 -<A NAME="SEC23"></A>
13268 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
13269 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC22"> &lt; </A>]</TD>
13270 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC24"> &gt; </A>]</TD>
13271 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
13272 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
13273 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
13274 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
13275 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
13276 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
13277 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
13278 -</TR></TABLE>
13279 -<H3> 3.3.5 <CODE>BZ2_bzDecompress</CODE> </H3>
13280 -<!--docid::SEC23::-->
13281 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>int BZ2_bzDecompress ( bz_stream *strm );
13282 -</pre></td></tr></table>Provides more input and/out output buffer space for the library.  The
13283 -caller maintains input and output buffers, and uses <CODE>BZ2_bzDecompress</CODE>
13284 -to transfer data between them.
13285 -<P>
13286 -
13287 -Before each call to <CODE>BZ2_bzDecompress</CODE>, <CODE>next_in</CODE> 
13288 -should point at the compressed data,
13289 -and <CODE>avail_in</CODE> should indicate how many bytes the library
13290 -may read.  <CODE>BZ2_bzDecompress</CODE> updates <CODE>next_in</CODE>, <CODE>avail_in</CODE> 
13291 -and <CODE>total_in</CODE>
13292 -to reflect the number of bytes it has read.
13293 -</P><P>
13294 -
13295 -Similarly, <CODE>next_out</CODE> should point to a buffer in which the uncompressed
13296 -output is to be placed, with <CODE>avail_out</CODE> indicating how much output space
13297 -is available.  <CODE>BZ2_bzCompress</CODE> updates <CODE>next_out</CODE>,
13298 -<CODE>avail_out</CODE> and <CODE>total_out</CODE> to reflect
13299 -the number of bytes output.
13300 -</P><P>
13301 -
13302 -You may provide and remove as little or as much data as you like on
13303 -each call of <CODE>BZ2_bzDecompress</CODE>.  
13304 -In the limit, it is acceptable to
13305 -supply and remove data one byte at a time, although this would be
13306 -terribly inefficient.  You should always ensure that at least one
13307 -byte of output space is available at each call.
13308 -</P><P>
13309 -
13310 -Use of <CODE>BZ2_bzDecompress</CODE> is simpler than <CODE>BZ2_bzCompress</CODE>.
13311 -</P><P>
13312 -
13313 -You should provide input and remove output as described above, and
13314 -repeatedly call <CODE>BZ2_bzDecompress</CODE> until <CODE>BZ_STREAM_END</CODE> is
13315 -returned.  Appearance of <CODE>BZ_STREAM_END</CODE> denotes that
13316 -<CODE>BZ2_bzDecompress</CODE> has detected the logical end of the compressed
13317 -stream.  <CODE>BZ2_bzDecompress</CODE> will not produce <CODE>BZ_STREAM_END</CODE> until
13318 -all output data has been placed into the output buffer, so once
13319 -<CODE>BZ_STREAM_END</CODE> appears, you are guaranteed to have available all
13320 -the decompressed output, and <CODE>BZ2_bzDecompressEnd</CODE> can safely be
13321 -called.
13322 -</P><P>
13323 -
13324 -If case of an error return value, you should call <CODE>BZ2_bzDecompressEnd</CODE>
13325 -to clean up and release memory.
13326 -</P><P>
13327 -
13328 -Possible return values:
13329 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">      <CODE>BZ_PARAM_ERROR</CODE>
13330 -         if <CODE>strm</CODE> is <CODE>NULL</CODE> or <CODE>strm-&#62;s</CODE> is <CODE>NULL</CODE>
13331 -         or <CODE>strm-&#62;avail_out &#60; 1</CODE>
13332 -      <CODE>BZ_DATA_ERROR</CODE>
13333 -         if a data integrity error is detected in the compressed stream
13334 -      <CODE>BZ_DATA_ERROR_MAGIC</CODE>
13335 -         if the compressed stream doesn't begin with the right magic bytes
13336 -      <CODE>BZ_MEM_ERROR</CODE>
13337 -         if there wasn't enough memory available
13338 -      <CODE>BZ_STREAM_END</CODE>
13339 -         if the logical end of the data stream was detected and all
13340 -         output in has been consumed, eg <CODE>s-&#62;avail_out &#62; 0</CODE>
13341 -      <CODE>BZ_OK</CODE>
13342 -         otherwise
13343 -</pre></td></tr></table>Allowable next actions:
13344 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">      <CODE>BZ2_bzDecompress</CODE>
13345 -         if <CODE>BZ_OK</CODE> was returned
13346 -      <CODE>BZ2_bzDecompressEnd</CODE>
13347 -         otherwise
13348 -</pre></td></tr></table></P><P>
13349 -
13350 -<HR SIZE="6">
13351 -<A NAME="SEC24"></A>
13352 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
13353 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC23"> &lt; </A>]</TD>
13354 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC25"> &gt; </A>]</TD>
13355 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
13356 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
13357 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
13358 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
13359 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
13360 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
13361 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
13362 -</TR></TABLE>
13363 -<H3> 3.3.6 <CODE>BZ2_bzDecompressEnd</CODE> </H3>
13364 -<!--docid::SEC24::-->
13365 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>int BZ2_bzDecompressEnd ( bz_stream *strm );
13366 -</pre></td></tr></table>Releases all memory associated with a decompression stream.
13367 -<P>
13368 -
13369 -Possible return values:
13370 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">      <CODE>BZ_PARAM_ERROR</CODE>
13371 -         if <CODE>strm</CODE> is <CODE>NULL</CODE> or <CODE>strm-&#62;s</CODE> is <CODE>NULL</CODE>
13372 -      <CODE>BZ_OK</CODE>
13373 -         otherwise
13374 -</pre></td></tr></table></P><P>
13375 -
13376 -Allowable next actions:
13377 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">      None.
13378 -</pre></td></tr></table></P><P>
13379 -
13380 -<HR SIZE="6">
13381 -<A NAME="SEC25"></A>
13382 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
13383 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC24"> &lt; </A>]</TD>
13384 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC26"> &gt; </A>]</TD>
13385 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
13386 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
13387 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
13388 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
13389 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
13390 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
13391 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
13392 -</TR></TABLE>
13393 -<H2> 3.4 High-level interface </H2>
13394 -<!--docid::SEC25::-->
13395 -<P>
13396 -
13397 -This interface provides functions for reading and writing 
13398 -<CODE>bzip2</CODE> format files.  First, some general points.
13399 -</P><P>
13400 -
13401 -<UL>
13402 -<LI>All of the functions take an <CODE>int*</CODE> first argument,
13403 -  <CODE>bzerror</CODE>.
13404 -  After each call, <CODE>bzerror</CODE> should be consulted first to determine
13405 -  the outcome of the call.  If <CODE>bzerror</CODE> is <CODE>BZ_OK</CODE>, 
13406 -  the call completed
13407 -  successfully, and only then should the return value of the function
13408 -  (if any) be consulted.  If <CODE>bzerror</CODE> is <CODE>BZ_IO_ERROR</CODE>, 
13409 -  there was an error
13410 -  reading/writing the underlying compressed file, and you should
13411 -  then consult <CODE>errno</CODE>/<CODE>perror</CODE> to determine the 
13412 -  cause of the difficulty.
13413 -  <CODE>bzerror</CODE> may also be set to various other values; precise details are
13414 -  given on a per-function basis below.
13415 -<LI>If <CODE>bzerror</CODE> indicates an error
13416 -  (ie, anything except <CODE>BZ_OK</CODE> and <CODE>BZ_STREAM_END</CODE>),
13417 -  you should immediately call <CODE>BZ2_bzReadClose</CODE> (or <CODE>BZ2_bzWriteClose</CODE>,
13418 -  depending on whether you are attempting to read or to write)
13419 -  to free up all resources associated
13420 -  with the stream.  Once an error has been indicated, behaviour of all calls
13421 -  except <CODE>BZ2_bzReadClose</CODE> (<CODE>BZ2_bzWriteClose</CODE>) is undefined.  
13422 -  The implication is that (1) <CODE>bzerror</CODE> should
13423 -  be checked after each call, and (2) if <CODE>bzerror</CODE> indicates an error, 
13424 -  <CODE>BZ2_bzReadClose</CODE> (<CODE>BZ2_bzWriteClose</CODE>) should then be called to clean up.
13425 -<LI>The <CODE>FILE*</CODE> arguments passed to
13426 -   <CODE>BZ2_bzReadOpen</CODE>/<CODE>BZ2_bzWriteOpen</CODE>  
13427 -  should be set to binary mode.
13428 -  Most Unix systems will do this by default, but other platforms,
13429 -  including Windows and Mac, will not.  If you omit this, you may
13430 -  encounter problems when moving code to new platforms.
13431 -<LI>Memory allocation requests are handled by
13432 -  <CODE>malloc</CODE>/<CODE>free</CODE>.  
13433 -  At present
13434 -  there is no facility for user-defined memory allocators in the file I/O
13435 -  functions (could easily be added, though).
13436 -</UL>
13437 -<P>
13438 -
13439 -<HR SIZE="6">
13440 -<A NAME="SEC26"></A>
13441 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
13442 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC25"> &lt; </A>]</TD>
13443 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC27"> &gt; </A>]</TD>
13444 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
13445 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
13446 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
13447 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
13448 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
13449 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
13450 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
13451 -</TR></TABLE>
13452 -<H3> 3.4.1 <CODE>BZ2_bzReadOpen</CODE> </H3>
13453 -<!--docid::SEC26::-->
13454 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>   typedef void BZFILE;
13455 -
13456 -   BZFILE *BZ2_bzReadOpen ( int *bzerror, FILE *f, 
13457 -                            int small, int verbosity,
13458 -                            void *unused, int nUnused );
13459 -</pre></td></tr></table>Prepare to read compressed data from file handle <CODE>f</CODE>.  <CODE>f</CODE>
13460 -should refer to a file which has been opened for reading, and for which
13461 -the error indicator (<CODE>ferror(f)</CODE>)is not set.  If <CODE>small</CODE> is 1,
13462 -the library will try to decompress using less memory, at the expense of
13463 -speed.
13464 -<P>
13465 -
13466 -For reasons explained below, <CODE>BZ2_bzRead</CODE> will decompress the
13467 -<CODE>nUnused</CODE> bytes starting at <CODE>unused</CODE>, before starting to read
13468 -from the file <CODE>f</CODE>.  At most <CODE>BZ_MAX_UNUSED</CODE> bytes may be
13469 -supplied like this.  If this facility is not required, you should pass
13470 -<CODE>NULL</CODE> and <CODE>0</CODE> for <CODE>unused</CODE> and n<CODE>Unused</CODE>
13471 -respectively.
13472 -</P><P>
13473 -
13474 -For the meaning of parameters <CODE>small</CODE> and <CODE>verbosity</CODE>,
13475 -see <CODE>BZ2_bzDecompressInit</CODE>.
13476 -</P><P>
13477 -
13478 -The amount of memory needed to decompress a file cannot be determined
13479 -until the file's header has been read.  So it is possible that
13480 -<CODE>BZ2_bzReadOpen</CODE> returns <CODE>BZ_OK</CODE> but a subsequent call of
13481 -<CODE>BZ2_bzRead</CODE> will return <CODE>BZ_MEM_ERROR</CODE>.
13482 -</P><P>
13483 -
13484 -Possible assignments to <CODE>bzerror</CODE>:
13485 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">      <CODE>BZ_CONFIG_ERROR</CODE>
13486 -         if the library has been mis-compiled
13487 -      <CODE>BZ_PARAM_ERROR</CODE>
13488 -         if <CODE>f</CODE> is <CODE>NULL</CODE> 
13489 -         or <CODE>small</CODE> is neither <CODE>0</CODE> nor <CODE>1</CODE>                 
13490 -         or <CODE>(unused == NULL &#38;&#38; nUnused != 0)</CODE>
13491 -         or <CODE>(unused != NULL &#38;&#38; !(0 &#60;= nUnused &#60;= BZ_MAX_UNUSED))</CODE>
13492 -      <CODE>BZ_IO_ERROR</CODE>    
13493 -         if <CODE>ferror(f)</CODE> is nonzero
13494 -      <CODE>BZ_MEM_ERROR</CODE>   
13495 -         if insufficient memory is available
13496 -      <CODE>BZ_OK</CODE>
13497 -         otherwise.
13498 -</pre></td></tr></table></P><P>
13499 -
13500 -Possible return values:
13501 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">      Pointer to an abstract <CODE>BZFILE</CODE>        
13502 -         if <CODE>bzerror</CODE> is <CODE>BZ_OK</CODE>   
13503 -      <CODE>NULL</CODE>
13504 -         otherwise
13505 -</pre></td></tr></table></P><P>
13506 -
13507 -Allowable next actions:
13508 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">      <CODE>BZ2_bzRead</CODE>
13509 -         if <CODE>bzerror</CODE> is <CODE>BZ_OK</CODE>   
13510 -      <CODE>BZ2_bzClose</CODE> 
13511 -         otherwise
13512 -</pre></td></tr></table></P><P>
13513 -
13514 -<HR SIZE="6">
13515 -<A NAME="SEC27"></A>
13516 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
13517 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC26"> &lt; </A>]</TD>
13518 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC28"> &gt; </A>]</TD>
13519 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
13520 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
13521 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
13522 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
13523 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
13524 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
13525 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
13526 -</TR></TABLE>
13527 -<H3> 3.4.2 <CODE>BZ2_bzRead</CODE> </H3>
13528 -<!--docid::SEC27::-->
13529 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>   int BZ2_bzRead ( int *bzerror, BZFILE *b, void *buf, int len );
13530 -</pre></td></tr></table>Reads up to <CODE>len</CODE> (uncompressed) bytes from the compressed file 
13531 -<CODE>b</CODE> into
13532 -the buffer <CODE>buf</CODE>.  If the read was successful, 
13533 -<CODE>bzerror</CODE> is set to <CODE>BZ_OK</CODE>
13534 -and the number of bytes read is returned.  If the logical end-of-stream
13535 -was detected, <CODE>bzerror</CODE> will be set to <CODE>BZ_STREAM_END</CODE>, 
13536 -and the number
13537 -of bytes read is returned.  All other <CODE>bzerror</CODE> values denote an error.
13538 -<P>
13539 -
13540 -<CODE>BZ2_bzRead</CODE> will supply <CODE>len</CODE> bytes,
13541 -unless the logical stream end is detected
13542 -or an error occurs.  Because of this, it is possible to detect the 
13543 -stream end by observing when the number of bytes returned is 
13544 -less than the number
13545 -requested.  Nevertheless, this is regarded as inadvisable; you should
13546 -instead check <CODE>bzerror</CODE> after every call and watch out for
13547 -<CODE>BZ_STREAM_END</CODE>.
13548 -</P><P>
13549 -
13550 -Internally, <CODE>BZ2_bzRead</CODE> copies data from the compressed file in chunks
13551 -of size <CODE>BZ_MAX_UNUSED</CODE> bytes
13552 -before decompressing it.  If the file contains more bytes than strictly
13553 -needed to reach the logical end-of-stream, <CODE>BZ2_bzRead</CODE> will almost certainly
13554 -read some of the trailing data before signalling <CODE>BZ_SEQUENCE_END</CODE>.
13555 -To collect the read but unused data once <CODE>BZ_SEQUENCE_END</CODE> has 
13556 -appeared, call <CODE>BZ2_bzReadGetUnused</CODE> immediately before <CODE>BZ2_bzReadClose</CODE>.
13557 -</P><P>
13558 -
13559 -Possible assignments to <CODE>bzerror</CODE>:
13560 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">      <CODE>BZ_PARAM_ERROR</CODE>
13561 -         if <CODE>b</CODE> is <CODE>NULL</CODE> or <CODE>buf</CODE> is <CODE>NULL</CODE> or <CODE>len &#60; 0</CODE>
13562 -      <CODE>BZ_SEQUENCE_ERROR</CODE> 
13563 -         if <CODE>b</CODE> was opened with <CODE>BZ2_bzWriteOpen</CODE>
13564 -      <CODE>BZ_IO_ERROR</CODE> 
13565 -         if there is an error reading from the compressed file
13566 -      <CODE>BZ_UNEXPECTED_EOF</CODE> 
13567 -         if the compressed file ended before the logical end-of-stream was detected
13568 -      <CODE>BZ_DATA_ERROR</CODE> 
13569 -         if a data integrity error was detected in the compressed stream
13570 -      <CODE>BZ_DATA_ERROR_MAGIC</CODE>
13571 -         if the stream does not begin with the requisite header bytes (ie, is not 
13572 -         a <CODE>bzip2</CODE> data file).  This is really a special case of <CODE>BZ_DATA_ERROR</CODE>.
13573 -      <CODE>BZ_MEM_ERROR</CODE> 
13574 -         if insufficient memory was available
13575 -      <CODE>BZ_STREAM_END</CODE> 
13576 -         if the logical end of stream was detected.
13577 -      <CODE>BZ_OK</CODE>
13578 -         otherwise.
13579 -</pre></td></tr></table></P><P>
13580 -
13581 -Possible return values:
13582 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">      number of bytes read
13583 -         if <CODE>bzerror</CODE> is <CODE>BZ_OK</CODE> or <CODE>BZ_STREAM_END</CODE>
13584 -      undefined
13585 -         otherwise
13586 -</pre></td></tr></table></P><P>
13587 -
13588 -Allowable next actions:
13589 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">      collect data from <CODE>buf</CODE>, then <CODE>BZ2_bzRead</CODE> or <CODE>BZ2_bzReadClose</CODE>
13590 -         if <CODE>bzerror</CODE> is <CODE>BZ_OK</CODE> 
13591 -      collect data from <CODE>buf</CODE>, then <CODE>BZ2_bzReadClose</CODE> or <CODE>BZ2_bzReadGetUnused</CODE> 
13592 -         if <CODE>bzerror</CODE> is <CODE>BZ_SEQUENCE_END</CODE>   
13593 -      <CODE>BZ2_bzReadClose</CODE> 
13594 -         otherwise
13595 -</pre></td></tr></table></P><P>
13596 -
13597 -<HR SIZE="6">
13598 -<A NAME="SEC28"></A>
13599 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
13600 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC27"> &lt; </A>]</TD>
13601 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC29"> &gt; </A>]</TD>
13602 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
13603 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
13604 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
13605 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
13606 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
13607 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
13608 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
13609 -</TR></TABLE>
13610 -<H3> 3.4.3 <CODE>BZ2_bzReadGetUnused</CODE> </H3>
13611 -<!--docid::SEC28::-->
13612 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>   void BZ2_bzReadGetUnused ( int* bzerror, BZFILE *b, 
13613 -                              void** unused, int* nUnused );
13614 -</pre></td></tr></table>Returns data which was read from the compressed file but was not needed
13615 -to get to the logical end-of-stream.  <CODE>*unused</CODE> is set to the address
13616 -of the data, and <CODE>*nUnused</CODE> to the number of bytes.  <CODE>*nUnused</CODE> will
13617 -be set to a value between <CODE>0</CODE> and <CODE>BZ_MAX_UNUSED</CODE> inclusive.
13618 -<P>
13619 -
13620 -This function may only be called once <CODE>BZ2_bzRead</CODE> has signalled 
13621 -<CODE>BZ_STREAM_END</CODE> but before <CODE>BZ2_bzReadClose</CODE>.
13622 -</P><P>
13623 -
13624 -Possible assignments to <CODE>bzerror</CODE>:
13625 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">      <CODE>BZ_PARAM_ERROR</CODE> 
13626 -         if <CODE>b</CODE> is <CODE>NULL</CODE> 
13627 -         or <CODE>unused</CODE> is <CODE>NULL</CODE> or <CODE>nUnused</CODE> is <CODE>NULL</CODE>
13628 -      <CODE>BZ_SEQUENCE_ERROR</CODE> 
13629 -         if <CODE>BZ_STREAM_END</CODE> has not been signalled
13630 -         or if <CODE>b</CODE> was opened with <CODE>BZ2_bzWriteOpen</CODE>
13631 -     <CODE>BZ_OK</CODE>
13632 -         otherwise
13633 -</pre></td></tr></table></P><P>
13634 -
13635 -Allowable next actions:
13636 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">      <CODE>BZ2_bzReadClose</CODE>
13637 -</pre></td></tr></table></P><P>
13638 -
13639 -<HR SIZE="6">
13640 -<A NAME="SEC29"></A>
13641 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
13642 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC28"> &lt; </A>]</TD>
13643 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC30"> &gt; </A>]</TD>
13644 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
13645 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
13646 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
13647 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
13648 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
13649 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
13650 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
13651 -</TR></TABLE>
13652 -<H3> 3.4.4 <CODE>BZ2_bzReadClose</CODE> </H3>
13653 -<!--docid::SEC29::-->
13654 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>   void BZ2_bzReadClose ( int *bzerror, BZFILE *b );
13655 -</pre></td></tr></table>Releases all memory pertaining to the compressed file <CODE>b</CODE>.  
13656 -<CODE>BZ2_bzReadClose</CODE> does not call <CODE>fclose</CODE> on the underlying file
13657 -handle, so you should do that yourself if appropriate.
13658 -<CODE>BZ2_bzReadClose</CODE> should be called to clean up after all error
13659 -situations.
13660 -<P>
13661 -
13662 -Possible assignments to <CODE>bzerror</CODE>:
13663 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">      <CODE>BZ_SEQUENCE_ERROR</CODE> 
13664 -         if <CODE>b</CODE> was opened with <CODE>BZ2_bzOpenWrite</CODE> 
13665 -      <CODE>BZ_OK</CODE> 
13666 -         otherwise
13667 -</pre></td></tr></table></P><P>
13668 -
13669 -Allowable next actions:
13670 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">      none
13671 -</pre></td></tr></table></P><P>
13672 -
13673 -<HR SIZE="6">
13674 -<A NAME="SEC30"></A>
13675 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
13676 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC29"> &lt; </A>]</TD>
13677 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC31"> &gt; </A>]</TD>
13678 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
13679 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
13680 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
13681 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
13682 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
13683 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
13684 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
13685 -</TR></TABLE>
13686 -<H3> 3.4.5 <CODE>BZ2_bzWriteOpen</CODE> </H3>
13687 -<!--docid::SEC30::-->
13688 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>   BZFILE *BZ2_bzWriteOpen ( int *bzerror, FILE *f, 
13689 -                             int blockSize100k, int verbosity,
13690 -                             int workFactor );
13691 -</pre></td></tr></table>Prepare to write compressed data to file handle <CODE>f</CODE>.  
13692 -<CODE>f</CODE> should refer to
13693 -a file which has been opened for writing, and for which the error
13694 -indicator (<CODE>ferror(f)</CODE>)is not set.  
13695 -<P>
13696 -
13697 -For the meaning of parameters <CODE>blockSize100k</CODE>,
13698 -<CODE>verbosity</CODE> and <CODE>workFactor</CODE>, see
13699 -<BR> <CODE>BZ2_bzCompressInit</CODE>.
13700 -</P><P>
13701 -
13702 -All required memory is allocated at this stage, so if the call
13703 -completes successfully, <CODE>BZ_MEM_ERROR</CODE> cannot be signalled by a
13704 -subsequent call to <CODE>BZ2_bzWrite</CODE>.
13705 -</P><P>
13706 -
13707 -Possible assignments to <CODE>bzerror</CODE>:
13708 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">      <CODE>BZ_CONFIG_ERROR</CODE>
13709 -         if the library has been mis-compiled
13710 -      <CODE>BZ_PARAM_ERROR</CODE> 
13711 -         if <CODE>f</CODE> is <CODE>NULL</CODE> 
13712 -         or <CODE>blockSize100k &#60; 1</CODE> or <CODE>blockSize100k &#62; 9</CODE>
13713 -      <CODE>BZ_IO_ERROR</CODE> 
13714 -         if <CODE>ferror(f)</CODE> is nonzero
13715 -      <CODE>BZ_MEM_ERROR</CODE> 
13716 -         if insufficient memory is available
13717 -      <CODE>BZ_OK</CODE> 
13718 -         otherwise
13719 -</pre></td></tr></table></P><P>
13720 -
13721 -Possible return values:
13722 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">      Pointer to an abstract <CODE>BZFILE</CODE>  
13723 -         if <CODE>bzerror</CODE> is <CODE>BZ_OK</CODE>   
13724 -      <CODE>NULL</CODE> 
13725 -         otherwise
13726 -</pre></td></tr></table></P><P>
13727 -
13728 -Allowable next actions:
13729 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">      <CODE>BZ2_bzWrite</CODE> 
13730 -         if <CODE>bzerror</CODE> is <CODE>BZ_OK</CODE> 
13731 -         (you could go directly to <CODE>BZ2_bzWriteClose</CODE>, but this would be pretty pointless)
13732 -      <CODE>BZ2_bzWriteClose</CODE> 
13733 -         otherwise
13734 -</pre></td></tr></table></P><P>
13735 -
13736 -<HR SIZE="6">
13737 -<A NAME="SEC31"></A>
13738 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
13739 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC30"> &lt; </A>]</TD>
13740 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC32"> &gt; </A>]</TD>
13741 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
13742 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
13743 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
13744 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
13745 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
13746 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
13747 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
13748 -</TR></TABLE>
13749 -<H3> 3.4.6 <CODE>BZ2_bzWrite</CODE> </H3>
13750 -<!--docid::SEC31::-->
13751 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>   void BZ2_bzWrite ( int *bzerror, BZFILE *b, void *buf, int len );
13752 -</pre></td></tr></table>Absorbs <CODE>len</CODE> bytes from the buffer <CODE>buf</CODE>, eventually to be
13753 -compressed and written to the file.
13754 -<P>
13755 -
13756 -Possible assignments to <CODE>bzerror</CODE>:
13757 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">      <CODE>BZ_PARAM_ERROR</CODE> 
13758 -         if <CODE>b</CODE> is <CODE>NULL</CODE> or <CODE>buf</CODE> is <CODE>NULL</CODE> or <CODE>len &#60; 0</CODE>
13759 -      <CODE>BZ_SEQUENCE_ERROR</CODE> 
13760 -         if b was opened with <CODE>BZ2_bzReadOpen</CODE>
13761 -      <CODE>BZ_IO_ERROR</CODE> 
13762 -         if there is an error writing the compressed file.
13763 -      <CODE>BZ_OK</CODE> 
13764 -         otherwise
13765 -</pre></td></tr></table></P><P>
13766 -
13767 -<HR SIZE="6">
13768 -<A NAME="SEC32"></A>
13769 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
13770 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC31"> &lt; </A>]</TD>
13771 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC33"> &gt; </A>]</TD>
13772 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
13773 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
13774 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
13775 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
13776 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
13777 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
13778 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
13779 -</TR></TABLE>
13780 -<H3> 3.4.7 <CODE>BZ2_bzWriteClose</CODE> </H3>
13781 -<!--docid::SEC32::-->
13782 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>   void BZ2_bzWriteClose ( int *bzerror, BZFILE* f,
13783 -                           int abandon,
13784 -                           unsigned int* nbytes_in,
13785 -                           unsigned int* nbytes_out );
13786 -
13787 -   void BZ2_bzWriteClose64 ( int *bzerror, BZFILE* f,
13788 -                             int abandon,
13789 -                             unsigned int* nbytes_in_lo32,
13790 -                             unsigned int* nbytes_in_hi32,
13791 -                             unsigned int* nbytes_out_lo32,
13792 -                             unsigned int* nbytes_out_hi32 );
13793 -</pre></td></tr></table><P>
13794 -
13795 -Compresses and flushes to the compressed file all data so far supplied
13796 -by <CODE>BZ2_bzWrite</CODE>.  The logical end-of-stream markers are also written, so
13797 -subsequent calls to <CODE>BZ2_bzWrite</CODE> are illegal.  All memory associated 
13798 -with the compressed file <CODE>b</CODE> is released.  
13799 -<CODE>fflush</CODE> is called on the
13800 -compressed file, but it is not <CODE>fclose</CODE>'d.
13801 -</P><P>
13802 -
13803 -If <CODE>BZ2_bzWriteClose</CODE> is called to clean up after an error, the only
13804 -action is to release the memory.  The library records the error codes
13805 -issued by previous calls, so this situation will be detected
13806 -automatically.  There is no attempt to complete the compression
13807 -operation, nor to <CODE>fflush</CODE> the compressed file.  You can force this
13808 -behaviour to happen even in the case of no error, by passing a nonzero
13809 -value to <CODE>abandon</CODE>.
13810 -</P><P>
13811 -
13812 -If <CODE>nbytes_in</CODE> is non-null, <CODE>*nbytes_in</CODE> will be set to be the
13813 -total volume of uncompressed data handled.  Similarly, <CODE>nbytes_out</CODE>
13814 -will be set to the total volume of compressed data written.  For 
13815 -compatibility with older versions of the library, <CODE>BZ2_bzWriteClose</CODE>
13816 -only yields the lower 32 bits of these counts.  Use
13817 -<CODE>BZ2_bzWriteClose64</CODE> if you want the full 64 bit counts.  These
13818 -two functions are otherwise absolutely identical.
13819 -</P><P>
13820 -
13821 -Possible assignments to <CODE>bzerror</CODE>:
13822 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">      <CODE>BZ_SEQUENCE_ERROR</CODE> 
13823 -         if <CODE>b</CODE> was opened with <CODE>BZ2_bzReadOpen</CODE>
13824 -      <CODE>BZ_IO_ERROR</CODE> 
13825 -         if there is an error writing the compressed file
13826 -      <CODE>BZ_OK</CODE> 
13827 -         otherwise
13828 -</pre></td></tr></table></P><P>
13829 -
13830 -<HR SIZE="6">
13831 -<A NAME="SEC33"></A>
13832 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
13833 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC32"> &lt; </A>]</TD>
13834 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC34"> &gt; </A>]</TD>
13835 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
13836 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
13837 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
13838 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
13839 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
13840 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
13841 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
13842 -</TR></TABLE>
13843 -<H3> 3.4.8 Handling embedded compressed data streams </H3>
13844 -<!--docid::SEC33::-->
13845 -<P>
13846 -
13847 -The high-level library facilitates use of
13848 -<CODE>bzip2</CODE> data streams which form some part of a surrounding, larger
13849 -data stream.
13850 -<UL>
13851 -<LI>For writing, the library takes an open file handle, writes
13852 -compressed data to it, <CODE>fflush</CODE>es it but does not <CODE>fclose</CODE> it.
13853 -The calling application can write its own data before and after the
13854 -compressed data stream, using that same file handle.
13855 -<LI>Reading is more complex, and the facilities are not as general
13856 -as they could be since generality is hard to reconcile with efficiency.
13857 -<CODE>BZ2_bzRead</CODE> reads from the compressed file in blocks of size
13858 -<CODE>BZ_MAX_UNUSED</CODE> bytes, and in doing so probably will overshoot
13859 -the logical end of compressed stream.
13860 -To recover this data once decompression has
13861 -ended, call <CODE>BZ2_bzReadGetUnused</CODE> after the last call of <CODE>BZ2_bzRead</CODE>
13862 -(the one returning <CODE>BZ_STREAM_END</CODE>) but before calling
13863 -<CODE>BZ2_bzReadClose</CODE>.
13864 -</UL>
13865 -<P>
13866 -
13867 -This mechanism makes it easy to decompress multiple <CODE>bzip2</CODE>
13868 -streams placed end-to-end.  As the end of one stream, when <CODE>BZ2_bzRead</CODE>
13869 -returns <CODE>BZ_STREAM_END</CODE>, call <CODE>BZ2_bzReadGetUnused</CODE> to collect the
13870 -unused data (copy it into your own buffer somewhere).  
13871 -That data forms the start of the next compressed stream.
13872 -To start uncompressing that next stream, call <CODE>BZ2_bzReadOpen</CODE> again,
13873 -feeding in the unused data via the <CODE>unused</CODE>/<CODE>nUnused</CODE>
13874 -parameters.
13875 -Keep doing this until <CODE>BZ_STREAM_END</CODE> return coincides with the
13876 -physical end of file (<CODE>feof(f)</CODE>).  In this situation
13877 -<CODE>BZ2_bzReadGetUnused</CODE>
13878 -will of course return no data.
13879 -</P><P>
13880 -
13881 -This should give some feel for how the high-level interface can be used.
13882 -If you require extra flexibility, you'll have to bite the bullet and get
13883 -to grips with the low-level interface.
13884 -</P><P>
13885 -
13886 -<HR SIZE="6">
13887 -<A NAME="SEC34"></A>
13888 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
13889 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC33"> &lt; </A>]</TD>
13890 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC35"> &gt; </A>]</TD>
13891 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
13892 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
13893 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
13894 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
13895 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
13896 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
13897 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
13898 -</TR></TABLE>
13899 -<H3> 3.4.9 Standard file-reading/writing code </H3>
13900 -<!--docid::SEC34::-->
13901 -Here's how you'd write data to a compressed file:
13902 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>FILE*   f;
13903 -BZFILE* b;
13904 -int     nBuf;
13905 -char    buf[ /* whatever size you like */ ];
13906 -int     bzerror;
13907 -int     nWritten;
13908 -
13909 -f = fopen ( "myfile.bz2", "w" );
13910 -if (!f) {
13911 -   /* handle error */
13912 -}
13913 -b = BZ2_bzWriteOpen ( &#38;bzerror, f, 9 );
13914 -if (bzerror != BZ_OK) {
13915 -   BZ2_bzWriteClose ( b );
13916 -   /* handle error */
13917 -}
13918 -
13919 -while ( /* condition */ ) {
13920 -   /* get data to write into buf, and set nBuf appropriately */
13921 -   nWritten = BZ2_bzWrite ( &#38;bzerror, b, buf, nBuf );
13922 -   if (bzerror == BZ_IO_ERROR) { 
13923 -      BZ2_bzWriteClose ( &#38;bzerror, b );
13924 -      /* handle error */
13925 -   }
13926 -}
13927 -
13928 -BZ2_bzWriteClose ( &#38;bzerror, b );
13929 -if (bzerror == BZ_IO_ERROR) {
13930 -   /* handle error */
13931 -}
13932 -</pre></td></tr></table>And to read from a compressed file:
13933 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>FILE*   f;
13934 -BZFILE* b;
13935 -int     nBuf;
13936 -char    buf[ /* whatever size you like */ ];
13937 -int     bzerror;
13938 -int     nWritten;
13939 -
13940 -f = fopen ( "myfile.bz2", "r" );
13941 -if (!f) {
13942 -   /* handle error */
13943 -}
13944 -b = BZ2_bzReadOpen ( &#38;bzerror, f, 0, NULL, 0 );
13945 -if (bzerror != BZ_OK) {
13946 -   BZ2_bzReadClose ( &#38;bzerror, b );
13947 -   /* handle error */
13948 -}
13949 -
13950 -bzerror = BZ_OK;
13951 -while (bzerror == BZ_OK &#38;&#38; /* arbitrary other conditions */) {
13952 -   nBuf = BZ2_bzRead ( &#38;bzerror, b, buf, /* size of buf */ );
13953 -   if (bzerror == BZ_OK) {
13954 -      /* do something with buf[0 .. nBuf-1] */
13955 -   }
13956 -}
13957 -if (bzerror != BZ_STREAM_END) {
13958 -   BZ2_bzReadClose ( &#38;bzerror, b );
13959 -   /* handle error */
13960 -} else {
13961 -   BZ2_bzReadClose ( &#38;bzerror );
13962 -}
13963 -</pre></td></tr></table><P>
13964 -
13965 -<HR SIZE="6">
13966 -<A NAME="SEC35"></A>
13967 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
13968 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC34"> &lt; </A>]</TD>
13969 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC36"> &gt; </A>]</TD>
13970 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
13971 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
13972 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
13973 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
13974 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
13975 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
13976 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
13977 -</TR></TABLE>
13978 -<H2> 3.5 Utility functions </H2>
13979 -<!--docid::SEC35::-->
13980 -<HR SIZE="6">
13981 -<A NAME="SEC36"></A>
13982 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
13983 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC35"> &lt; </A>]</TD>
13984 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC37"> &gt; </A>]</TD>
13985 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
13986 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
13987 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
13988 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
13989 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
13990 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
13991 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
13992 -</TR></TABLE>
13993 -<H3> 3.5.1 <CODE>BZ2_bzBuffToBuffCompress</CODE> </H3>
13994 -<!--docid::SEC36::-->
13995 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>   int BZ2_bzBuffToBuffCompress( char*         dest,
13996 -                                 unsigned int* destLen,
13997 -                                 char*         source,
13998 -                                 unsigned int  sourceLen,
13999 -                                 int           blockSize100k,
14000 -                                 int           verbosity,
14001 -                                 int           workFactor );
14002 -</pre></td></tr></table>Attempts to compress the data in <CODE>source[0 .. sourceLen-1]</CODE>
14003 -into the destination buffer, <CODE>dest[0 .. *destLen-1]</CODE>.
14004 -If the destination buffer is big enough, <CODE>*destLen</CODE> is
14005 -set to the size of the compressed data, and <CODE>BZ_OK</CODE> is
14006 -returned.  If the compressed data won't fit, <CODE>*destLen</CODE>
14007 -is unchanged, and <CODE>BZ_OUTBUFF_FULL</CODE> is returned.
14008 -<P>
14009 -
14010 -Compression in this manner is a one-shot event, done with a single call
14011 -to this function.  The resulting compressed data is a complete
14012 -<CODE>bzip2</CODE> format data stream.  There is no mechanism for making
14013 -additional calls to provide extra input data.  If you want that kind of
14014 -mechanism, use the low-level interface.
14015 -</P><P>
14016 -
14017 -For the meaning of parameters <CODE>blockSize100k</CODE>, <CODE>verbosity</CODE>
14018 -and <CODE>workFactor</CODE>, <BR> see <CODE>BZ2_bzCompressInit</CODE>.
14019 -</P><P>
14020 -
14021 -To guarantee that the compressed data will fit in its buffer, allocate
14022 -an output buffer of size 1% larger than the uncompressed data, plus
14023 -six hundred extra bytes.
14024 -</P><P>
14025 -
14026 -<CODE>BZ2_bzBuffToBuffDecompress</CODE> will not write data at or
14027 -beyond <CODE>dest[*destLen]</CODE>, even in case of buffer overflow.
14028 -</P><P>
14029 -
14030 -Possible return values:
14031 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">      <CODE>BZ_CONFIG_ERROR</CODE>
14032 -         if the library has been mis-compiled
14033 -      <CODE>BZ_PARAM_ERROR</CODE> 
14034 -         if <CODE>dest</CODE> is <CODE>NULL</CODE> or <CODE>destLen</CODE> is <CODE>NULL</CODE>
14035 -         or <CODE>blockSize100k &#60; 1</CODE> or <CODE>blockSize100k &#62; 9</CODE>
14036 -         or <CODE>verbosity &#60; 0</CODE> or <CODE>verbosity &#62; 4</CODE> 
14037 -         or <CODE>workFactor &#60; 0</CODE> or <CODE>workFactor &#62; 250</CODE>
14038 -      <CODE>BZ_MEM_ERROR</CODE>
14039 -         if insufficient memory is available 
14040 -      <CODE>BZ_OUTBUFF_FULL</CODE>
14041 -         if the size of the compressed data exceeds <CODE>*destLen</CODE>
14042 -      <CODE>BZ_OK</CODE> 
14043 -         otherwise
14044 -</pre></td></tr></table></P><P>
14045 -
14046 -<HR SIZE="6">
14047 -<A NAME="SEC37"></A>
14048 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
14049 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC36"> &lt; </A>]</TD>
14050 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC38"> &gt; </A>]</TD>
14051 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
14052 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
14053 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
14054 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
14055 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
14056 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
14057 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
14058 -</TR></TABLE>
14059 -<H3> 3.5.2 <CODE>BZ2_bzBuffToBuffDecompress</CODE> </H3>
14060 -<!--docid::SEC37::-->
14061 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>   int BZ2_bzBuffToBuffDecompress ( char*         dest,
14062 -                                    unsigned int* destLen,
14063 -                                    char*         source,
14064 -                                    unsigned int  sourceLen,
14065 -                                    int           small,
14066 -                                    int           verbosity );
14067 -</pre></td></tr></table>Attempts to decompress the data in <CODE>source[0 .. sourceLen-1]</CODE>
14068 -into the destination buffer, <CODE>dest[0 .. *destLen-1]</CODE>.
14069 -If the destination buffer is big enough, <CODE>*destLen</CODE> is
14070 -set to the size of the uncompressed data, and <CODE>BZ_OK</CODE> is
14071 -returned.  If the compressed data won't fit, <CODE>*destLen</CODE>
14072 -is unchanged, and <CODE>BZ_OUTBUFF_FULL</CODE> is returned.
14073 -<P>
14074 -
14075 -<CODE>source</CODE> is assumed to hold a complete <CODE>bzip2</CODE> format
14076 -data stream.  <BR> <CODE>BZ2_bzBuffToBuffDecompress</CODE> tries to decompress
14077 -the entirety of the stream into the output buffer.
14078 -</P><P>
14079 -
14080 -For the meaning of parameters <CODE>small</CODE> and <CODE>verbosity</CODE>,
14081 -see <CODE>BZ2_bzDecompressInit</CODE>.
14082 -</P><P>
14083 -
14084 -Because the compression ratio of the compressed data cannot be known in
14085 -advance, there is no easy way to guarantee that the output buffer will
14086 -be big enough.  You may of course make arrangements in your code to
14087 -record the size of the uncompressed data, but such a mechanism is beyond
14088 -the scope of this library.
14089 -</P><P>
14090 -
14091 -<CODE>BZ2_bzBuffToBuffDecompress</CODE> will not write data at or
14092 -beyond <CODE>dest[*destLen]</CODE>, even in case of buffer overflow.
14093 -</P><P>
14094 -
14095 -Possible return values:
14096 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">      <CODE>BZ_CONFIG_ERROR</CODE>
14097 -         if the library has been mis-compiled
14098 -      <CODE>BZ_PARAM_ERROR</CODE> 
14099 -         if <CODE>dest</CODE> is <CODE>NULL</CODE> or <CODE>destLen</CODE> is <CODE>NULL</CODE>
14100 -         or <CODE>small != 0 &#38;&#38; small != 1</CODE>
14101 -         or <CODE>verbosity &#60; 0</CODE> or <CODE>verbosity &#62; 4</CODE> 
14102 -      <CODE>BZ_MEM_ERROR</CODE>
14103 -         if insufficient memory is available 
14104 -      <CODE>BZ_OUTBUFF_FULL</CODE>
14105 -         if the size of the compressed data exceeds <CODE>*destLen</CODE>
14106 -      <CODE>BZ_DATA_ERROR</CODE>
14107 -         if a data integrity error was detected in the compressed data
14108 -      <CODE>BZ_DATA_ERROR_MAGIC</CODE>
14109 -         if the compressed data doesn't begin with the right magic bytes
14110 -      <CODE>BZ_UNEXPECTED_EOF</CODE>
14111 -         if the compressed data ends unexpectedly
14112 -      <CODE>BZ_OK</CODE> 
14113 -         otherwise
14114 -</pre></td></tr></table></P><P>
14115 -
14116 -<HR SIZE="6">
14117 -<A NAME="SEC38"></A>
14118 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
14119 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC37"> &lt; </A>]</TD>
14120 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC39"> &gt; </A>]</TD>
14121 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
14122 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
14123 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
14124 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
14125 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
14126 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
14127 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
14128 -</TR></TABLE>
14129 -<H2> 3.6 <CODE>zlib</CODE> compatibility functions </H2>
14130 -<!--docid::SEC38::-->
14131 -Yoshioka Tsuneo has contributed some functions to
14132 -give better <CODE>zlib</CODE> compatibility.  These functions are
14133 -<CODE>BZ2_bzopen</CODE>, <CODE>BZ2_bzread</CODE>, <CODE>BZ2_bzwrite</CODE>, <CODE>BZ2_bzflush</CODE>,
14134 -<CODE>BZ2_bzclose</CODE>,
14135 -<CODE>BZ2_bzerror</CODE> and <CODE>BZ2_bzlibVersion</CODE>.
14136 -These functions are not (yet) officially part of
14137 -the library.  If they break, you get to keep all the pieces.
14138 -Nevertheless, I think they work ok.
14139 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>typedef void BZFILE;
14140 -
14141 -const char * BZ2_bzlibVersion ( void );
14142 -</pre></td></tr></table>Returns a string indicating the library version.
14143 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>BZFILE * BZ2_bzopen  ( const char *path, const char *mode );
14144 -BZFILE * BZ2_bzdopen ( int        fd,    const char *mode );
14145 -</pre></td></tr></table>Opens a <CODE>.bz2</CODE> file for reading or writing, using either its name
14146 -or a pre-existing file descriptor. 
14147 -Analogous to <CODE>fopen</CODE> and <CODE>fdopen</CODE>.
14148 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>int BZ2_bzread  ( BZFILE* b, void* buf, int len );
14149 -int BZ2_bzwrite ( BZFILE* b, void* buf, int len );
14150 -</pre></td></tr></table>Reads/writes data from/to a previously opened <CODE>BZFILE</CODE>.
14151 -Analogous to <CODE>fread</CODE> and <CODE>fwrite</CODE>.
14152 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>int  BZ2_bzflush ( BZFILE* b );
14153 -void BZ2_bzclose ( BZFILE* b );
14154 -</pre></td></tr></table>Flushes/closes a <CODE>BZFILE</CODE>.  <CODE>BZ2_bzflush</CODE> doesn't actually do
14155 -anything.  Analogous to <CODE>fflush</CODE> and <CODE>fclose</CODE>.
14156 -<P>
14157 -
14158 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>const char * BZ2_bzerror ( BZFILE *b, int *errnum )
14159 -</pre></td></tr></table>Returns a string describing the more recent error status of
14160 -<CODE>b</CODE>, and also sets <CODE>*errnum</CODE> to its numerical value.
14161 -</P><P>
14162 -
14163 -<HR SIZE="6">
14164 -<A NAME="SEC39"></A>
14165 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
14166 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC38"> &lt; </A>]</TD>
14167 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC40"> &gt; </A>]</TD>
14168 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
14169 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
14170 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
14171 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
14172 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
14173 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
14174 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
14175 -</TR></TABLE>
14176 -<H2> 3.7 Using the library in a <CODE>stdio</CODE>-free environment </H2>
14177 -<!--docid::SEC39::-->
14178 -<P>
14179 -
14180 -<HR SIZE="6">
14181 -<A NAME="SEC40"></A>
14182 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
14183 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC39"> &lt; </A>]</TD>
14184 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC41"> &gt; </A>]</TD>
14185 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
14186 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
14187 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
14188 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
14189 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
14190 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
14191 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
14192 -</TR></TABLE>
14193 -<H3> 3.7.1 Getting rid of <CODE>stdio</CODE> </H3>
14194 -<!--docid::SEC40::-->
14195 -<P>
14196 -
14197 -In a deeply embedded application, you might want to use just
14198 -the memory-to-memory functions.  You can do this conveniently
14199 -by compiling the library with preprocessor symbol <CODE>BZ_NO_STDIO</CODE>
14200 -defined.  Doing this gives you a library containing only the following
14201 -eight functions:
14202 -</P><P>
14203 -
14204 -<CODE>BZ2_bzCompressInit</CODE>, <CODE>BZ2_bzCompress</CODE>, <CODE>BZ2_bzCompressEnd</CODE> <BR>
14205 -<CODE>BZ2_bzDecompressInit</CODE>, <CODE>BZ2_bzDecompress</CODE>, <CODE>BZ2_bzDecompressEnd</CODE> <BR>
14206 -<CODE>BZ2_bzBuffToBuffCompress</CODE>, <CODE>BZ2_bzBuffToBuffDecompress</CODE>
14207 -</P><P>
14208 -
14209 -When compiled like this, all functions will ignore <CODE>verbosity</CODE>
14210 -settings.
14211 -</P><P>
14212 -
14213 -<HR SIZE="6">
14214 -<A NAME="SEC41"></A>
14215 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
14216 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC40"> &lt; </A>]</TD>
14217 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC42"> &gt; </A>]</TD>
14218 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
14219 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
14220 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
14221 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
14222 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
14223 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
14224 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
14225 -</TR></TABLE>
14226 -<H3> 3.7.2 Critical error handling </H3>
14227 -<!--docid::SEC41::-->
14228 -<CODE>libbzip2</CODE> contains a number of internal assertion checks which
14229 -should, needless to say, never be activated.  Nevertheless, if an
14230 -assertion should fail, behaviour depends on whether or not the library
14231 -was compiled with <CODE>BZ_NO_STDIO</CODE> set.
14232 -<P>
14233 -
14234 -For a normal compile, an assertion failure yields the message
14235 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>   bzip2/libbzip2: internal error number N.
14236 -   This is a bug in bzip2/libbzip2, 1.0.2, 30-Dec-2001.
14237 -   Please report it to me at: jseward@acm.org.  If this happened
14238 -   when you were using some program which uses libbzip2 as a
14239 -   component, you should also report this bug to the author(s)
14240 -   of that program.  Please make an effort to report this bug;
14241 -   timely and accurate bug reports eventually lead to higher
14242 -   quality software.  Thanks.  Julian Seward, 30 December 2001.
14243 -</pre></td></tr></table>where <CODE>N</CODE> is some error code number.  If <CODE>N == 1007</CODE>, it also
14244 -prints some extra text advising the reader that unreliable memory is
14245 -often associated with internal error 1007.  (This is a
14246 -frequently-observed-phenomenon with versions 1.0.0/1.0.1).
14247 -</P><P>
14248 -
14249 -<CODE>exit(3)</CODE> is then called.
14250 -</P><P>
14251 -
14252 -For a <CODE>stdio</CODE>-free library, assertion failures result
14253 -in a call to a function declared as:
14254 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>   extern void bz_internal_error ( int errcode );
14255 -</pre></td></tr></table>The relevant code is passed as a parameter.  You should supply
14256 -such a function.
14257 -</P><P>
14258 -
14259 -In either case, once an assertion failure has occurred, any 
14260 -<CODE>bz_stream</CODE> records involved can be regarded as invalid.
14261 -You should not attempt to resume normal operation with them.
14262 -</P><P>
14263 -
14264 -You may, of course, change critical error handling to suit
14265 -your needs.  As I said above, critical errors indicate bugs
14266 -in the library and should not occur.  All "normal" error
14267 -situations are indicated via error return codes from functions,
14268 -and can be recovered from.
14269 -</P><P>
14270 -
14271 -<HR SIZE="6">
14272 -<A NAME="SEC42"></A>
14273 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
14274 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC41"> &lt; </A>]</TD>
14275 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_4.html#SEC43"> &gt; </A>]</TD>
14276 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
14277 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
14278 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
14279 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
14280 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
14281 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
14282 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
14283 -</TR></TABLE>
14284 -<H2> 3.8 Making a Windows DLL </H2>
14285 -<!--docid::SEC42::-->
14286 -Everything related to Windows has been contributed by Yoshioka Tsuneo
14287 -<BR> (<CODE>QWF00133@niftyserve.or.jp</CODE> /
14288 -<CODE>tsuneo-y@is.aist-nara.ac.jp</CODE>), so you should send your queries to
14289 -him (but perhaps Cc: me, <CODE>jseward@acm.org</CODE>).
14290 -<P>
14291 -
14292 -My vague understanding of what to do is: using Visual C++ 5.0,
14293 -open the project file <CODE>libbz2.dsp</CODE>, and build.  That's all.
14294 -</P><P>
14295 -
14296 -If you can't
14297 -open the project file for some reason, make a new one, naming these files:
14298 -<CODE>blocksort.c</CODE>, <CODE>bzlib.c</CODE>, <CODE>compress.c</CODE>, 
14299 -<CODE>crctable.c</CODE>, <CODE>decompress.c</CODE>, <CODE>huffman.c</CODE>, <BR>
14300 -<CODE>randtable.c</CODE> and <CODE>libbz2.def</CODE>.  You will also need
14301 -to name the header files <CODE>bzlib.h</CODE> and <CODE>bzlib_private.h</CODE>.
14302 -</P><P>
14303 -
14304 -If you don't use VC++, you may need to define the proprocessor symbol
14305 -<CODE>_WIN32</CODE>. 
14306 -</P><P>
14307 -
14308 -Finally, <CODE>dlltest.c</CODE> is a sample program using the DLL.  It has a
14309 -project file, <CODE>dlltest.dsp</CODE>.
14310 -</P><P>
14311 -
14312 -If you just want a makefile for Visual C, have a look at
14313 -<CODE>makefile.msc</CODE>.
14314 -</P><P>
14315 -
14316 -Be aware that if you compile <CODE>bzip2</CODE> itself on Win32, you must set
14317 -<CODE>BZ_UNIX</CODE> to 0 and <CODE>BZ_LCCWIN32</CODE> to 1, in the file
14318 -<CODE>bzip2.c</CODE>, before compiling.  Otherwise the resulting binary won't
14319 -work correctly.
14320 -</P><P>
14321 -
14322 -I haven't tried any of this stuff myself, but it all looks plausible.
14323 -</P><P>
14324 -
14325 -<HR SIZE="6">
14326 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
14327 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
14328 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
14329 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
14330 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
14331 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
14332 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
14333 -</TR></TABLE>
14334 -<BR>  
14335 -<FONT SIZE="-1">
14336 -This document was generated
14337 -by <I>Julian Seward</I> on <I>January, 5  2002</I>
14338 -using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
14339 -"><I>texi2html</I></A>
14340 -
14341 -</BODY>
14342 -</HTML>
14343 diff -Nru bzip2-1.0.2/manual_4.html bzip2-1.0.2.new/manual_4.html
14344 --- bzip2-1.0.2/manual_4.html   Sat Jan  5 01:53:05 2002
14345 +++ bzip2-1.0.2.new/manual_4.html       Thu Jan  1 01:00:00 1970
14346 @@ -1,530 +0,0 @@
14347 -<HTML>
14348 -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
14349 -<!-- Created on January, 5  2002 by texi2html 1.64 -->
14350 -<!-- 
14351 -Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
14352 -            Karl Berry  <karl@freefriends.org>
14353 -            Olaf Bachmann <obachman@mathematik.uni-kl.de>
14354 -            and many others.
14355 -Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
14356 -Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
14357
14358 --->
14359 -<HEAD>
14360 -<TITLE>Untitled Document: 4. Miscellanea</TITLE>
14361 -
14362 -<META NAME="description" CONTENT="Untitled Document: 4. Miscellanea">
14363 -<META NAME="keywords" CONTENT="Untitled Document: 4. Miscellanea">
14364 -<META NAME="resource-type" CONTENT="document">
14365 -<META NAME="distribution" CONTENT="global">
14366 -<META NAME="Generator" CONTENT="texi2html 1.64">
14367 -
14368 -</HEAD>
14369 -
14370 -<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
14371 -
14372 -<A NAME="SEC43"></A>
14373 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
14374 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC42"> &lt; </A>]</TD>
14375 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_4.html#SEC44"> &gt; </A>]</TD>
14376 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
14377 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
14378 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
14379 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
14380 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
14381 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
14382 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
14383 -</TR></TABLE>
14384 -<H1> 4. Miscellanea </H1>
14385 -<!--docid::SEC43::-->
14386 -<P>
14387 -
14388 -These are just some random thoughts of mine.  Your mileage may
14389 -vary.
14390 -</P><P>
14391 -
14392 -<HR SIZE="6">
14393 -<A NAME="SEC44"></A>
14394 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
14395 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_4.html#SEC43"> &lt; </A>]</TD>
14396 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_4.html#SEC45"> &gt; </A>]</TD>
14397 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
14398 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
14399 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
14400 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
14401 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
14402 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
14403 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
14404 -</TR></TABLE>
14405 -<H2> 4.1 Limitations of the compressed file format </H2>
14406 -<!--docid::SEC44::-->
14407 -<CODE>bzip2-1.0</CODE>, <CODE>0.9.5</CODE> and <CODE>0.9.0</CODE>
14408 -use exactly the same file format as the previous
14409 -version, <CODE>bzip2-0.1</CODE>.  This decision was made in the interests of
14410 -stability.  Creating yet another incompatible compressed file format
14411 -would create further confusion and disruption for users.
14412 -<P>
14413 -
14414 -Nevertheless, this is not a painless decision.  Development
14415 -work since the release of <CODE>bzip2-0.1</CODE> in August 1997
14416 -has shown complexities in the file format which slow down
14417 -decompression and, in retrospect, are unnecessary.  These are:
14418 -<UL>
14419 -<LI>The run-length encoder, which is the first of the
14420 -      compression transformations, is entirely irrelevant.
14421 -      The original purpose was to protect the sorting algorithm
14422 -      from the very worst case input: a string of repeated
14423 -      symbols.  But algorithm steps Q6a and Q6b in the original
14424 -      Burrows-Wheeler technical report (SRC-124) show how
14425 -      repeats can be handled without difficulty in block
14426 -      sorting.
14427 -<LI>The randomisation mechanism doesn't really need to be
14428 -      there.  Udi Manber and Gene Myers published a suffix
14429 -      array construction algorithm a few years back, which
14430 -      can be employed to sort any block, no matter how 
14431 -      repetitive, in O(N log N) time.  Subsequent work by
14432 -      Kunihiko Sadakane has produced a derivative O(N (log N)^2) 
14433 -      algorithm which usually outperforms the Manber-Myers
14434 -      algorithm.
14435 -<P>
14436 -
14437 -      I could have changed to Sadakane's algorithm, but I find
14438 -      it to be slower than <CODE>bzip2</CODE>'s existing algorithm for
14439 -      most inputs, and the randomisation mechanism protects
14440 -      adequately against bad cases.  I didn't think it was
14441 -      a good tradeoff to make.  Partly this is due to the fact
14442 -      that I was not flooded with email complaints about
14443 -      <CODE>bzip2-0.1</CODE>'s performance on repetitive data, so
14444 -      perhaps it isn't a problem for real inputs.
14445 -</P><P>
14446 -
14447 -      Probably the best long-term solution,
14448 -      and the one I have incorporated into 0.9.5 and above,
14449 -      is to use the existing sorting
14450 -      algorithm initially, and fall back to a O(N (log N)^2)
14451 -      algorithm if the standard algorithm gets into difficulties.
14452 -<LI>The compressed file format was never designed to be
14453 -      handled by a library, and I have had to jump though
14454 -      some hoops to produce an efficient implementation of
14455 -      decompression.  It's a bit hairy.  Try passing
14456 -      <CODE>decompress.c</CODE> through the C preprocessor 
14457 -      and you'll see what I mean.  Much of this complexity
14458 -      could have been avoided if the compressed size of
14459 -      each block of data was recorded in the data stream.
14460 -<LI>An Adler-32 checksum, rather than a CRC32 checksum,
14461 -      would be faster to compute.
14462 -</UL>
14463 -It would be fair to say that the <CODE>bzip2</CODE> format was frozen
14464 -before I properly and fully understood the performance
14465 -consequences of doing so.
14466 -<P>
14467 -
14468 -Improvements which I was able to incorporate into
14469 -0.9.0, despite using the same file format, are:
14470 -<UL>
14471 -<LI>Single array implementation of the inverse BWT.  This
14472 -      significantly speeds up decompression, presumably
14473 -      because it reduces the number of cache misses.
14474 -<LI>Faster inverse MTF transform for large MTF values.  The
14475 -      new implementation is based on the notion of sliding blocks
14476 -      of values.
14477 -<LI><CODE>bzip2-0.9.0</CODE> now reads and writes files with <CODE>fread</CODE>
14478 -      and <CODE>fwrite</CODE>; version 0.1 used <CODE>putc</CODE> and <CODE>getc</CODE>.
14479 -      Duh!  Well, you live and learn.
14480 -<P>
14481 -
14482 -</UL>
14483 -Further ahead, it would be nice 
14484 -to be able to do random access into files.  This will 
14485 -require some careful design of compressed file formats.
14486 -<P>
14487 -
14488 -<HR SIZE="6">
14489 -<A NAME="SEC45"></A>
14490 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
14491 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_4.html#SEC44"> &lt; </A>]</TD>
14492 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_4.html#SEC46"> &gt; </A>]</TD>
14493 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
14494 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
14495 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
14496 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
14497 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
14498 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
14499 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
14500 -</TR></TABLE>
14501 -<H2> 4.2 Portability issues </H2>
14502 -<!--docid::SEC45::-->
14503 -After some consideration, I have decided not to use
14504 -GNU <CODE>autoconf</CODE> to configure 0.9.5 or 1.0.
14505 -<P>
14506 -
14507 -<CODE>autoconf</CODE>, admirable and wonderful though it is, 
14508 -mainly assists with portability problems between Unix-like
14509 -platforms.  But <CODE>bzip2</CODE> doesn't have much in the way
14510 -of portability problems on Unix; most of the difficulties appear
14511 -when porting to the Mac, or to Microsoft's operating systems.
14512 -<CODE>autoconf</CODE> doesn't help in those cases, and brings in a 
14513 -whole load of new complexity.
14514 -</P><P>
14515 -
14516 -Most people should be able to compile the library and program
14517 -under Unix straight out-of-the-box, so to speak, especially 
14518 -if you have a version of GNU C available.
14519 -</P><P>
14520 -
14521 -There are a couple of <CODE>__inline__</CODE> directives in the code.  GNU C
14522 -(<CODE>gcc</CODE>) should be able to handle them.  If you're not using
14523 -GNU C, your C compiler shouldn't see them at all.
14524 -If your compiler does, for some reason, see them and doesn't
14525 -like them, just <CODE>#define</CODE> <CODE>__inline__</CODE> to be <CODE>/* */</CODE>.  One
14526 -easy way to do this is to compile with the flag <CODE>-D__inline__=</CODE>, 
14527 -which should be understood by most Unix compilers.
14528 -</P><P>
14529 -
14530 -If you still have difficulties, try compiling with the macro
14531 -<CODE>BZ_STRICT_ANSI</CODE> defined.  This should enable you to build the
14532 -library in a strictly ANSI compliant environment.  Building the program
14533 -itself like this is dangerous and not supported, since you remove
14534 -<CODE>bzip2</CODE>'s checks against compressing directories, symbolic links,
14535 -devices, and other not-really-a-file entities.  This could cause
14536 -filesystem corruption!
14537 -</P><P>
14538 -
14539 -One other thing: if you create a <CODE>bzip2</CODE> binary for public
14540 -distribution, please try and link it statically (<CODE>gcc -s</CODE>).  This
14541 -avoids all sorts of library-version issues that others may encounter
14542 -later on.
14543 -</P><P>
14544 -
14545 -If you build <CODE>bzip2</CODE> on Win32, you must set <CODE>BZ_UNIX</CODE> to 0 and
14546 -<CODE>BZ_LCCWIN32</CODE> to 1, in the file <CODE>bzip2.c</CODE>, before compiling.
14547 -Otherwise the resulting binary won't work correctly.
14548 -</P><P>
14549 -
14550 -<HR SIZE="6">
14551 -<A NAME="SEC46"></A>
14552 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
14553 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_4.html#SEC45"> &lt; </A>]</TD>
14554 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_4.html#SEC47"> &gt; </A>]</TD>
14555 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
14556 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
14557 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
14558 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
14559 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
14560 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
14561 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
14562 -</TR></TABLE>
14563 -<H2> 4.3 Reporting bugs </H2>
14564 -<!--docid::SEC46::-->
14565 -I tried pretty hard to make sure <CODE>bzip2</CODE> is
14566 -bug free, both by design and by testing.  Hopefully
14567 -you'll never need to read this section for real.
14568 -<P>
14569 -
14570 -Nevertheless, if <CODE>bzip2</CODE> dies with a segmentation
14571 -fault, a bus error or an internal assertion failure, it
14572 -will ask you to email me a bug report.  Experience with
14573 -version 0.1 shows that almost all these problems can
14574 -be traced to either compiler bugs or hardware problems.
14575 -<UL>
14576 -<LI>
14577 -Recompile the program with no optimisation, and see if it
14578 -works.  And/or try a different compiler.
14579 -I heard all sorts of stories about various flavours
14580 -of GNU C (and other compilers) generating bad code for
14581 -<CODE>bzip2</CODE>, and I've run across two such examples myself.
14582 -<P>
14583 -
14584 -2.7.X versions of GNU C are known to generate bad code from
14585 -time to time, at high optimisation levels.  
14586 -If you get problems, try using the flags
14587 -<CODE>-O2</CODE> <CODE>-fomit-frame-pointer</CODE> <CODE>-fno-strength-reduce</CODE>.
14588 -You should specifically <EM>not</EM> use <CODE>-funroll-loops</CODE>.
14589 -</P><P>
14590 -
14591 -You may notice that the Makefile runs six tests as part of
14592 -the build process.  If the program passes all of these, it's
14593 -a pretty good (but not 100%) indication that the compiler has
14594 -done its job correctly.
14595 -<LI>
14596 -If <CODE>bzip2</CODE> crashes randomly, and the crashes are not
14597 -repeatable, you may have a flaky memory subsystem.  <CODE>bzip2</CODE>
14598 -really hammers your memory hierarchy, and if it's a bit marginal,
14599 -you may get these problems.  Ditto if your disk or I/O subsystem
14600 -is slowly failing.  Yup, this really does happen.
14601 -<P>
14602 -
14603 -Try using a different machine of the same type, and see if
14604 -you can repeat the problem.
14605 -<LI>This isn't really a bug, but ... If <CODE>bzip2</CODE> tells
14606 -you your file is corrupted on decompression, and you
14607 -obtained the file via FTP, there is a possibility that you
14608 -forgot to tell FTP to do a binary mode transfer.  That absolutely
14609 -will cause the file to be non-decompressible.  You'll have to transfer
14610 -it again.
14611 -</UL>
14612 -<P>
14613 -
14614 -If you've incorporated <CODE>libbzip2</CODE> into your own program
14615 -and are getting problems, please, please, please, check that the 
14616 -parameters you are passing in calls to the library, are
14617 -correct, and in accordance with what the documentation says
14618 -is allowable.  I have tried to make the library robust against
14619 -such problems, but I'm sure I haven't succeeded.
14620 -</P><P>
14621 -
14622 -Finally, if the above comments don't help, you'll have to send
14623 -me a bug report.  Now, it's just amazing how many people will 
14624 -send me a bug report saying something like
14625 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">   bzip2 crashed with segmentation fault on my machine
14626 -</pre></td></tr></table>and absolutely nothing else.  Needless to say, a such a report
14627 -is <EM>totally, utterly, completely and comprehensively 100% useless; 
14628 -a waste of your time, my time, and net bandwidth</EM>.
14629 -With no details at all, there's no way I can possibly begin
14630 -to figure out what the problem is.
14631 -</P><P>
14632 -
14633 -The rules of the game are: facts, facts, facts.  Don't omit
14634 -them because "oh, they won't be relevant".  At the bare 
14635 -minimum:
14636 -<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">   Machine type.  Operating system version.  
14637 -   Exact version of <CODE>bzip2</CODE> (do <CODE>bzip2 -V</CODE>).  
14638 -   Exact version of the compiler used.  
14639 -   Flags passed to the compiler.
14640 -</pre></td></tr></table>However, the most important single thing that will help me is
14641 -the file that you were trying to compress or decompress at the
14642 -time the problem happened.  Without that, my ability to do anything
14643 -more than speculate about the cause, is limited.
14644 -</P><P>
14645 -
14646 -Please remember that I connect to the Internet with a modem, so
14647 -you should contact me before mailing me huge files.
14648 -</P><P>
14649 -
14650 -<HR SIZE="6">
14651 -<A NAME="SEC47"></A>
14652 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
14653 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_4.html#SEC46"> &lt; </A>]</TD>
14654 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_4.html#SEC48"> &gt; </A>]</TD>
14655 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
14656 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
14657 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
14658 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
14659 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
14660 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
14661 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
14662 -</TR></TABLE>
14663 -<H2> 4.4 Did you get the right package? </H2>
14664 -<!--docid::SEC47::-->
14665 -<P>
14666 -
14667 -<CODE>bzip2</CODE> is a resource hog.  It soaks up large amounts of CPU cycles
14668 -and memory.  Also, it gives very large latencies.  In the worst case, you
14669 -can feed many megabytes of uncompressed data into the library before
14670 -getting any compressed output, so this probably rules out applications
14671 -requiring interactive behaviour.
14672 -</P><P>
14673 -
14674 -These aren't faults of my implementation, I hope, but more
14675 -an intrinsic property of the Burrows-Wheeler transform (unfortunately).  
14676 -Maybe this isn't what you want.
14677 -</P><P>
14678 -
14679 -If you want a compressor and/or library which is faster, uses less
14680 -memory but gets pretty good compression, and has minimal latency,
14681 -consider Jean-loup
14682 -Gailly's and Mark Adler's work, <CODE>zlib-1.1.3</CODE> and
14683 -<CODE>gzip-1.2.4</CODE>.  Look for them at
14684 -</P><P>
14685 -
14686 -<CODE>http://www.zlib.org</CODE> and
14687 -<CODE>http://www.gzip.org</CODE> respectively.
14688 -</P><P>
14689 -
14690 -For something faster and lighter still, you might try Markus F X J
14691 -Oberhumer's <CODE>LZO</CODE> real-time compression/decompression library, at
14692 -<BR> <CODE>http://wildsau.idv.uni-linz.ac.at/mfx/lzo.html</CODE>.
14693 -</P><P>
14694 -
14695 -If you want to use the <CODE>bzip2</CODE> algorithms to compress small blocks
14696 -of data, 64k bytes or smaller, for example on an on-the-fly disk
14697 -compressor, you'd be well advised not to use this library.  Instead,
14698 -I've made a special library tuned for that kind of use.  It's part of
14699 -<CODE>e2compr-0.40</CODE>, an on-the-fly disk compressor for the Linux
14700 -<CODE>ext2</CODE> filesystem.  Look at
14701 -<CODE>http://www.netspace.net.au/~reiter/e2compr</CODE>.
14702 -</P><P>
14703 -
14704 -<HR SIZE="6">
14705 -<A NAME="SEC48"></A>
14706 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
14707 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_4.html#SEC47"> &lt; </A>]</TD>
14708 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_4.html#SEC49"> &gt; </A>]</TD>
14709 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
14710 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
14711 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
14712 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
14713 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
14714 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
14715 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
14716 -</TR></TABLE>
14717 -<H2> 4.5 Testing </H2>
14718 -<!--docid::SEC48::-->
14719 -<P>
14720 -
14721 -A record of the tests I've done.
14722 -</P><P>
14723 -
14724 -First, some data sets:
14725 -<UL>
14726 -<LI>B: a directory containing 6001 files, one for every length in the
14727 -      range 0 to 6000 bytes.  The files contain random lowercase
14728 -      letters.  18.7 megabytes.
14729 -<LI>H: my home directory tree.  Documents, source code, mail files,
14730 -      compressed data.  H contains B, and also a directory of 
14731 -      files designed as boundary cases for the sorting; mostly very
14732 -      repetitive, nasty files.  565 megabytes.
14733 -<LI>A: directory tree holding various applications built from source:
14734 -      <CODE>egcs</CODE>, <CODE>gcc-2.8.1</CODE>, KDE, GTK, Octave, etc.
14735 -      2200 megabytes.
14736 -</UL>
14737 -The tests conducted are as follows.  Each test means compressing 
14738 -(a copy of) each file in the data set, decompressing it and
14739 -comparing it against the original.
14740 -<P>
14741 -
14742 -First, a bunch of tests with block sizes and internal buffer
14743 -sizes set very small, 
14744 -to detect any problems with the
14745 -blocking and buffering mechanisms.  
14746 -This required modifying the source code so as to try to 
14747 -break it.
14748 -<OL>
14749 -<LI>Data set H, with
14750 -      buffer size of 1 byte, and block size of 23 bytes.
14751 -<LI>Data set B, buffer sizes 1 byte, block size 1 byte.
14752 -<LI>As (2) but small-mode decompression.
14753 -<LI>As (2) with block size 2 bytes.
14754 -<LI>As (2) with block size 3 bytes.
14755 -<LI>As (2) with block size 4 bytes.
14756 -<LI>As (2) with block size 5 bytes.
14757 -<LI>As (2) with block size 6 bytes and small-mode decompression.
14758 -<LI>H with buffer size of 1 byte, but normal block
14759 -      size (up to 900000 bytes).
14760 -</OL>
14761 -Then some tests with unmodified source code.
14762 -<OL>
14763 -<LI>H, all settings normal.
14764 -<LI>As (1), with small-mode decompress.
14765 -<LI>H, compress with flag <CODE>-1</CODE>.
14766 -<LI>H, compress with flag <CODE>-s</CODE>, decompress with flag <CODE>-s</CODE>.
14767 -<LI>Forwards compatibility: H, <CODE>bzip2-0.1pl2</CODE> compressing,
14768 -      <CODE>bzip2-0.9.5</CODE> decompressing, all settings normal.
14769 -<LI>Backwards compatibility:  H, <CODE>bzip2-0.9.5</CODE> compressing,
14770 -      <CODE>bzip2-0.1pl2</CODE> decompressing, all settings normal.
14771 -<LI>Bigger tests: A, all settings normal.
14772 -<LI>As (7), using the fallback (Sadakane-like) sorting algorithm.
14773 -<LI>As (8), compress with flag <CODE>-1</CODE>, decompress with flag
14774 -      <CODE>-s</CODE>.
14775 -<LI>H, using the fallback sorting algorithm.
14776 -<LI>Forwards compatibility: A, <CODE>bzip2-0.1pl2</CODE> compressing,
14777 -      <CODE>bzip2-0.9.5</CODE> decompressing, all settings normal.
14778 -<LI>Backwards compatibility:  A, <CODE>bzip2-0.9.5</CODE> compressing,
14779 -      <CODE>bzip2-0.1pl2</CODE> decompressing, all settings normal.
14780 -<LI>Misc test: about 400 megabytes of <CODE>.tar</CODE> files with
14781 -      <CODE>bzip2</CODE> compiled with Checker (a memory access error
14782 -       detector, like Purify).
14783 -<LI>Misc tests to make sure it builds and runs ok on non-Linux/x86
14784 -      platforms.
14785 -</OL>
14786 -These tests were conducted on a 225 MHz IDT WinChip machine, running
14787 -Linux 2.0.36.  They represent nearly a week of continuous computation.
14788 -All tests completed successfully.
14789 -<P>
14790 -
14791 -<HR SIZE="6">
14792 -<A NAME="SEC49"></A>
14793 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
14794 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_4.html#SEC48"> &lt; </A>]</TD>
14795 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt; ]</TD>
14796 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
14797 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD>
14798 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
14799 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
14800 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
14801 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
14802 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
14803 -</TR></TABLE>
14804 -<H2> 4.6 Further reading </H2>
14805 -<!--docid::SEC49::-->
14806 -<CODE>bzip2</CODE> is not research work, in the sense that it doesn't present
14807 -any new ideas.  Rather, it's an engineering exercise based on existing
14808 -ideas.
14809 -<P>
14810 -
14811 -Four documents describe essentially all the ideas behind <CODE>bzip2</CODE>:
14812 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>Michael Burrows and D. J. Wheeler:
14813 -  "A block-sorting lossless data compression algorithm"
14814 -   10th May 1994. 
14815 -   Digital SRC Research Report 124.
14816 -   ftp://ftp.digital.com/pub/DEC/SRC/research-reports/SRC-124.ps.gz
14817 -   If you have trouble finding it, try searching at the
14818 -   New Zealand Digital Library, http://www.nzdl.org.
14819 -
14820 -Daniel S. Hirschberg and Debra A. LeLewer
14821 -  "Efficient Decoding of Prefix Codes"
14822 -   Communications of the ACM, April 1990, Vol 33, Number 4.
14823 -   You might be able to get an electronic copy of this
14824 -      from the ACM Digital Library.
14825 -
14826 -David J. Wheeler
14827 -   Program bred3.c and accompanying document bred3.ps.
14828 -   This contains the idea behind the multi-table Huffman
14829 -   coding scheme.
14830 -   ftp://ftp.cl.cam.ac.uk/users/djw3/
14831 -
14832 -Jon L. Bentley and Robert Sedgewick
14833 -  "Fast Algorithms for Sorting and Searching Strings"
14834 -   Available from Sedgewick's web page,
14835 -   www.cs.princeton.edu/~rs
14836 -</pre></td></tr></table>The following paper gives valuable additional insights into the
14837 -algorithm, but is not immediately the basis of any code
14838 -used in bzip2.
14839 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>Peter Fenwick:
14840 -   Block Sorting Text Compression
14841 -   Proceedings of the 19th Australasian Computer Science Conference,
14842 -     Melbourne, Australia.  Jan 31 - Feb 2, 1996.
14843 -   ftp://ftp.cs.auckland.ac.nz/pub/peter-f/ACSC96paper.ps
14844 -</pre></td></tr></table>Kunihiko Sadakane's sorting algorithm, mentioned above,
14845 -is available from:
14846 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>http://naomi.is.s.u-tokyo.ac.jp/~sada/papers/Sada98b.ps.gz
14847 -</pre></td></tr></table>The Manber-Myers suffix array construction
14848 -algorithm is described in a paper
14849 -available from:
14850 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>http://www.cs.arizona.edu/people/gene/PAPERS/suffix.ps
14851 -</pre></td></tr></table>Finally, the following paper documents some recent investigations
14852 -I made into the performance of sorting algorithms:
14853 -<TABLE><tr><td>&nbsp;</td><td class=example><pre>Julian Seward:
14854 -   On the Performance of BWT Sorting Algorithms
14855 -   Proceedings of the IEEE Data Compression Conference 2000
14856 -     Snowbird, Utah.  28-30 March 2000.
14857 -</pre></td></tr></table></P><P>
14858 -
14859 -<HR SIZE="6">
14860 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
14861 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
14862 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
14863 -<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
14864 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
14865 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
14866 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
14867 -</TR></TABLE>
14868 -<BR>  
14869 -<FONT SIZE="-1">
14870 -This document was generated
14871 -by <I>Julian Seward</I> on <I>January, 5  2002</I>
14872 -using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
14873 -"><I>texi2html</I></A>
14874 -
14875 -</BODY>
14876 -</HTML>
14877 diff -Nru bzip2-1.0.2/manual_toc.html bzip2-1.0.2.new/manual_toc.html
14878 --- bzip2-1.0.2/manual_toc.html Sat Jan  5 01:53:05 2002
14879 +++ bzip2-1.0.2.new/manual_toc.html     Thu Jan  1 01:00:00 1970
14880 @@ -1,163 +0,0 @@
14881 -<HTML>
14882 -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
14883 -<!-- Created on January, 5  2002 by texi2html 1.64 -->
14884 -<!-- 
14885 -Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
14886 -            Karl Berry  <karl@freefriends.org>
14887 -            Olaf Bachmann <obachman@mathematik.uni-kl.de>
14888 -            and many others.
14889 -Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
14890 -Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
14891
14892 --->
14893 -<HEAD>
14894 -<TITLE>Untitled Document: Table of Contents</TITLE>
14895 -
14896 -<META NAME="description" CONTENT="Untitled Document: Table of Contents">
14897 -<META NAME="keywords" CONTENT="Untitled Document: Table of Contents">
14898 -<META NAME="resource-type" CONTENT="document">
14899 -<META NAME="distribution" CONTENT="global">
14900 -<META NAME="Generator" CONTENT="texi2html 1.64">
14901 -
14902 -</HEAD>
14903 -
14904 -<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
14905 -
14906 -<A NAME="SEC_Contents"></A>
14907 -<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
14908 -<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD>
14909 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
14910 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
14911 -<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
14912 -</TR></TABLE>
14913 -<H1>Table of Contents</H1>
14914 -<UL>
14915 -<A NAME="TOC1" HREF="manual_1.html#SEC1">1. Introduction</A>
14916 -<BR>
14917 -<A NAME="TOC2" HREF="manual_2.html#SEC2">2. How to use <CODE>bzip2</CODE></A>
14918 -<BR>
14919 -<UL>
14920 -<UL>
14921 -<UL>
14922 -<A NAME="TOC3" HREF="manual_2.html#SEC3">NAME</A>
14923 -<BR>
14924 -<A NAME="TOC4" HREF="manual_2.html#SEC4">SYNOPSIS</A>
14925 -<BR>
14926 -<A NAME="TOC5" HREF="manual_2.html#SEC5">DESCRIPTION</A>
14927 -<BR>
14928 -<A NAME="TOC6" HREF="manual_2.html#SEC6">OPTIONS</A>
14929 -<BR>
14930 -<A NAME="TOC7" HREF="manual_2.html#SEC7">MEMORY MANAGEMENT</A>
14931 -<BR>
14932 -<A NAME="TOC8" HREF="manual_2.html#SEC8">RECOVERING DATA FROM DAMAGED FILES</A>
14933 -<BR>
14934 -<A NAME="TOC9" HREF="manual_2.html#SEC9">PERFORMANCE NOTES</A>
14935 -<BR>
14936 -<A NAME="TOC10" HREF="manual_2.html#SEC10">CAVEATS</A>
14937 -<BR>
14938 -<A NAME="TOC11" HREF="manual_2.html#SEC11">AUTHOR</A>
14939 -<BR>
14940 -</UL>
14941 -</UL>
14942 -</UL>
14943 -<A NAME="TOC12" HREF="manual_3.html#SEC12">3. Programming with <CODE>libbzip2</CODE></A>
14944 -<BR>
14945 -<UL>
14946 -<A NAME="TOC13" HREF="manual_3.html#SEC13">3.1 Top-level structure</A>
14947 -<BR>
14948 -<UL>
14949 -<A NAME="TOC14" HREF="manual_3.html#SEC14">3.1.1 Low-level summary</A>
14950 -<BR>
14951 -<A NAME="TOC15" HREF="manual_3.html#SEC15">3.1.2 High-level summary</A>
14952 -<BR>
14953 -<A NAME="TOC16" HREF="manual_3.html#SEC16">3.1.3 Utility functions summary</A>
14954 -<BR>
14955 -</UL>
14956 -<A NAME="TOC17" HREF="manual_3.html#SEC17">3.2 Error handling</A>
14957 -<BR>
14958 -<A NAME="TOC18" HREF="manual_3.html#SEC18">3.3 Low-level interface</A>
14959 -<BR>
14960 -<UL>
14961 -<A NAME="TOC19" HREF="manual_3.html#SEC19">3.3.1 <CODE>BZ2_bzCompressInit</CODE></A>
14962 -<BR>
14963 -<A NAME="TOC20" HREF="manual_3.html#SEC20">3.3.2 <CODE>BZ2_bzCompress</CODE></A>
14964 -<BR>
14965 -<A NAME="TOC21" HREF="manual_3.html#SEC21">3.3.3 <CODE>BZ2_bzCompressEnd</CODE></A>
14966 -<BR>
14967 -<A NAME="TOC22" HREF="manual_3.html#SEC22">3.3.4 <CODE>BZ2_bzDecompressInit</CODE></A>
14968 -<BR>
14969 -<A NAME="TOC23" HREF="manual_3.html#SEC23">3.3.5 <CODE>BZ2_bzDecompress</CODE></A>
14970 -<BR>
14971 -<A NAME="TOC24" HREF="manual_3.html#SEC24">3.3.6 <CODE>BZ2_bzDecompressEnd</CODE></A>
14972 -<BR>
14973 -</UL>
14974 -<A NAME="TOC25" HREF="manual_3.html#SEC25">3.4 High-level interface</A>
14975 -<BR>
14976 -<UL>
14977 -<A NAME="TOC26" HREF="manual_3.html#SEC26">3.4.1 <CODE>BZ2_bzReadOpen</CODE></A>
14978 -<BR>
14979 -<A NAME="TOC27" HREF="manual_3.html#SEC27">3.4.2 <CODE>BZ2_bzRead</CODE></A>
14980 -<BR>
14981 -<A NAME="TOC28" HREF="manual_3.html#SEC28">3.4.3 <CODE>BZ2_bzReadGetUnused</CODE></A>
14982 -<BR>
14983 -<A NAME="TOC29" HREF="manual_3.html#SEC29">3.4.4 <CODE>BZ2_bzReadClose</CODE></A>
14984 -<BR>
14985 -<A NAME="TOC30" HREF="manual_3.html#SEC30">3.4.5 <CODE>BZ2_bzWriteOpen</CODE></A>
14986 -<BR>
14987 -<A NAME="TOC31" HREF="manual_3.html#SEC31">3.4.6 <CODE>BZ2_bzWrite</CODE></A>
14988 -<BR>
14989 -<A NAME="TOC32" HREF="manual_3.html#SEC32">3.4.7 <CODE>BZ2_bzWriteClose</CODE></A>
14990 -<BR>
14991 -<A NAME="TOC33" HREF="manual_3.html#SEC33">3.4.8 Handling embedded compressed data streams</A>
14992 -<BR>
14993 -<A NAME="TOC34" HREF="manual_3.html#SEC34">3.4.9 Standard file-reading/writing code</A>
14994 -<BR>
14995 -</UL>
14996 -<A NAME="TOC35" HREF="manual_3.html#SEC35">3.5 Utility functions</A>
14997 -<BR>
14998 -<UL>
14999 -<A NAME="TOC36" HREF="manual_3.html#SEC36">3.5.1 <CODE>BZ2_bzBuffToBuffCompress</CODE></A>
15000 -<BR>
15001 -<A NAME="TOC37" HREF="manual_3.html#SEC37">3.5.2 <CODE>BZ2_bzBuffToBuffDecompress</CODE></A>
15002 -<BR>
15003 -</UL>
15004 -<A NAME="TOC38" HREF="manual_3.html#SEC38">3.6 <CODE>zlib</CODE> compatibility functions</A>
15005 -<BR>
15006 -<A NAME="TOC39" HREF="manual_3.html#SEC39">3.7 Using the library in a <CODE>stdio</CODE>-free environment</A>
15007 -<BR>
15008 -<UL>
15009 -<A NAME="TOC40" HREF="manual_3.html#SEC40">3.7.1 Getting rid of <CODE>stdio</CODE></A>
15010 -<BR>
15011 -<A NAME="TOC41" HREF="manual_3.html#SEC41">3.7.2 Critical error handling</A>
15012 -<BR>
15013 -</UL>
15014 -<A NAME="TOC42" HREF="manual_3.html#SEC42">3.8 Making a Windows DLL</A>
15015 -<BR>
15016 -</UL>
15017 -<A NAME="TOC43" HREF="manual_4.html#SEC43">4. Miscellanea</A>
15018 -<BR>
15019 -<UL>
15020 -<A NAME="TOC44" HREF="manual_4.html#SEC44">4.1 Limitations of the compressed file format</A>
15021 -<BR>
15022 -<A NAME="TOC45" HREF="manual_4.html#SEC45">4.2 Portability issues</A>
15023 -<BR>
15024 -<A NAME="TOC46" HREF="manual_4.html#SEC46">4.3 Reporting bugs</A>
15025 -<BR>
15026 -<A NAME="TOC47" HREF="manual_4.html#SEC47">4.4 Did you get the right package?</A>
15027 -<BR>
15028 -<A NAME="TOC48" HREF="manual_4.html#SEC48">4.5 Testing</A>
15029 -<BR>
15030 -<A NAME="TOC49" HREF="manual_4.html#SEC49">4.6 Further reading</A>
15031 -<BR>
15032 -</UL>
15033 -</UL>
15034 -<HR SIZE=1>
15035 -<BR>  
15036 -<FONT SIZE="-1">
15037 -This document was generated
15038 -by <I>Julian Seward</I> on <I>January, 5  2002</I>
15039 -using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
15040 -"><I>texi2html</I></A>
15041 -
15042 -</BODY>
15043 -</HTML>
15044 diff -Nru bzip2-1.0.2/randtable.c bzip2-1.0.2.new/randtable.c
15045 --- bzip2-1.0.2/randtable.c     Sun Dec 30 03:19:04 2001
15046 +++ bzip2-1.0.2.new/randtable.c Fri Feb  1 04:19:18 2002
15047 @@ -58,6 +58,10 @@
15048    For more information on these sources, see the manual.
15049  --*/
15050  
15051 +#ifdef HAVE_CONFIG_H
15052 +#include <config.h>
15053 +#endif
15054 +
15055  
15056  #include "bzlib_private.h"
15057  
15058 diff -Nru bzip2-1.0.2/spewG.c bzip2-1.0.2.new/spewG.c
15059 --- bzip2-1.0.2/spewG.c Thu Apr  6 01:24:45 2000
15060 +++ bzip2-1.0.2.new/spewG.c     Fri Feb  1 04:19:18 2002
15061 @@ -9,7 +9,10 @@
15062     (but is otherwise harmless).
15063  */
15064  
15065 -#define _FILE_OFFSET_BITS 64
15066 +#ifdef HAVE_CONFIG_H
15067 +#include <config.h>
15068 +#endif
15069 +
15070  
15071  #include <stdio.h>
15072  #include <stdlib.h>
15073 diff -Nru bzip2-1.0.2/stamp-h.in bzip2-1.0.2.new/stamp-h.in
15074 --- bzip2-1.0.2/stamp-h.in      Thu Jan  1 01:00:00 1970
15075 +++ bzip2-1.0.2.new/stamp-h.in  Fri Feb  1 04:19:18 2002
15076 @@ -0,0 +1 @@
15077 +timestamp
15078 diff -Nru bzip2-1.0.2/unzcrash.c bzip2-1.0.2.new/unzcrash.c
15079 --- bzip2-1.0.2/unzcrash.c      Thu Apr  6 01:24:46 2000
15080 +++ bzip2-1.0.2.new/unzcrash.c  Fri Feb  1 04:19:18 2002
15081 @@ -13,6 +13,12 @@
15082     many hours.
15083  */
15084  
15085 +#ifdef HAVE_CONFIG_H
15086 +#include <config.h>
15087 +#endif
15088 +
15089 +
15090 +
15091  #include <stdio.h>
15092  #include <assert.h>
15093  #include "bzlib.h"
This page took 1.27406 seconds and 3 git commands to generate.