1aff4487e8c218365cd0ec630a010ff7a144fe55
[dragonfly.git] / contrib / bzip2-1.0 / README
1
2 This is the README for bzip2, a block-sorting file compressor, version
3 1.0.3.  This version is fully compatible with the previous public
4 releases, versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1 and 1.0.2.
5
6 bzip2-1.0.3 is distributed under a BSD-style license.  For details,
7 see the file LICENSE.
8
9 Complete documentation is available in Postscript form (manual.ps),
10 PDF (manual.pdf) or html (manual.html).  A plain-text version of the
11 manual page is available as bzip2.txt.  A statement about Y2K issues
12 is now included in the file Y2K_INFO.
13
14
15 HOW TO BUILD -- UNIX
16
17 Type `make'.  This builds the library libbz2.a and then the
18 programs bzip2 and bzip2recover.  Six self-tests are run.
19 If the self-tests complete ok, carry on to installation:
20
21 To install in /usr/bin, /usr/lib, /usr/man and /usr/include, type
22    make install
23 To install somewhere else, eg, /xxx/yyy/{bin,lib,man,include}, type 
24    make install PREFIX=/xxx/yyy
25 If you are (justifiably) paranoid and want to see what 'make install'
26 is going to do, you can first do
27    make -n install                      or
28    make -n install PREFIX=/xxx/yyy      respectively.
29 The -n instructs make to show the commands it would execute, but
30 not actually execute them.
31
32
33 HOW TO BUILD -- UNIX, shared library libbz2.so.
34
35 Do 'make -f Makefile-libbz2_so'.  This Makefile seems to work for
36 Linux-ELF (RedHat 7.2 on an x86 box), with gcc.  I make no claims
37 that it works for any other platform, though I suspect it probably
38 will work for most platforms employing both ELF and gcc.
39
40 bzip2-shared, a client of the shared library, is also built, but not
41 self-tested.  So I suggest you also build using the normal Makefile,
42 since that conducts a self-test.  A second reason to prefer the
43 version statically linked to the library is that, on x86 platforms,
44 building shared objects makes a valuable register (%ebx) unavailable
45 to gcc, resulting in a slowdown of 10%-20%, at least for bzip2.
46
47 Important note for people upgrading .so's from 0.9.0/0.9.5 to version
48 1.0.X.  All the functions in the library have been renamed, from (eg)
49 bzCompress to BZ2_bzCompress, to avoid namespace pollution.
50 Unfortunately this means that the libbz2.so created by
51 Makefile-libbz2_so will not work with any program which used an older
52 version of the library.  Sorry.  I do encourage library clients to
53 make the effort to upgrade to use version 1.0, since it is both faster
54 and more robust than previous versions.
55
56
57 HOW TO BUILD -- Windows 95, NT, DOS, Mac, etc.
58
59 It's difficult for me to support compilation on all these platforms.
60 My approach is to collect binaries for these platforms, and put them
61 on the master web page (http://sources.redhat.com/bzip2).  Look there.
62 However (FWIW), bzip2-1.0.X is very standard ANSI C and should compile
63 unmodified with MS Visual C.  If you have difficulties building, you
64 might want to read README.COMPILATION.PROBLEMS.
65
66 At least using MS Visual C++ 6, you can build from the unmodified
67 sources by issuing, in a command shell: 
68    nmake -f makefile.msc
69 (you may need to first run the MSVC-provided script VCVARS32.BAT
70  so as to set up paths to the MSVC tools correctly).
71
72
73 VALIDATION
74
75 Correct operation, in the sense that a compressed file can always be
76 decompressed to reproduce the original, is obviously of paramount
77 importance.  To validate bzip2, I used a modified version of Mark
78 Nelson's churn program.  Churn is an automated test driver which
79 recursively traverses a directory structure, using bzip2 to compress
80 and then decompress each file it encounters, and checking that the
81 decompressed data is the same as the original.
82
83
84
85 Please read and be aware of the following:
86
87 WARNING:
88
89    This program (attempts to) compress data by performing several
90    non-trivial transformations on it.  Unless you are 100% familiar
91    with *all* the algorithms contained herein, and with the
92    consequences of modifying them, you should NOT meddle with the
93    compression or decompression machinery.  Incorrect changes can and
94    very likely *will* lead to disastrous loss of data.
95
96
97 DISCLAIMER:
98
99    I TAKE NO RESPONSIBILITY FOR ANY LOSS OF DATA ARISING FROM THE
100    USE OF THIS PROGRAM, HOWSOEVER CAUSED.
101
102    Every compression of a file implies an assumption that the
103    compressed file can be decompressed to reproduce the original.
104    Great efforts in design, coding and testing have been made to
105    ensure that this program works correctly.  However, the complexity
106    of the algorithms, and, in particular, the presence of various
107    special cases in the code which occur with very low but non-zero
108    probability make it impossible to rule out the possibility of bugs
109    remaining in the program.  DO NOT COMPRESS ANY DATA WITH THIS
110    PROGRAM UNLESS YOU ARE PREPARED TO ACCEPT THE POSSIBILITY, HOWEVER
111    SMALL, THAT THE DATA WILL NOT BE RECOVERABLE.
112
113    That is not to say this program is inherently unreliable.  Indeed,
114    I very much hope the opposite is true.  bzip2 has been carefully
115    constructed and extensively tested.
116
117
118 PATENTS:
119
120    To the best of my knowledge, bzip2 does not use any patented
121    algorithms.  However, I do not have the resources to carry out
122    a patent search.  Therefore I cannot give any guarantee of the
123    above statement.
124
125 End of legalities.
126
127
128 WHAT'S NEW IN 0.9.0 (as compared to 0.1pl2) ?
129
130    * Approx 10% faster compression, 30% faster decompression
131    * -t (test mode) is a lot quicker
132    * Can decompress concatenated compressed files
133    * Programming interface, so programs can directly read/write .bz2 files
134    * Less restrictive (BSD-style) licensing
135    * Flag handling more compatible with GNU gzip
136    * Much more documentation, i.e., a proper user manual
137    * Hopefully, improved portability (at least of the library)
138
139 WHAT'S NEW IN 0.9.5 ?
140
141    * Compression speed is much less sensitive to the input
142      data than in previous versions.  Specifically, the very
143      slow performance caused by repetitive data is fixed.
144    * Many small improvements in file and flag handling.
145    * A Y2K statement.
146
147 WHAT'S NEW IN 1.0.0 ?
148
149    See the CHANGES file.
150
151 WHAT'S NEW IN 1.0.2 ?
152
153    See the CHANGES file.
154
155 WHAT'S NEW IN 1.0.3 ?
156
157    See the CHANGES file.
158
159
160 I hope you find bzip2 useful.  Feel free to contact me at
161    jseward@bzip.org
162 if you have any suggestions or queries.  Many people mailed me with
163 comments, suggestions and patches after the releases of bzip-0.15,
164 bzip-0.21, and bzip2 versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1 and
165 1.0.2, and the changes in bzip2 are largely a result of this feedback.
166 I thank you for your comments.
167
168 At least for the time being, bzip2's "home" is (or can be reached via)
169 http://www.bzip.org
170
171 Julian Seward
172 jseward@bzip.org
173
174 Cambridge, UK.
175
176 18     July 1996 (version 0.15)
177 25   August 1996 (version 0.21)
178  7   August 1997 (bzip2, version 0.1)
179 29   August 1997 (bzip2, version 0.1pl2)
180 23   August 1998 (bzip2, version 0.9.0)
181  8     June 1999 (bzip2, version 0.9.5)
182  4     Sept 1999 (bzip2, version 0.9.5d)
183  5      May 2000 (bzip2, version 1.0pre8)
184 30 December 2001 (bzip2, version 1.0.2pre1)
185 15 February 2005 (bzip2, version 1.0.3)