1df9de0ebSDavid E. O'Brien 21b79bae0SXin LIThis is the README for bzip2/libzip2. 31b79bae0SXin LIThis version is fully compatible with the previous public releases. 4df9de0ebSDavid E. O'Brien 51b79bae0SXin LI------------------------------------------------------------------ 61b79bae0SXin LIThis file is part of bzip2/libbzip2, a program and library for 71b79bae0SXin LIlossless, block-sorting data compression. 81b79bae0SXin LI 9*51f61fc0SXin LIbzip2/libbzip2 version 1.0.8 of 13 July 2019 10*51f61fc0SXin LICopyright (C) 1996-2019 Julian Seward <jseward@acm.org> 111b79bae0SXin LI 121b79bae0SXin LIPlease read the WARNING, DISCLAIMER and PATENTS sections in this file. 131b79bae0SXin LI 141b79bae0SXin LIThis program is released under the terms of the license contained 151b79bae0SXin LIin the file LICENSE. 161b79bae0SXin LI------------------------------------------------------------------ 17df9de0ebSDavid E. O'Brien 18ed14b6e0SMaxim SobolevComplete documentation is available in Postscript form (manual.ps), 19f7a4f99fSDavid E. O'BrienPDF (manual.pdf) or html (manual.html). A plain-text version of the 201b79bae0SXin LImanual page is available as bzip2.txt. 21df9de0ebSDavid E. O'Brien 22df9de0ebSDavid E. O'Brien 23df9de0ebSDavid E. O'BrienHOW TO BUILD -- UNIX 24df9de0ebSDavid E. O'Brien 251b79bae0SXin LIType 'make'. This builds the library libbz2.a and then the programs 261b79bae0SXin LIbzip2 and bzip2recover. Six self-tests are run. If the self-tests 271b79bae0SXin LIcomplete ok, carry on to installation: 28df9de0ebSDavid E. O'Brien 291b79bae0SXin LITo install in /usr/local/bin, /usr/local/lib, /usr/local/man and 301b79bae0SXin LI/usr/local/include, type 311b79bae0SXin LI 32df9de0ebSDavid E. O'Brien make install 331b79bae0SXin LI 34df9de0ebSDavid E. O'BrienTo install somewhere else, eg, /xxx/yyy/{bin,lib,man,include}, type 351b79bae0SXin LI 36df9de0ebSDavid E. O'Brien make install PREFIX=/xxx/yyy 371b79bae0SXin LI 38df9de0ebSDavid E. O'BrienIf you are (justifiably) paranoid and want to see what 'make install' 39df9de0ebSDavid E. O'Brienis going to do, you can first do 401b79bae0SXin LI 41df9de0ebSDavid E. O'Brien make -n install or 42df9de0ebSDavid E. O'Brien make -n install PREFIX=/xxx/yyy respectively. 431b79bae0SXin LI 441b79bae0SXin LIThe -n instructs make to show the commands it would execute, but not 451b79bae0SXin LIactually execute them. 46df9de0ebSDavid E. O'Brien 47df9de0ebSDavid E. O'Brien 48df9de0ebSDavid E. O'BrienHOW TO BUILD -- UNIX, shared library libbz2.so. 49df9de0ebSDavid E. O'Brien 50df9de0ebSDavid E. O'BrienDo 'make -f Makefile-libbz2_so'. This Makefile seems to work for 51ed14b6e0SMaxim SobolevLinux-ELF (RedHat 7.2 on an x86 box), with gcc. I make no claims 52df9de0ebSDavid E. O'Brienthat it works for any other platform, though I suspect it probably 53df9de0ebSDavid E. O'Brienwill work for most platforms employing both ELF and gcc. 54df9de0ebSDavid E. O'Brien 55ed14b6e0SMaxim Sobolevbzip2-shared, a client of the shared library, is also built, but not 56ed14b6e0SMaxim Sobolevself-tested. So I suggest you also build using the normal Makefile, 57ed14b6e0SMaxim Sobolevsince that conducts a self-test. A second reason to prefer the 58ed14b6e0SMaxim Sobolevversion statically linked to the library is that, on x86 platforms, 59ed14b6e0SMaxim Sobolevbuilding shared objects makes a valuable register (%ebx) unavailable 60ed14b6e0SMaxim Sobolevto gcc, resulting in a slowdown of 10%-20%, at least for bzip2. 61df9de0ebSDavid E. O'Brien 62ed14b6e0SMaxim SobolevImportant note for people upgrading .so's from 0.9.0/0.9.5 to version 63ed14b6e0SMaxim Sobolev1.0.X. All the functions in the library have been renamed, from (eg) 64ed14b6e0SMaxim SobolevbzCompress to BZ2_bzCompress, to avoid namespace pollution. 65df9de0ebSDavid E. O'BrienUnfortunately this means that the libbz2.so created by 66ed14b6e0SMaxim SobolevMakefile-libbz2_so will not work with any program which used an older 671b79bae0SXin LIversion of the library. I do encourage library clients to make the 681b79bae0SXin LIeffort to upgrade to use version 1.0, since it is both faster and more 691b79bae0SXin LIrobust than previous versions. 70df9de0ebSDavid E. O'Brien 71df9de0ebSDavid E. O'Brien 72df9de0ebSDavid E. O'BrienHOW TO BUILD -- Windows 95, NT, DOS, Mac, etc. 73df9de0ebSDavid E. O'Brien 74df9de0ebSDavid E. O'BrienIt's difficult for me to support compilation on all these platforms. 75df9de0ebSDavid E. O'BrienMy approach is to collect binaries for these platforms, and put them 76b88cc53dSXin LIon the master web site (https://sourceware.org/bzip2/). Look there. However 771b79bae0SXin LI(FWIW), bzip2-1.0.X is very standard ANSI C and should compile 78ed14b6e0SMaxim Sobolevunmodified with MS Visual C. If you have difficulties building, you 79ed14b6e0SMaxim Sobolevmight want to read README.COMPILATION.PROBLEMS. 80ed14b6e0SMaxim Sobolev 81ed14b6e0SMaxim SobolevAt least using MS Visual C++ 6, you can build from the unmodified 82ed14b6e0SMaxim Sobolevsources by issuing, in a command shell: 831b79bae0SXin LI 84ed14b6e0SMaxim Sobolev nmake -f makefile.msc 851b79bae0SXin LI 86ed14b6e0SMaxim Sobolev(you may need to first run the MSVC-provided script VCVARS32.BAT 87ed14b6e0SMaxim Sobolev so as to set up paths to the MSVC tools correctly). 88df9de0ebSDavid E. O'Brien 89df9de0ebSDavid E. O'Brien 90df9de0ebSDavid E. O'BrienVALIDATION 91df9de0ebSDavid E. O'Brien 92df9de0ebSDavid E. O'BrienCorrect operation, in the sense that a compressed file can always be 93df9de0ebSDavid E. O'Briendecompressed to reproduce the original, is obviously of paramount 94df9de0ebSDavid E. O'Brienimportance. To validate bzip2, I used a modified version of Mark 95df9de0ebSDavid E. O'BrienNelson's churn program. Churn is an automated test driver which 96df9de0ebSDavid E. O'Brienrecursively traverses a directory structure, using bzip2 to compress 97df9de0ebSDavid E. O'Brienand then decompress each file it encounters, and checking that the 98f7a4f99fSDavid E. O'Briendecompressed data is the same as the original. 99df9de0ebSDavid E. O'Brien 100df9de0ebSDavid E. O'Brien 101df9de0ebSDavid E. O'Brien 102df9de0ebSDavid E. O'BrienPlease read and be aware of the following: 103df9de0ebSDavid E. O'Brien 104df9de0ebSDavid E. O'BrienWARNING: 105df9de0ebSDavid E. O'Brien 1061b79bae0SXin LI This program and library (attempts to) compress data by 1071b79bae0SXin LI performing several non-trivial transformations on it. 1081b79bae0SXin LI Unless you are 100% familiar with *all* the algorithms 1091b79bae0SXin LI contained herein, and with the consequences of modifying them, 1101b79bae0SXin LI you should NOT meddle with the compression or decompression 1111b79bae0SXin LI machinery. Incorrect changes can and very likely *will* 1121b79bae0SXin LI lead to disastrous loss of data. 113df9de0ebSDavid E. O'Brien 114df9de0ebSDavid E. O'Brien 115df9de0ebSDavid E. O'BrienDISCLAIMER: 116df9de0ebSDavid E. O'Brien 117df9de0ebSDavid E. O'Brien I TAKE NO RESPONSIBILITY FOR ANY LOSS OF DATA ARISING FROM THE 1181b79bae0SXin LI USE OF THIS PROGRAM/LIBRARY, HOWSOEVER CAUSED. 119df9de0ebSDavid E. O'Brien 120df9de0ebSDavid E. O'Brien Every compression of a file implies an assumption that the 121df9de0ebSDavid E. O'Brien compressed file can be decompressed to reproduce the original. 122df9de0ebSDavid E. O'Brien Great efforts in design, coding and testing have been made to 123df9de0ebSDavid E. O'Brien ensure that this program works correctly. However, the complexity 124df9de0ebSDavid E. O'Brien of the algorithms, and, in particular, the presence of various 125df9de0ebSDavid E. O'Brien special cases in the code which occur with very low but non-zero 126df9de0ebSDavid E. O'Brien probability make it impossible to rule out the possibility of bugs 127df9de0ebSDavid E. O'Brien remaining in the program. DO NOT COMPRESS ANY DATA WITH THIS 128df9de0ebSDavid E. O'Brien PROGRAM UNLESS YOU ARE PREPARED TO ACCEPT THE POSSIBILITY, HOWEVER 129df9de0ebSDavid E. O'Brien SMALL, THAT THE DATA WILL NOT BE RECOVERABLE. 130df9de0ebSDavid E. O'Brien 1311b79bae0SXin LI That is not to say this program is inherently unreliable. 1321b79bae0SXin LI Indeed, I very much hope the opposite is true. bzip2/libbzip2 1331b79bae0SXin LI has been carefully constructed and extensively tested. 134df9de0ebSDavid E. O'Brien 135df9de0ebSDavid E. O'Brien 136df9de0ebSDavid E. O'BrienPATENTS: 137df9de0ebSDavid E. O'Brien 1381b79bae0SXin LI To the best of my knowledge, bzip2/libbzip2 does not use any 1391b79bae0SXin LI patented algorithms. However, I do not have the resources 1401b79bae0SXin LI to carry out a patent search. Therefore I cannot give any 1411b79bae0SXin LI guarantee of the above statement. 142df9de0ebSDavid E. O'Brien 143df9de0ebSDavid E. O'Brien 144df9de0ebSDavid E. O'Brien 145df9de0ebSDavid E. O'BrienWHAT'S NEW IN 0.9.0 (as compared to 0.1pl2) ? 146df9de0ebSDavid E. O'Brien 147df9de0ebSDavid E. O'Brien * Approx 10% faster compression, 30% faster decompression 148df9de0ebSDavid E. O'Brien * -t (test mode) is a lot quicker 149df9de0ebSDavid E. O'Brien * Can decompress concatenated compressed files 150df9de0ebSDavid E. O'Brien * Programming interface, so programs can directly read/write .bz2 files 151df9de0ebSDavid E. O'Brien * Less restrictive (BSD-style) licensing 152df9de0ebSDavid E. O'Brien * Flag handling more compatible with GNU gzip 153df9de0ebSDavid E. O'Brien * Much more documentation, i.e., a proper user manual 154df9de0ebSDavid E. O'Brien * Hopefully, improved portability (at least of the library) 155df9de0ebSDavid E. O'Brien 156df9de0ebSDavid E. O'BrienWHAT'S NEW IN 0.9.5 ? 157df9de0ebSDavid E. O'Brien 158df9de0ebSDavid E. O'Brien * Compression speed is much less sensitive to the input 159df9de0ebSDavid E. O'Brien data than in previous versions. Specifically, the very 160df9de0ebSDavid E. O'Brien slow performance caused by repetitive data is fixed. 161df9de0ebSDavid E. O'Brien * Many small improvements in file and flag handling. 162df9de0ebSDavid E. O'Brien * A Y2K statement. 163df9de0ebSDavid E. O'Brien 164b88cc53dSXin LIWHAT'S NEW IN 1.0.x ? 165df9de0ebSDavid E. O'Brien 166df9de0ebSDavid E. O'Brien See the CHANGES file. 167df9de0ebSDavid E. O'Brien 168*51f61fc0SXin LII hope you find bzip2 useful. Feel free to contact the developers at 169*51f61fc0SXin LI bzip2-devel@sourceware.org 170df9de0ebSDavid E. O'Brienif you have any suggestions or queries. Many people mailed me with 171df9de0ebSDavid E. O'Briencomments, suggestions and patches after the releases of bzip-0.15, 1721b79bae0SXin LIbzip-0.21, and bzip2 versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, 1731b79bae0SXin LI1.0.2 and 1.0.3, and the changes in bzip2 are largely a result of this 1741b79bae0SXin LIfeedback. I thank you for your comments. 175df9de0ebSDavid E. O'Brien 176b88cc53dSXin LIbzip2's "home" is https://sourceware.org/bzip2/ 177df9de0ebSDavid E. O'Brien 178df9de0ebSDavid E. O'BrienJulian Seward 179b88cc53dSXin LIjseward@acm.org 180f7a4f99fSDavid E. O'BrienCambridge, UK. 181ed14b6e0SMaxim Sobolev 182df9de0ebSDavid E. O'Brien18 July 1996 (version 0.15) 183df9de0ebSDavid E. O'Brien25 August 1996 (version 0.21) 184df9de0ebSDavid E. O'Brien 7 August 1997 (bzip2, version 0.1) 185df9de0ebSDavid E. O'Brien29 August 1997 (bzip2, version 0.1pl2) 186df9de0ebSDavid E. O'Brien23 August 1998 (bzip2, version 0.9.0) 187df9de0ebSDavid E. O'Brien 8 June 1999 (bzip2, version 0.9.5) 188df9de0ebSDavid E. O'Brien 4 Sept 1999 (bzip2, version 0.9.5d) 189df9de0ebSDavid E. O'Brien 5 May 2000 (bzip2, version 1.0pre8) 190ed14b6e0SMaxim Sobolev30 December 2001 (bzip2, version 1.0.2pre1) 191f7a4f99fSDavid E. O'Brien15 February 2005 (bzip2, version 1.0.3) 1921b79bae0SXin LI20 December 2006 (bzip2, version 1.0.4) 1930c9ffc95SXin LI10 December 2007 (bzip2, version 1.0.5) 194fb2971ccSDavid E. O'Brien 6 Sept 2010 (bzip2, version 1.0.6) 195b88cc53dSXin LI27 June 2019 (bzip2, version 1.0.7) 196*51f61fc0SXin LI13 July 2019 (bzip2, version 1.0.8) 197