NetBSD/lib/libbz2
simonb 5ed3048893 How lame is this - a decompression library SHOULD NOT use a SIGSEGV
or SIGBUS to indicate corruption in the compressed file!

Do some error checking on the array indices in the MTF macro to
return "data error" if we get outrageous values.  Some of these
values are by observation, and have been tested on all bz2 files
in the distfiles directory and a range of bz2 files up to 44MB
in size.

Should fix problem reported in PR bin/8237 by NAKAJIMA Yoshihiro.
1999-08-20 06:13:00 +00:00
..
LICENSE Revert white space changes for imported sources. 1999-07-03 12:30:16 +00:00
Makefile convert from NOxxx= to MKxxx=no. 1999-02-13 02:54:17 +00:00
README Revert white space changes for imported sources. 1999-07-03 12:30:16 +00:00
blocksort.c Prefix all private functions and variables with "__BZ" so as not to 1999-08-20 02:21:48 +00:00
bzip2.txt Initial import of bzip2-0.9.0b from Julian Seward. 1998-09-14 03:01:19 +00:00
bzlib.c Prefix all private functions and variables with "__BZ" so as not to 1999-08-20 02:21:48 +00:00
bzlib.h Revert white space changes for imported sources. 1999-07-03 12:30:16 +00:00
bzlib_private.h Prefix all private functions and variables with "__BZ" so as not to 1999-08-20 02:21:48 +00:00
compress.c Prefix all private functions and variables with "__BZ" so as not to 1999-08-20 02:21:48 +00:00
crctable.c Prefix all private functions and variables with "__BZ" so as not to 1999-08-20 02:21:48 +00:00
decompress.c How lame is this - a decompression library SHOULD NOT use a SIGSEGV 1999-08-20 06:13:00 +00:00
huffman.c Prefix all private functions and variables with "__BZ" so as not to 1999-08-20 02:21:48 +00:00
libbz2.def Initial import of bzip2-0.9.0b from Julian Seward. 1998-09-14 03:01:19 +00:00
manual.ps Initial import of bzip2-0.9.0b from Julian Seward. 1998-09-14 03:01:19 +00:00
manual.texi Revert white space changes for imported sources. 1999-07-03 12:30:16 +00:00
manual_1.html Revert white space changes for imported sources. 1999-07-03 12:30:16 +00:00
manual_2.html Initial import of bzip2-0.9.0b from Julian Seward. 1998-09-14 03:01:19 +00:00
manual_3.html Revert white space changes for imported sources. 1999-07-03 12:30:16 +00:00
manual_4.html Revert white space changes for imported sources. 1999-07-03 12:30:16 +00:00
manual_toc.html Initial import of bzip2-0.9.0b from Julian Seward. 1998-09-14 03:01:19 +00:00
randtable.c Prefix all private functions and variables with "__BZ" so as not to 1999-08-20 02:21:48 +00:00
shlib_version Add a note to update src/distrib/sets/lists/base/shl.*, and add a missing 1999-02-25 08:02:19 +00:00

README

$NetBSD: README,v 1.4 1999/07/03 12:30:16 simonb Exp $


This is the README for bzip2, a block-sorting file compressor, version
0.9.0.  This version is fully compatible with the previous public
release, bzip2-0.1pl2.

bzip2-0.9.0 is distributed under a BSD-style license.  For details,
see the file LICENSE.

Complete documentation is available in Postscript form (manual.ps)
or html (manual_toc.html).  A plain-text version of the manual page is
available as bzip2.txt.


HOW TO BUILD -- UNIX

Type `make'.

This creates binaries "bzip2" and "bzip2recover".

It also runs four compress-decompress tests to make sure things are
working properly.  If all goes well, you should be up & running.
Please be sure to read the output from `make' just to be sure that the
tests went ok.

To install bzip2 properly:

* Copy the binaries "bzip2" and "bzip2recover" to a publically visible 
  place, possibly /usr/bin or /usr/local/bin.

* In that directory, make "bunzip2" and "bzcat" be symbolic links
  to "bzip2".

* Copy the manual page, bzip2.1, to the relevant place.
  Probably the right place is /usr/man/man1/.

If you want to program with the library, you'll need to copy libbz2.a
and bzlib.h to /usr/lib and /usr/include respectively.
  

HOW TO BUILD -- Windows 95, NT, DOS, Mac, etc.

It's difficult for me to support compilation on all these platforms.
My approach is to collect binaries for these platforms, and put them
on my web page (http://www.muraroa.demon.co.uk).  Look there.


VALIDATION

Correct operation, in the sense that a compressed file can always be
decompressed to reproduce the original, is obviously of paramount
importance.  To validate bzip2, I used a modified version of Mark
Nelson's churn program.  Churn is an automated test driver which
recursively traverses a directory structure, using bzip2 to compress
and then decompress each file it encounters, and checking that the
decompressed data is the same as the original.  There are more details
in Section 4 of the user guide.



Please read and be aware of the following:

WARNING:

   This program (attempts to) compress data by performing several
   non-trivial transformations on it.  Unless you are 100% familiar
   with *all* the algorithms contained herein, and with the
   consequences of modifying them, you should NOT meddle with the
   compression or decompression machinery.  Incorrect changes can and
   very likely *will* lead to disastrous loss of data.


DISCLAIMER:

   I TAKE NO RESPONSIBILITY FOR ANY LOSS OF DATA ARISING FROM THE
   USE OF THIS PROGRAM, HOWSOEVER CAUSED.

   Every compression of a file implies an assumption that the
   compressed file can be decompressed to reproduce the original.
   Great efforts in design, coding and testing have been made to
   ensure that this program works correctly.  However, the complexity
   of the algorithms, and, in particular, the presence of various
   special cases in the code which occur with very low but non-zero
   probability make it impossible to rule out the possibility of bugs
   remaining in the program.  DO NOT COMPRESS ANY DATA WITH THIS
   PROGRAM UNLESS YOU ARE PREPARED TO ACCEPT THE POSSIBILITY, HOWEVER
   SMALL, THAT THE DATA WILL NOT BE RECOVERABLE.

   That is not to say this program is inherently unreliable.  Indeed,
   I very much hope the opposite is true.  bzip2 has been carefully
   constructed and extensively tested.


PATENTS:

   To the best of my knowledge, bzip2 does not use any patented
   algorithms.  However, I do not have the resources available to
   carry out a full patent search.  Therefore I cannot give any
   guarantee of the above statement.

End of legalities.


WHAT'S NEW IN 0.9.0 (as compared to 0.1pl2) ?

   * Approx 10% faster compression, 30% faster decompression
   * -t (test mode) is a lot quicker
   * Can decompress concatenated compressed files
   * Programming interface, so programs can directly read/write .bz2 files
   * Less restrictive (BSD-style) licensing
   * Flag handling more compatible with GNU gzip
   * Much more documentation, i.e., a proper user manual
   * Hopefully, improved portability (at least of the library)


I hope you find bzip2 useful.  Feel free to contact me at
   jseward@acm.org
if you have any suggestions or queries.  Many people mailed me with
comments, suggestions and patches after the releases of bzip-0.15,
bzip-0.21 and bzip2-0.1pl2, and the changes in bzip2 are largely a
result of this feedback.  I thank you for your comments.

At least for the time being, bzip2's "home" is 
http://www.muraroa.demon.co.uk.

Julian Seward
jseward@acm.org

Manchester, UK
18 July 1996 (version 0.15)
25 August 1996 (version 0.21)

Guildford, Surrey, UK
7 August 1997 (bzip2, version 0.1)
29 August 1997 (bzip2, version 0.1pl2)
23 August 1998 (bzip2, version 0.9.0)