bzip2: Upgrade to bzip2 1.0.8

This commit is contained in:
Dong-hee Na
2021-07-18 23:04:27 +09:00
parent 4de0229299
commit bb3f60e539
36 changed files with 167079 additions and 23468 deletions

33
CHANGES
View File

@@ -2,8 +2,8 @@
This file is part of bzip2/libbzip2, a program and library for This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression. lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010 bzip2/libbzip2 version 1.0.8 of 13 July 2019
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file. README file.
@@ -325,3 +325,32 @@ Security fix only. Fixes CERT-FI 20469 as it applies to bzip2.
Izdebski. Izdebski.
* Make the documentation build on Ubuntu 10.04 * Make the documentation build on Ubuntu 10.04
1.0.7 (27 Jun 19)
~~~~~~~~~~~~~~~~~
* Fix undefined behavior in the macros SET_BH, CLEAR_BH, & ISSET_BH
* bzip2: Fix return value when combining --test,-t and -q.
* bzip2recover: Fix buffer overflow for large argv[0]
* bzip2recover: Fix use after free issue with outFile (CVE-2016-3189)
* Make sure nSelectors is not out of range (CVE-2019-12900)
1.0.8 (13 Jul 19)
~~~~~~~~~~~~~~~~~
* Accept as many selectors as the file format allows.
This relaxes the fix for CVE-2019-12900 from 1.0.7
so that bzip2 allows decompression of bz2 files that
use (too) many selectors again.
* Fix handling of large (> 4GB) files on Windows.
* Cleanup of bzdiff and bzgrep scripts so they don't use
any bash extensions and handle multiple archives correctly.
* There is now a bz2-files testsuite at
https://sourceware.org/git/bzip2-tests.git

View File

@@ -2,7 +2,7 @@
-------------------------------------------------------------------------- --------------------------------------------------------------------------
This program, "bzip2", the associated library "libbzip2", and all This program, "bzip2", the associated library "libbzip2", and all
documentation, are copyright (C) 1996-2010 Julian R Seward. All documentation, are copyright (C) 1996-2019 Julian R Seward. All
rights reserved. rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
@@ -36,7 +36,7 @@ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Julian Seward, jseward@bzip.org Julian Seward, jseward@acm.org
bzip2/libbzip2 version 1.0.6 of 6 September 2010 bzip2/libbzip2 version 1.0.8 of 13 July 2019
-------------------------------------------------------------------------- --------------------------------------------------------------------------

View File

@@ -2,8 +2,8 @@
# This file is part of bzip2/libbzip2, a program and library for # This file is part of bzip2/libbzip2, a program and library for
# lossless, block-sorting data compression. # lossless, block-sorting data compression.
# #
# bzip2/libbzip2 version 1.0.6 of 6 September 2010 # bzip2/libbzip2 version 1.0.8 of 13 July 2019
# Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> # Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
# #
# Please read the WARNING, DISCLAIMER and PATENTS sections in the # Please read the WARNING, DISCLAIMER and PATENTS sections in the
# README file. # README file.
@@ -137,7 +137,7 @@ bzip2recover.o: bzip2recover.c
distclean: clean distclean: clean
rm -f manual.ps manual.html manual.pdf rm -f manual.ps manual.html manual.pdf
DISTNAME=bzip2-1.0.6 DISTNAME=bzip2-1.0.8
dist: check manual dist: check manual
rm -f $(DISTNAME) rm -f $(DISTNAME)
ln -s -f . $(DISTNAME) ln -s -f . $(DISTNAME)

View File

@@ -1,6 +1,6 @@
# This Makefile builds a shared version of the library, # This Makefile builds a shared version of the library,
# libbz2.so.1.0.6, with soname libbz2.so.1.0, # libbz2.so.1.0.8, with soname libbz2.so.1.0,
# at least on x86-Linux (RedHat 7.2), # at least on x86-Linux (RedHat 7.2),
# with gcc-2.96 20000731 (Red Hat Linux 7.1 2.96-98). # with gcc-2.96 20000731 (Red Hat Linux 7.1 2.96-98).
# Please see the README file for some important info # Please see the README file for some important info
@@ -10,8 +10,8 @@
# This file is part of bzip2/libbzip2, a program and library for # This file is part of bzip2/libbzip2, a program and library for
# lossless, block-sorting data compression. # lossless, block-sorting data compression.
# #
# bzip2/libbzip2 version 1.0.6 of 6 September 2010 # bzip2/libbzip2 version 1.0.8 of 13 July 2019
# Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> # Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
# #
# Please read the WARNING, DISCLAIMER and PATENTS sections in the # Please read the WARNING, DISCLAIMER and PATENTS sections in the
# README file. # README file.
@@ -35,13 +35,13 @@ OBJS= blocksort.o \
bzlib.o bzlib.o
all: $(OBJS) all: $(OBJS)
$(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS) $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.8 $(OBJS)
$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6 $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.8
rm -f libbz2.so.1.0 rm -f libbz2.so.1.0
ln -s libbz2.so.1.0.6 libbz2.so.1.0 ln -s libbz2.so.1.0.8 libbz2.so.1.0
clean: clean:
rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 libbz2.so.1.0 bzip2-shared rm -f $(OBJS) bzip2.o libbz2.so.1.0.8 libbz2.so.1.0 bzip2-shared
blocksort.o: blocksort.c blocksort.o: blocksort.c
$(CC) $(CFLAGS) -c blocksort.c $(CC) $(CFLAGS) -c blocksort.c

39
README
View File

@@ -6,8 +6,8 @@ This version is fully compatible with the previous public releases.
This file is part of bzip2/libbzip2, a program and library for This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression. lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010 bzip2/libbzip2 version 1.0.8 of 13 July 2019
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in this file. Please read the WARNING, DISCLAIMER and PATENTS sections in this file.
@@ -73,7 +73,7 @@ HOW TO BUILD -- Windows 95, NT, DOS, Mac, etc.
It's difficult for me to support compilation on all these platforms. It's difficult for me to support compilation on all these platforms.
My approach is to collect binaries for these platforms, and put them My approach is to collect binaries for these platforms, and put them
on the master web site (http://www.bzip.org). Look there. However on the master web site (https://sourceware.org/bzip2/). Look there. However
(FWIW), bzip2-1.0.X is very standard ANSI C and should compile (FWIW), bzip2-1.0.X is very standard ANSI C and should compile
unmodified with MS Visual C. If you have difficulties building, you unmodified with MS Visual C. If you have difficulties building, you
might want to read README.COMPILATION.PROBLEMS. might want to read README.COMPILATION.PROBLEMS.
@@ -161,43 +161,22 @@ WHAT'S NEW IN 0.9.5 ?
* Many small improvements in file and flag handling. * Many small improvements in file and flag handling.
* A Y2K statement. * A Y2K statement.
WHAT'S NEW IN 1.0.0 ? WHAT'S NEW IN 1.0.x ?
See the CHANGES file. See the CHANGES file.
WHAT'S NEW IN 1.0.2 ? I hope you find bzip2 useful. Feel free to contact the developers at
bzip2-devel@sourceware.org
See the CHANGES file.
WHAT'S NEW IN 1.0.3 ?
See the CHANGES file.
WHAT'S NEW IN 1.0.4 ?
See the CHANGES file.
WHAT'S NEW IN 1.0.5 ?
See the CHANGES file.
WHAT'S NEW IN 1.0.6 ?
See the CHANGES file.
I hope you find bzip2 useful. Feel free to contact me at
jseward@bzip.org
if you have any suggestions or queries. Many people mailed me with if you have any suggestions or queries. Many people mailed me with
comments, suggestions and patches after the releases of bzip-0.15, comments, suggestions and patches after the releases of bzip-0.15,
bzip-0.21, and bzip2 versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, bzip-0.21, and bzip2 versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1,
1.0.2 and 1.0.3, and the changes in bzip2 are largely a result of this 1.0.2 and 1.0.3, and the changes in bzip2 are largely a result of this
feedback. I thank you for your comments. feedback. I thank you for your comments.
bzip2's "home" is http://www.bzip.org/ bzip2's "home" is https://sourceware.org/bzip2/
Julian Seward Julian Seward
jseward@bzip.org jseward@acm.org
Cambridge, UK. Cambridge, UK.
18 July 1996 (version 0.15) 18 July 1996 (version 0.15)
@@ -213,3 +192,5 @@ Cambridge, UK.
20 December 2006 (bzip2, version 1.0.4) 20 December 2006 (bzip2, version 1.0.4)
10 December 2007 (bzip2, version 1.0.5) 10 December 2007 (bzip2, version 1.0.5)
6 Sept 2010 (bzip2, version 1.0.6) 6 Sept 2010 (bzip2, version 1.0.6)
27 June 2019 (bzip2, version 1.0.7)
13 July 2019 (bzip2, version 1.0.8)

View File

@@ -2,8 +2,8 @@
This file is part of bzip2/libbzip2, a program and library for This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression. lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010 bzip2/libbzip2 version 1.0.8 of 13 July 2019
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file. README file.
@@ -12,7 +12,7 @@ This program is released under the terms of the license contained
in the file LICENSE. in the file LICENSE.
------------------------------------------------------------------ ------------------------------------------------------------------
bzip2-1.0.6 should compile without problems on the vast majority of bzip2 should compile without problems on the vast majority of
platforms. Using the supplied Makefile, I've built and tested it platforms. Using the supplied Makefile, I've built and tested it
myself for x86-linux and amd64-linux. With makefile.msc, Visual C++ myself for x86-linux and amd64-linux. With makefile.msc, Visual C++
6.0 and nmake, you can build a native Win32 version too. Large file 6.0 and nmake, you can build a native Win32 version too. Large file

View File

@@ -2,8 +2,8 @@
This file is part of bzip2/libbzip2, a program and library for This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression. lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010 bzip2/libbzip2 version 1.0.8 of 13 July 2019
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file. README file.

View File

@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression. lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010 bzip2/libbzip2 version 1.0.8 of 13 July 2019
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file. README file.
@@ -202,9 +202,9 @@ void fallbackQSort3 ( UInt32* fmap,
bhtab [ 0 .. 2+(nblock/32) ] destroyed bhtab [ 0 .. 2+(nblock/32) ] destroyed
*/ */
#define SET_BH(zz) bhtab[(zz) >> 5] |= (1 << ((zz) & 31)) #define SET_BH(zz) bhtab[(zz) >> 5] |= ((UInt32)1 << ((zz) & 31))
#define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~(1 << ((zz) & 31)) #define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~((UInt32)1 << ((zz) & 31))
#define ISSET_BH(zz) (bhtab[(zz) >> 5] & (1 << ((zz) & 31))) #define ISSET_BH(zz) (bhtab[(zz) >> 5] & ((UInt32)1 << ((zz) & 31)))
#define WORD_BH(zz) bhtab[(zz) >> 5] #define WORD_BH(zz) bhtab[(zz) >> 5]
#define UNALIGNED_BH(zz) ((zz) & 0x01f) #define UNALIGNED_BH(zz) ((zz) & 0x01f)

View File

@@ -7,11 +7,14 @@
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/> <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>
<xsl:import href="bz-common.xsl"/> <xsl:import href="bz-common.xsl"/>
<!-- use 8859-1 encoding --> <!-- use UTF-8 encoding -->
<xsl:output method="html" encoding="ISO-8859-1" indent="yes"/> <xsl:output method="html" encoding="UTF-8" indent="yes"/>
<!-- we include the css directly when generating one large file --> <!-- we include the css as link and directly when generating one large file -->
<xsl:template name="user.head.content"> <xsl:template name="user.head.content">
<xsl:text disable-output-escaping="yes">
<![CDATA[<]]>link rel="stylesheet" type="text/css" href="bzip.css" />
</xsl:text>
<style type="text/css" media="screen"> <style type="text/css" media="screen">
<xsl:text>&bz-css;</xsl:text> <xsl:text>&bz-css;</xsl:text>
</style> </style>

16
bzdiff Normal file → Executable file
View File

@@ -37,10 +37,6 @@ if test -z "$FILES"; then
echo "Usage: $prog [${comp}_options] file [file]" echo "Usage: $prog [${comp}_options] file [file]"
exit 1 exit 1
fi fi
tmp=`mktemp ${TMPDIR:-/tmp}/bzdiff.XXXXXXXXXX` || {
echo 'cannot create a temporary file' >&2
exit 1
}
set $FILES set $FILES
if test $# -eq 1; then if test $# -eq 1; then
FILE=`echo "$1" | sed 's/.bz2$//'` FILE=`echo "$1" | sed 's/.bz2$//'`
@@ -53,10 +49,14 @@ elif test $# -eq 2; then
case "$2" in case "$2" in
*.bz2) *.bz2)
F=`echo "$2" | sed 's|.*/||;s|.bz2$||'` F=`echo "$2" | sed 's|.*/||;s|.bz2$||'`
bzip2 -cdfq "$2" > $tmp tmp=`mktemp "${TMPDIR:-/tmp}"/bzdiff.XXXXXXXXXX` || {
bzip2 -cdfq "$1" | $comp $OPTIONS - $tmp echo 'cannot create a temporary file' >&2
exit 1
}
bzip2 -cdfq "$2" > "$tmp"
bzip2 -cdfq "$1" | $comp $OPTIONS - "$tmp"
STAT="$?" STAT="$?"
/bin/rm -f $tmp;; /bin/rm -f "$tmp";;
*) bzip2 -cdfq "$1" | $comp $OPTIONS - "$2" *) bzip2 -cdfq "$1" | $comp $OPTIONS - "$2"
STAT="$?";; STAT="$?";;
@@ -69,8 +69,8 @@ elif test $# -eq 2; then
STAT="$?";; STAT="$?";;
esac;; esac;;
esac esac
exit "$STAT"
else else
echo "Usage: $prog [${comp}_options] file [file]" echo "Usage: $prog [${comp}_options] file [file]"
exit 1 exit 1
fi fi
exit "$STAT"

20
bzgrep Normal file → Executable file
View File

@@ -63,12 +63,22 @@ for i do
bzip2 -cdfq "$i" | $grep $opt "$pat" bzip2 -cdfq "$i" | $grep $opt "$pat"
r=$? r=$?
else else
j=${i//\\/\\\\} j=$(echo "$i" | sed 's/\\/&&/g;s/|/\\&/g;s/&/\\&/g')
j=${j//|/\\|}
j=${j//&/\\&}
j=`printf "%s" "$j" | tr '\n' ' '` j=`printf "%s" "$j" | tr '\n' ' '`
bzip2 -cdfq "$i" | $grep $opt "$pat" | sed "s|^|${j}:|" # A trick adapted from
r=$? # https://groups.google.com/forum/#!original/comp.unix.shell/x1345iu10eg/Nn1n-1r1uU0J
# that has the same effect as the following bash code:
# bzip2 -cdfq "$i" | $grep $opt "$pat" | sed "s|^|${j}:|"
# r=${PIPESTATUS[1]}
exec 3>&1
eval `
exec 4>&1 >&3 3>&-
{
bzip2 -cdfq "$i" 4>&-
} | {
$grep $opt "$pat" 4>&-; echo "r=$?;" >&4
} | sed "s|^|${j}:|"
`
fi fi
test "$r" -ne 0 && res="$r" test "$r" -ne 0 && res="$r"
done done

View File

@@ -25,7 +25,7 @@ dd {
/* -- ruler -- */ /* -- ruler -- */
div.hr_blue { div.hr_blue {
height: 3px; height: 3px;
background:#ffffff url("/images/hr_blue.png") repeat-x; } background:#ffffff url("../images/hr_blue.png") repeat-x; }
div.hr_blue hr { display:none; } div.hr_blue hr { display:none; }
/* release styles */ /* release styles */
@@ -38,7 +38,7 @@ div.hr_blue hr { display:none; }
ul { ul {
margin: 0px 4px 16px 16px; margin: 0px 4px 16px 16px;
padding: 0px; padding: 0px;
list-style: url("/images/li-blue.png"); list-style: url("../images/li-blue.png");
} }
ul li { ul li {
margin-bottom: 10px; margin-bottom: 10px;

View File

@@ -1,7 +1,7 @@
.PU .PU
.TH bzip2 1 .TH bzip2 1
.SH NAME .SH NAME
bzip2, bunzip2 \- a block-sorting file compressor, v1.0.6 bzip2, bunzip2 \- a block-sorting file compressor, v1.0.8
.br .br
bzcat \- decompresses files to stdout bzcat \- decompresses files to stdout
.br .br
@@ -405,7 +405,7 @@ I/O error messages are not as helpful as they could be.
tries hard to detect I/O errors and exit cleanly, but the details of tries hard to detect I/O errors and exit cleanly, but the details of
what the problem is sometimes seem rather misleading. what the problem is sometimes seem rather misleading.
This manual page pertains to version 1.0.6 of This manual page pertains to version 1.0.8 of
.I bzip2. .I bzip2.
Compressed data created by this version is entirely forwards and Compressed data created by this version is entirely forwards and
backwards compatible with the previous public releases, versions backwards compatible with the previous public releases, versions
@@ -427,9 +427,9 @@ with MaybeUInt64 set to be an unsigned 64-bit integer.
.SH AUTHOR .SH AUTHOR
Julian Seward, jsewardbzip.org. Julian Seward, jseward@acm.org.
http://www.bzip.org https://sourceware.org/bzip2/
The ideas embodied in The ideas embodied in
.I bzip2 .I bzip2

View File

@@ -3,7 +3,7 @@ bzip2(1) bzip2(1)
NNAAMMEE NNAAMMEE
bzip2, bunzip2 a blocksorting file compressor, v1.0.6 bzip2, bunzip2 a blocksorting file compressor, v1.0.8
bzcat decompresses files to stdout bzcat decompresses files to stdout
bzip2recover recovers data from damaged bzip2 files bzip2recover recovers data from damaged bzip2 files
@@ -348,7 +348,7 @@ CCAAVVEEAATTSS
but the details of what the problem is sometimes seem but the details of what the problem is sometimes seem
rather misleading. rather misleading.
This manual page pertains to version 1.0.6 of _b_z_i_p_2_. Com­ This manual page pertains to version 1.0.8 of _b_z_i_p_2_. Com­
pressed data created by this version is entirely forwards pressed data created by this version is entirely forwards
and backwards compatible with the previous public and backwards compatible with the previous public
releases, versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, releases, versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1,
@@ -372,9 +372,9 @@ CCAAVVEEAATTSS
AAUUTTHHOORR AAUUTTHHOORR
Julian Seward, jsewardbzip.org. Julian Seward, jseward@acm.org.
http://www.bzip.org https://sourceware.org/bzip2/
The ideas embodied in _b_z_i_p_2 are due to (at least) the fol­ The ideas embodied in _b_z_i_p_2 are due to (at least) the fol­
lowing people: Michael Burrows and David Wheeler (for the lowing people: Michael Burrows and David Wheeler (for the

40
bzip2.c
View File

@@ -7,8 +7,8 @@
This file is part of bzip2/libbzip2, a program and library for This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression. lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010 bzip2/libbzip2 version 1.0.8 of 13 July 2019
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file. README file.
@@ -128,12 +128,12 @@
#if BZ_LCCWIN32 #if BZ_LCCWIN32
# include <io.h> # include <io.h>
# include <fcntl.h> # include <fcntl.h>
# include <sys\stat.h> # include <sys/stat.h>
# define NORETURN /**/ # define NORETURN /**/
# define PATH_SEP '\\' # define PATH_SEP '\\'
# define MY_LSTAT _stat # define MY_LSTAT _stati64
# define MY_STAT _stat # define MY_STAT _stati64
# define MY_S_ISREG(x) ((x) & _S_IFREG) # define MY_S_ISREG(x) ((x) & _S_IFREG)
# define MY_S_ISDIR(x) ((x) & _S_IFDIR) # define MY_S_ISDIR(x) ((x) & _S_IFDIR)
@@ -554,7 +554,7 @@ static
Bool testStream ( FILE *zStream ) Bool testStream ( FILE *zStream )
{ {
BZFILE* bzf = NULL; BZFILE* bzf = NULL;
Int32 bzerr, bzerr_dummy, ret, nread, streamNo, i; Int32 bzerr, bzerr_dummy, ret, streamNo, i;
UChar obuf[5000]; UChar obuf[5000];
UChar unused[BZ_MAX_UNUSED]; UChar unused[BZ_MAX_UNUSED];
Int32 nUnused; Int32 nUnused;
@@ -577,7 +577,7 @@ Bool testStream ( FILE *zStream )
streamNo++; streamNo++;
while (bzerr == BZ_OK) { while (bzerr == BZ_OK) {
nread = BZ2_bzRead ( &bzerr, bzf, obuf, 5000 ); BZ2_bzRead ( &bzerr, bzf, obuf, 5000 );
if (bzerr == BZ_DATA_ERROR_MAGIC) goto errhandler; if (bzerr == BZ_DATA_ERROR_MAGIC) goto errhandler;
} }
if (bzerr != BZ_STREAM_END) goto errhandler; if (bzerr != BZ_STREAM_END) goto errhandler;
@@ -748,8 +748,8 @@ void panic ( const Char* s )
fprintf ( stderr, fprintf ( stderr,
"\n%s: PANIC -- internal consistency error:\n" "\n%s: PANIC -- internal consistency error:\n"
"\t%s\n" "\t%s\n"
"\tThis is a BUG. Please report it to me at:\n" "\tThis is a BUG. Please report it to:\n"
"\tjseward@bzip.org\n", "\tbzip2-devel@sourceware.org\n",
progName, s ); progName, s );
showFileNames(); showFileNames();
cleanUpAndFail( 3 ); cleanUpAndFail( 3 );
@@ -829,7 +829,7 @@ void mySIGSEGVorSIGBUScatcher ( IntNative n )
" The user's manual, Section 4.3, has more info on (1) and (2).\n" " The user's manual, Section 4.3, has more info on (1) and (2).\n"
" \n" " \n"
" If you suspect this is a bug in bzip2, or are unsure about (1)\n" " If you suspect this is a bug in bzip2, or are unsure about (1)\n"
" or (2), feel free to report it to me at: jseward@bzip.org.\n" " or (2), feel free to report it to: bzip2-devel@sourceware.org.\n"
" Section 4.3 of the user's manual describes the info a useful\n" " Section 4.3 of the user's manual describes the info a useful\n"
" bug report should have. If the manual is available on your\n" " bug report should have. If the manual is available on your\n"
" system, please try and read it before mailing me. If you don't\n" " system, please try and read it before mailing me. If you don't\n"
@@ -852,7 +852,7 @@ void mySIGSEGVorSIGBUScatcher ( IntNative n )
" The user's manual, Section 4.3, has more info on (2) and (3).\n" " The user's manual, Section 4.3, has more info on (2) and (3).\n"
" \n" " \n"
" If you suspect this is a bug in bzip2, or are unsure about (2)\n" " If you suspect this is a bug in bzip2, or are unsure about (2)\n"
" or (3), feel free to report it to me at: jseward@bzip.org.\n" " or (3), feel free to report it to: bzip2-devel@sourceware.org.\n"
" Section 4.3 of the user's manual describes the info a useful\n" " Section 4.3 of the user's manual describes the info a useful\n"
" bug report should have. If the manual is available on your\n" " bug report should have. If the manual is available on your\n"
" system, please try and read it before mailing me. If you don't\n" " system, please try and read it before mailing me. If you don't\n"
@@ -1605,11 +1605,11 @@ void license ( void )
"bzip2, a block-sorting file compressor. " "bzip2, a block-sorting file compressor. "
"Version %s.\n" "Version %s.\n"
" \n" " \n"
" Copyright (C) 1996-2010 by Julian Seward.\n" " Copyright (C) 1996-2019 by Julian Seward.\n"
" \n" " \n"
" This program is free software; you can redistribute it and/or modify\n" " This program is free software; you can redistribute it and/or modify\n"
" it under the terms set out in the LICENSE file, which is included\n" " it under the terms set out in the LICENSE file, which is included\n"
" in the bzip2-1.0.6 source distribution.\n" " in the bzip2 source distribution.\n"
" \n" " \n"
" This program is distributed in the hope that it will be useful,\n" " This program is distributed in the hope that it will be useful,\n"
" but WITHOUT ANY WARRANTY; without even the implied warranty of\n" " but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -2003,12 +2003,14 @@ IntNative main ( IntNative argc, Char *argv[] )
testf ( aa->name ); testf ( aa->name );
} }
} }
if (testFailsExist && noisy) { if (testFailsExist) {
fprintf ( stderr, if (noisy) {
"\n" fprintf ( stderr,
"You can use the `bzip2recover' program to attempt to recover\n" "\n"
"data from undamaged sections of corrupted files.\n\n" "You can use the `bzip2recover' program to attempt to recover\n"
); "data from undamaged sections of corrupted files.\n\n"
);
}
setExit(2); setExit(2);
exit(exitValue); exit(exitValue);
} }

View File

@@ -1,6 +1,6 @@
NAME NAME
bzip2, bunzip2 - a block-sorting file compressor, v1.0.6 bzip2, bunzip2 - a block-sorting file compressor, v1.0.8
bzcat - decompresses files to stdout bzcat - decompresses files to stdout
bzip2recover - recovers data from damaged bzip2 files bzip2recover - recovers data from damaged bzip2 files
@@ -345,7 +345,7 @@ CAVEATS
but the details of what the problem is sometimes seem but the details of what the problem is sometimes seem
rather misleading. rather misleading.
This manual page pertains to version 1.0.6 of bzip2. Com- This manual page pertains to version 1.0.8 of bzip2. Com-
pressed data created by this version is entirely forwards pressed data created by this version is entirely forwards
and backwards compatible with the previous public and backwards compatible with the previous public
releases, versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, releases, versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1,
@@ -367,9 +367,9 @@ CAVEATS
AUTHOR AUTHOR
Julian Seward, jsewardbzip.org. Julian Seward, jseward@acm.org
http://www.bzip.org https://sourceware.org/bzip2/
The ideas embodied in bzip2 are due to (at least) the fol- The ideas embodied in bzip2 are due to (at least) the fol-
lowing people: Michael Burrows and David Wheeler (for the lowing people: Michael Burrows and David Wheeler (for the

View File

@@ -7,8 +7,8 @@
This file is part of bzip2/libbzip2, a program and library for This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression. lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010 bzip2/libbzip2 version 1.0.8 of 13 July 2019
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file. README file.
@@ -309,11 +309,12 @@ Int32 main ( Int32 argc, Char** argv )
UInt32 buffHi, buffLo, blockCRC; UInt32 buffHi, buffLo, blockCRC;
Char* p; Char* p;
strcpy ( progName, argv[0] ); strncpy ( progName, argv[0], BZ_MAX_FILENAME-1);
progName[BZ_MAX_FILENAME-1]='\0';
inFileName[0] = outFileName[0] = 0; inFileName[0] = outFileName[0] = 0;
fprintf ( stderr, fprintf ( stderr,
"bzip2recover 1.0.6: extracts blocks from damaged .bz2 files.\n" ); "bzip2recover 1.0.8: extracts blocks from damaged .bz2 files.\n" );
if (argc != 2) { if (argc != 2) {
fprintf ( stderr, "%s: usage is `%s damaged_file_name'.\n", fprintf ( stderr, "%s: usage is `%s damaged_file_name'.\n",
@@ -457,6 +458,7 @@ Int32 main ( Int32 argc, Char** argv )
bsPutUChar ( bsWr, 0x50 ); bsPutUChar ( bsWr, 0x90 ); bsPutUChar ( bsWr, 0x50 ); bsPutUChar ( bsWr, 0x90 );
bsPutUInt32 ( bsWr, blockCRC ); bsPutUInt32 ( bsWr, blockCRC );
bsClose ( bsWr ); bsClose ( bsWr );
outFile = NULL;
} }
if (wrBlock >= rbCtr) break; if (wrBlock >= rbCtr) break;
wrBlock++; wrBlock++;

View File

@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression. lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010 bzip2/libbzip2 version 1.0.8 of 13 July 2019
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file. README file.
@@ -43,12 +43,12 @@ void BZ2_bz__AssertH__fail ( int errcode )
fprintf(stderr, fprintf(stderr,
"\n\nbzip2/libbzip2: internal error number %d.\n" "\n\nbzip2/libbzip2: internal error number %d.\n"
"This is a bug in bzip2/libbzip2, %s.\n" "This is a bug in bzip2/libbzip2, %s.\n"
"Please report it to me at: jseward@bzip.org. If this happened\n" "Please report it to: bzip2-devel@sourceware.org. If this happened\n"
"when you were using some program which uses libbzip2 as a\n" "when you were using some program which uses libbzip2 as a\n"
"component, you should also report this bug to the author(s)\n" "component, you should also report this bug to the author(s)\n"
"of that program. Please make an effort to report this bug;\n" "of that program. Please make an effort to report this bug;\n"
"timely and accurate bug reports eventually lead to higher\n" "timely and accurate bug reports eventually lead to higher\n"
"quality software. Thanks. Julian Seward, 10 December 2007.\n\n", "quality software. Thanks.\n\n",
errcode, errcode,
BZ2_bzlibVersion() BZ2_bzlibVersion()
); );

View File

@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression. lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010 bzip2/libbzip2 version 1.0.8 of 13 July 2019
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file. README file.

View File

@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression. lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010 bzip2/libbzip2 version 1.0.8 of 13 July 2019
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file. README file.
@@ -36,7 +36,7 @@
/*-- General stuff. --*/ /*-- General stuff. --*/
#define BZ_VERSION "1.0.6, 6-Sept-2010" #define BZ_VERSION "1.0.8, 13-Jul-2019"
typedef char Char; typedef char Char;
typedef unsigned char Bool; typedef unsigned char Bool;

View File

@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression. lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010 bzip2/libbzip2 version 1.0.8 of 13 July 2019
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file. README file.
@@ -454,7 +454,7 @@ void sendMTFValues ( EState* s )
AssertH( nGroups < 8, 3002 ); AssertH( nGroups < 8, 3002 );
AssertH( nSelectors < 32768 && AssertH( nSelectors < 32768 &&
nSelectors <= (2 + (900000 / BZ_G_SIZE)), nSelectors <= BZ_MAX_SELECTORS,
3003 ); 3003 );

View File

@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression. lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010 bzip2/libbzip2 version 1.0.8 of 13 July 2019
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file. README file.

View File

@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression. lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010 bzip2/libbzip2 version 1.0.8 of 13 July 2019
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file. README file.
@@ -285,7 +285,7 @@ Int32 BZ2_decompress ( DState* s )
/*--- Now the selectors ---*/ /*--- Now the selectors ---*/
GET_BITS(BZ_X_SELECTOR_1, nGroups, 3); GET_BITS(BZ_X_SELECTOR_1, nGroups, 3);
if (nGroups < 2 || nGroups > 6) RETURN(BZ_DATA_ERROR); if (nGroups < 2 || nGroups > BZ_N_GROUPS) RETURN(BZ_DATA_ERROR);
GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15); GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15);
if (nSelectors < 1) RETURN(BZ_DATA_ERROR); if (nSelectors < 1) RETURN(BZ_DATA_ERROR);
for (i = 0; i < nSelectors; i++) { for (i = 0; i < nSelectors; i++) {
@@ -296,8 +296,14 @@ Int32 BZ2_decompress ( DState* s )
j++; j++;
if (j >= nGroups) RETURN(BZ_DATA_ERROR); if (j >= nGroups) RETURN(BZ_DATA_ERROR);
} }
s->selectorMtf[i] = j; /* Having more than BZ_MAX_SELECTORS doesn't make much sense
since they will never be used, but some implementations might
"round up" the number of selectors, so just ignore those. */
if (i < BZ_MAX_SELECTORS)
s->selectorMtf[i] = j;
} }
if (nSelectors > BZ_MAX_SELECTORS)
nSelectors = BZ_MAX_SELECTORS;
/*--- Undo the MTF values for the selectors. ---*/ /*--- Undo the MTF values for the selectors. ---*/
{ {

View File

@@ -1,9 +1,10 @@
<!-- misc. strings --> <!-- misc. strings -->
<!ENTITY bz-url "http://www.bzip.org"> <!ENTITY bz-url "https://sourceware.org/bzip2/">
<!ENTITY bz-email "jseward@bzip.org"> <!ENTITY bz-author "jseward@acm.org">
<!ENTITY bz-lifespan "1996-2010"> <!ENTITY bz-email "bzip2-devel@sourceware.org">
<!ENTITY bz-lifespan "1996-2019">
<!ENTITY bz-version "1.0.6"> <!ENTITY bz-version "1.0.8">
<!ENTITY bz-date "6 September 2010"> <!ENTITY bz-date "13 July 2019">
<!ENTITY manual-title "bzip2 Manual"> <!ENTITY manual-title "bzip2 Manual">

4
format.pl Normal file → Executable file
View File

@@ -4,8 +4,8 @@
# This file is part of bzip2/libbzip2, a program and library for # This file is part of bzip2/libbzip2, a program and library for
# lossless, block-sorting data compression. # lossless, block-sorting data compression.
# #
# bzip2/libbzip2 version 1.0.6 of 6 September 2010 # bzip2/libbzip2 version 1.0.8 of 13 July 2019
# Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> # Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
# #
# Please read the WARNING, DISCLAIMER and PATENTS sections in the # Please read the WARNING, DISCLAIMER and PATENTS sections in the
# README file. # README file.

View File

@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression. lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010 bzip2/libbzip2 version 1.0.8 of 13 July 2019
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file. README file.

View File

@@ -1,9 +1,10 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>bzip2 and libbzip2, version 1.0.6</title> <title>bzip2 and libbzip2, version 1.0.8</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2"> <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<style type="text/css" media="screen">/* Colours: <link rel="stylesheet" type="text/css" href="bzip.css" />
<style type="text/css" media="screen">/* Colours:
#74240f dark brown h1, h2, h3, h4 #74240f dark brown h1, h2, h3, h4
#336699 medium blue links #336699 medium blue links
#339999 turquoise link hover colour #339999 turquoise link hover colour
@@ -30,7 +31,7 @@ dd {
/* -- ruler -- */ /* -- ruler -- */
div.hr_blue { div.hr_blue {
height: 3px; height: 3px;
background:#ffffff url("/images/hr_blue.png") repeat-x; } background:#ffffff url("../images/hr_blue.png") repeat-x; }
div.hr_blue hr { display:none; } div.hr_blue hr { display:none; }
/* release styles */ /* release styles */
@@ -43,7 +44,7 @@ div.hr_blue hr { display:none; }
ul { ul {
margin: 0px 4px 16px 16px; margin: 0px 4px 16px 16px;
padding: 0px; padding: 0px;
list-style: url("/images/li-blue.png"); list-style: url("../images/li-blue.png");
} }
ul li { ul li {
margin-bottom: 10px; margin-bottom: 10px;
@@ -79,29 +80,29 @@ div.literallayout, pre.programlisting, pre.screen {
} }
</style> </style>
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div lang="en" class="book" title="bzip2 and libbzip2, version 1.0.6"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div lang="en" class="book">
<div class="titlepage"> <div class="titlepage">
<div> <div>
<div><h1 class="title"> <div><h1 class="title">
<a name="userman"></a>bzip2 and libbzip2, version 1.0.6</h1></div> <a name="userman"></a>bzip2 and libbzip2, version 1.0.8</h1></div>
<div><h2 class="subtitle">A program and library for data compression</h2></div> <div><h2 class="subtitle">A program and library for data compression</h2></div>
<div><div class="authorgroup"><div class="author"> <div><div class="authorgroup"><div class="author">
<h3 class="author"> <h3 class="author">
<span class="firstname">Julian</span> <span class="surname">Seward</span> <span class="firstname">Julian</span> <span class="surname">Seward</span>
</h3> </h3>
<div class="affiliation"><span class="orgname">http://www.bzip.org<br></span></div> <div class="affiliation"><span class="orgname">https://sourceware.org/bzip2/<br></span></div>
</div></div></div> </div></div></div>
<div><p class="releaseinfo">Version 1.0.6 of 6 September 2010</p></div> <div><p class="releaseinfo">Version 1.0.8 of 13 July 2019</p></div>
<div><p class="copyright">Copyright <EFBFBD> 1996-2010 Julian Seward</p></div> <div><p class="copyright">Copyright © 1996-2019 Julian Seward</p></div>
<div><div class="legalnotice" title="Legal Notice"> <div><div class="legalnotice">
<a name="id537185"></a><p>This program, <code class="computeroutput">bzip2</code>, the <a name="legal"></a><p>This program, <code class="computeroutput">bzip2</code>, the
associated library <code class="computeroutput">libbzip2</code>, and associated library <code class="computeroutput">libbzip2</code>, and
all documentation, are copyright <EFBFBD> 1996-2010 Julian Seward. all documentation, are copyright © 1996-2019 Julian Seward.
All rights reserved.</p> All rights reserved.</p>
<p>Redistribution and use in source and binary forms, with <p>Redistribution and use in source and binary forms, with
or without modification, are permitted provided that the or without modification, are permitted provided that the
following conditions are met:</p> following conditions are met:</p>
<div class="itemizedlist"><ul class="itemizedlist" type="bullet"> <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: bullet; ">
<li class="listitem" style="list-style-type: disc"><p>Redistributions of source code must retain the <li class="listitem" style="list-style-type: disc"><p>Redistributions of source code must retain the
above copyright notice, this list of conditions and the above copyright notice, this list of conditions and the
following disclaimer.</p></li> following disclaimer.</p></li>
@@ -142,7 +143,7 @@ div.literallayout, pre.programlisting, pre.screen {
</div> </div>
<div class="toc"> <div class="toc">
<p><b>Table of Contents</b></p> <p><b>Table of Contents</b></p>
<dl> <dl class="toc">
<dt><span class="chapter"><a href="#intro">1. Introduction</a></span></dt> <dt><span class="chapter"><a href="#intro">1. Introduction</a></span></dt>
<dt><span class="chapter"><a href="#using">2. How to use bzip2</a></span></dt> <dt><span class="chapter"><a href="#using">2. How to use bzip2</a></span></dt>
<dd><dl> <dd><dl>
@@ -211,9 +212,9 @@ Programming with <code class="computeroutput">libbzip2</code>
</dl></dd> </dl></dd>
</dl> </dl>
</div> </div>
<div class="chapter" title="1.<2E>Introduction"> <div class="chapter">
<div class="titlepage"><div><div><h2 class="title"> <div class="titlepage"><div><div><h1 class="title">
<a name="intro"></a>1.<EFBFBD>Introduction</h2></div></div></div> <a name="intro"></a>1. Introduction</h1></div></div></div>
<p><code class="computeroutput">bzip2</code> compresses files <p><code class="computeroutput">bzip2</code> compresses files
using the Burrows-Wheeler block-sorting text compression using the Burrows-Wheeler block-sorting text compression
algorithm, and Huffman coding. Compression is generally algorithm, and Huffman coding. Compression is generally
@@ -228,24 +229,24 @@ describes both how to use the program and how to work with the
library interface. Most of the manual is devoted to this library interface. Most of the manual is devoted to this
library, not the program, which is good news if your interest is library, not the program, which is good news if your interest is
only in the program.</p> only in the program.</p>
<div class="itemizedlist"><ul class="itemizedlist" type="bullet"> <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: bullet; ">
<li class="listitem" style="list-style-type: disc"><p><a class="xref" href="#using" title="2.<EFBFBD>How to use bzip2">How to use bzip2</a> describes how to use <li class="listitem" style="list-style-type: disc"><p><a class="xref" href="#using" title="2. How to use bzip2">How to use bzip2</a> describes how to use
<code class="computeroutput">bzip2</code>; this is the only part <code class="computeroutput">bzip2</code>; this is the only part
you need to read if you just want to know how to operate the you need to read if you just want to know how to operate the
program.</p></li> program.</p></li>
<li class="listitem" style="list-style-type: disc"><p><a class="xref" href="#libprog" title="3.<EFBFBD> Programming with libbzip2">Programming with libbzip2</a> describes the <li class="listitem" style="list-style-type: disc"><p><a class="xref" href="#libprog" title="3.  Programming with libbzip2">Programming with libbzip2</a> describes the
programming interfaces in detail, and</p></li> programming interfaces in detail, and</p></li>
<li class="listitem" style="list-style-type: disc"><p><a class="xref" href="#misc" title="4.<EFBFBD>Miscellanea">Miscellanea</a> records some <li class="listitem" style="list-style-type: disc"><p><a class="xref" href="#misc" title="4. Miscellanea">Miscellanea</a> records some
miscellaneous notes which I thought ought to be recorded miscellaneous notes which I thought ought to be recorded
somewhere.</p></li> somewhere.</p></li>
</ul></div> </ul></div>
</div> </div>
<div class="chapter" title="2.<2E>How to use bzip2"> <div class="chapter">
<div class="titlepage"><div><div><h2 class="title"> <div class="titlepage"><div><div><h1 class="title">
<a name="using"></a>2.<EFBFBD>How to use bzip2</h2></div></div></div> <a name="using"></a>2. How to use bzip2</h1></div></div></div>
<div class="toc"> <div class="toc">
<p><b>Table of Contents</b></p> <p><b>Table of Contents</b></p>
<dl> <dl class="toc">
<dt><span class="sect1"><a href="#name">2.1. NAME</a></span></dt> <dt><span class="sect1"><a href="#name">2.1. NAME</a></span></dt>
<dt><span class="sect1"><a href="#synopsis">2.2. SYNOPSIS</a></span></dt> <dt><span class="sect1"><a href="#synopsis">2.2. SYNOPSIS</a></span></dt>
<dt><span class="sect1"><a href="#description">2.3. DESCRIPTION</a></span></dt> <dt><span class="sect1"><a href="#description">2.3. DESCRIPTION</a></span></dt>
@@ -260,23 +261,23 @@ only in the program.</p>
<p>This chapter contains a copy of the <p>This chapter contains a copy of the
<code class="computeroutput">bzip2</code> man page, and nothing <code class="computeroutput">bzip2</code> man page, and nothing
else.</p> else.</p>
<div class="sect1" title="2.1.<2E>NAME"> <div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="name"></a>2.1.<EFBFBD>NAME</h2></div></div></div> <a name="name"></a>2.1. NAME</h2></div></div></div>
<div class="itemizedlist"><ul class="itemizedlist" type="bullet"> <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: bullet; ">
<li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">bzip2</code>, <li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">bzip2</code>,
<code class="computeroutput">bunzip2</code> - a block-sorting file <code class="computeroutput">bunzip2</code> - a block-sorting file
compressor, v1.0.6</p></li> compressor, v1.0.8</p></li>
<li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">bzcat</code> - <li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">bzcat</code> -
decompresses files to stdout</p></li> decompresses files to stdout</p></li>
<li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">bzip2recover</code> - <li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">bzip2recover</code> -
recovers data from damaged bzip2 files</p></li> recovers data from damaged bzip2 files</p></li>
</ul></div> </ul></div>
</div> </div>
<div class="sect1" title="2.2.<2E>SYNOPSIS"> <div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="synopsis"></a>2.2.<EFBFBD>SYNOPSIS</h2></div></div></div> <a name="synopsis"></a>2.2. SYNOPSIS</h2></div></div></div>
<div class="itemizedlist"><ul class="itemizedlist" type="bullet"> <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: bullet; ">
<li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">bzip2</code> [ <li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">bzip2</code> [
-cdfkqstvzVL123456789 ] [ filenames ... ]</p></li> -cdfkqstvzVL123456789 ] [ filenames ... ]</p></li>
<li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">bunzip2</code> [ <li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">bunzip2</code> [
@@ -287,9 +288,9 @@ else.</p>
filename</p></li> filename</p></li>
</ul></div> </ul></div>
</div> </div>
<div class="sect1" title="2.3.<2E>DESCRIPTION"> <div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="description"></a>2.3.<EFBFBD>DESCRIPTION</h2></div></div></div> <a name="description"></a>2.3. DESCRIPTION</h2></div></div></div>
<p><code class="computeroutput">bzip2</code> compresses files <p><code class="computeroutput">bzip2</code> compresses files
using the Burrows-Wheeler block sorting text compression using the Burrows-Wheeler block sorting text compression
algorithm, and Huffman coding. Compression is generally algorithm, and Huffman coding. Compression is generally
@@ -329,7 +330,7 @@ ignored, and a warning issued.
<code class="computeroutput">bzip2</code> attempts to guess the <code class="computeroutput">bzip2</code> attempts to guess the
filename for the decompressed file from that of the compressed filename for the decompressed file from that of the compressed
file as follows:</p> file as follows:</p>
<div class="itemizedlist"><ul class="itemizedlist" type="bullet"> <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: bullet; ">
<li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">filename.bz2 </code> <li class="listitem" style="list-style-type: disc"><p><code class="computeroutput">filename.bz2 </code>
becomes becomes
<code class="computeroutput">filename</code></p></li> <code class="computeroutput">filename</code></p></li>
@@ -407,10 +408,10 @@ to indicate a corrupt compressed file, 3 for an internal
consistency error (eg, bug) which caused consistency error (eg, bug) which caused
<code class="computeroutput">bzip2</code> to panic.</p> <code class="computeroutput">bzip2</code> to panic.</p>
</div> </div>
<div class="sect1" title="2.4.<2E>OPTIONS"> <div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="options"></a>2.4.<EFBFBD>OPTIONS</h2></div></div></div> <a name="options"></a>2.4. OPTIONS</h2></div></div></div>
<div class="variablelist"><dl> <div class="variablelist"><dl class="variablelist">
<dt><span class="term"><code class="computeroutput">-c --stdout</code></span></dt> <dt><span class="term"><code class="computeroutput">-c --stdout</code></span></dt>
<dd><p>Compress or decompress to standard <dd><p>Compress or decompress to standard
output.</p></dd> output.</p></dd>
@@ -458,7 +459,7 @@ consistency error (eg, bug) which caused
the same figure, at the expense of your compression ratio. In the same figure, at the expense of your compression ratio. In
short, if your machine is low on memory (8 megabytes or less), short, if your machine is low on memory (8 megabytes or less),
use <code class="computeroutput">-s</code> for everything. See use <code class="computeroutput">-s</code> for everything. See
<a class="xref" href="#memory-management" title="2.5.<EFBFBD>MEMORY MANAGEMENT">MEMORY MANAGEMENT</a> below.</p> <a class="xref" href="#memory-management" title="2.5. MEMORY MANAGEMENT">MEMORY MANAGEMENT</a> below.</p>
</dd> </dd>
<dt><span class="term"><code class="computeroutput">-q --quiet</code></span></dt> <dt><span class="term"><code class="computeroutput">-q --quiet</code></span></dt>
<dd><p>Suppress non-essential warning messages. <dd><p>Suppress non-essential warning messages.
@@ -478,7 +479,7 @@ consistency error (eg, bug) which caused
<code class="computeroutput">-9</code> (or <code class="computeroutput">-9</code> (or
<code class="computeroutput">-best</code>)</span></dt> <code class="computeroutput">-best</code>)</span></dt>
<dd><p>Set the block size to 100 k, 200 k ... 900 k <dd><p>Set the block size to 100 k, 200 k ... 900 k
when compressing. Has no effect when decompressing. See <a class="xref" href="#memory-management" title="2.5.<EFBFBD>MEMORY MANAGEMENT">MEMORY MANAGEMENT</a> below. The when compressing. Has no effect when decompressing. See <a class="xref" href="#memory-management" title="2.5. MEMORY MANAGEMENT">MEMORY MANAGEMENT</a> below. The
<code class="computeroutput">--fast</code> and <code class="computeroutput">--fast</code> and
<code class="computeroutput">--best</code> aliases are primarily <code class="computeroutput">--best</code> aliases are primarily
for GNU <code class="computeroutput">gzip</code> compatibility. for GNU <code class="computeroutput">gzip</code> compatibility.
@@ -502,9 +503,9 @@ consistency error (eg, bug) which caused
renders these flags irrelevant.</p></dd> renders these flags irrelevant.</p></dd>
</dl></div> </dl></div>
</div> </div>
<div class="sect1" title="2.5.<2E>MEMORY MANAGEMENT"> <div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="memory-management"></a>2.5.<EFBFBD>MEMORY MANAGEMENT</h2></div></div></div> <a name="memory-management"></a>2.5. MEMORY MANAGEMENT</h2></div></div></div>
<p><code class="computeroutput">bzip2</code> compresses large <p><code class="computeroutput">bzip2</code> compresses large
files in blocks. The block size affects both the compression files in blocks. The block size affects both the compression
ratio achieved, and the amount of memory needed for compression ratio achieved, and the amount of memory needed for compression
@@ -574,9 +575,9 @@ Flag usage usage -s usage Size
-8 6800k 3300k 2100k 828642 -8 6800k 3300k 2100k 828642
-9 7600k 3700k 2350k 828642</pre> -9 7600k 3700k 2350k 828642</pre>
</div> </div>
<div class="sect1" title="2.6.<2E>RECOVERING DATA FROM DAMAGED FILES"> <div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="recovering"></a>2.6.<EFBFBD>RECOVERING DATA FROM DAMAGED FILES</h2></div></div></div> <a name="recovering"></a>2.6. RECOVERING DATA FROM DAMAGED FILES</h2></div></div></div>
<p><code class="computeroutput">bzip2</code> compresses files in <p><code class="computeroutput">bzip2</code> compresses files in
blocks, usually 900kbytes long. Each block is handled blocks, usually 900kbytes long. Each block is handled
independently. If a media or transmission error causes a independently. If a media or transmission error causes a
@@ -612,9 +613,9 @@ cannot be recovered. If you wish to minimise any potential data
loss through media or transmission errors, you might consider loss through media or transmission errors, you might consider
compressing with a smaller block size.</p> compressing with a smaller block size.</p>
</div> </div>
<div class="sect1" title="2.7.<2E>PERFORMANCE NOTES"> <div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="performance"></a>2.7.<EFBFBD>PERFORMANCE NOTES</h2></div></div></div> <a name="performance"></a>2.7. PERFORMANCE NOTES</h2></div></div></div>
<p>The sorting phase of compression gathers together similar <p>The sorting phase of compression gathers together similar
strings in the file. Because of this, files containing very long strings in the file. Because of this, files containing very long
runs of repeated symbols, like "aabaabaabaab ..." (repeated runs of repeated symbols, like "aabaabaabaab ..." (repeated
@@ -638,14 +639,14 @@ performance improvements. I imagine
<code class="computeroutput">bzip2</code> will perform best on <code class="computeroutput">bzip2</code> will perform best on
machines with very large caches.</p> machines with very large caches.</p>
</div> </div>
<div class="sect1" title="2.8.<2E>CAVEATS"> <div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="caveats"></a>2.8.<EFBFBD>CAVEATS</h2></div></div></div> <a name="caveats"></a>2.8. CAVEATS</h2></div></div></div>
<p>I/O error messages are not as helpful as they could be. <p>I/O error messages are not as helpful as they could be.
<code class="computeroutput">bzip2</code> tries hard to detect I/O <code class="computeroutput">bzip2</code> tries hard to detect I/O
errors and exit cleanly, but the details of what the problem is errors and exit cleanly, but the details of what the problem is
sometimes seem rather misleading.</p> sometimes seem rather misleading.</p>
<p>This manual page pertains to version 1.0.6 of <p>This manual page pertains to version 1.0.8 of
<code class="computeroutput">bzip2</code>. Compressed data created by <code class="computeroutput">bzip2</code>. Compressed data created by
this version is entirely forwards and backwards compatible with the this version is entirely forwards and backwards compatible with the
previous public releases, versions 0.1pl2, 0.9.0 and 0.9.5, 1.0.0, previous public releases, versions 0.1pl2, 0.9.0 and 0.9.5, 1.0.0,
@@ -665,11 +666,11 @@ build yourself an unlimited version if you can recompile it with
<code class="computeroutput">MaybeUInt64</code> set to be an <code class="computeroutput">MaybeUInt64</code> set to be an
unsigned 64-bit integer.</p> unsigned 64-bit integer.</p>
</div> </div>
<div class="sect1" title="2.9.<2E>AUTHOR"> <div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="author"></a>2.9.<EFBFBD>AUTHOR</h2></div></div></div> <a name="author"></a>2.9. AUTHOR</h2></div></div></div>
<p>Julian Seward, <p>Julian Seward,
<code class="computeroutput">jseward@bzip.org</code></p> <code class="computeroutput">jseward@acm.org</code></p>
<p>The ideas embodied in <p>The ideas embodied in
<code class="computeroutput">bzip2</code> are due to (at least) the <code class="computeroutput">bzip2</code> are due to (at least) the
following people: Michael Burrows and David Wheeler (for the following people: Michael Burrows and David Wheeler (for the
@@ -690,14 +691,14 @@ patches, helped with portability problems, lent machines, gave
advice and were generally helpful.</p> advice and were generally helpful.</p>
</div> </div>
</div> </div>
<div class="chapter" title="3.<2E> Programming with libbzip2"> <div class="chapter">
<div class="titlepage"><div><div><h2 class="title"> <div class="titlepage"><div><div><h1 class="title">
<a name="libprog"></a>3.<EFBFBD> <a name="libprog"></a>3. 
Programming with <code class="computeroutput">libbzip2</code> Programming with <code class="computeroutput">libbzip2</code>
</h2></div></div></div> </h1></div></div></div>
<div class="toc"> <div class="toc">
<p><b>Table of Contents</b></p> <p><b>Table of Contents</b></p>
<dl> <dl class="toc">
<dt><span class="sect1"><a href="#top-level">3.1. Top-level structure</a></span></dt> <dt><span class="sect1"><a href="#top-level">3.1. Top-level structure</a></span></dt>
<dd><dl> <dd><dl>
<dt><span class="sect2"><a href="#ll-summary">3.1.1. Low-level summary</a></span></dt> <dt><span class="sect2"><a href="#ll-summary">3.1.1. Low-level summary</a></span></dt>
@@ -744,10 +745,10 @@ Programming with <code class="computeroutput">libbzip2</code>
<code class="computeroutput">libbzip2</code>.</p> <code class="computeroutput">libbzip2</code>.</p>
<p>For general background information, particularly about <p>For general background information, particularly about
memory use and performance aspects, you'd be well advised to read memory use and performance aspects, you'd be well advised to read
<a class="xref" href="#using" title="2.<EFBFBD>How to use bzip2">How to use bzip2</a> as well.</p> <a class="xref" href="#using" title="2. How to use bzip2">How to use bzip2</a> as well.</p>
<div class="sect1" title="3.1.<2E>Top-level structure"> <div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="top-level"></a>3.1.<EFBFBD>Top-level structure</h2></div></div></div> <a name="top-level"></a>3.1. Top-level structure</h2></div></div></div>
<p><code class="computeroutput">libbzip2</code> is a flexible <p><code class="computeroutput">libbzip2</code> is a flexible
library for compressing and decompressing data in the library for compressing and decompressing data in the
<code class="computeroutput">bzip2</code> data format. Although <code class="computeroutput">bzip2</code> data format. Although
@@ -765,9 +766,9 @@ library clients.</p>
<p>To use any part of the library, you need to <p>To use any part of the library, you need to
<code class="computeroutput">#include &lt;bzlib.h&gt;</code> <code class="computeroutput">#include &lt;bzlib.h&gt;</code>
into your sources.</p> into your sources.</p>
<div class="sect2" title="3.1.1.<2E>Low-level summary"> <div class="sect2">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="ll-summary"></a>3.1.1.<EFBFBD>Low-level summary</h3></div></div></div> <a name="ll-summary"></a>3.1.1. Low-level summary</h3></div></div></div>
<p>This interface provides services for compressing and <p>This interface provides services for compressing and
decompressing data in memory. There's no provision for dealing decompressing data in memory. There's no provision for dealing
with files, streams or any other I/O mechanisms, just straight with files, streams or any other I/O mechanisms, just straight
@@ -800,9 +801,9 @@ to these functions. This is a flexible mechanism allowing a
consumer-pull style of activity, or producer-push, or a mixture consumer-pull style of activity, or producer-push, or a mixture
of both.</p> of both.</p>
</div> </div>
<div class="sect2" title="3.1.2.<2E>High-level summary"> <div class="sect2">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="hl-summary"></a>3.1.2.<EFBFBD>High-level summary</h3></div></div></div> <a name="hl-summary"></a>3.1.2. High-level summary</h3></div></div></div>
<p>This interface provides some handy wrappers around the <p>This interface provides some handy wrappers around the
low-level interface to facilitate reading and writing low-level interface to facilitate reading and writing
<code class="computeroutput">bzip2</code> format files <code class="computeroutput">bzip2</code> format files
@@ -839,9 +840,9 @@ respectively. That avoids portability problems associated with
file operations and file attributes, whilst not being much of an file operations and file attributes, whilst not being much of an
imposition on the programmer.</p> imposition on the programmer.</p>
</div> </div>
<div class="sect2" title="3.1.3.<2E>Utility functions summary"> <div class="sect2">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="util-fns-summary"></a>3.1.3.<EFBFBD>Utility functions summary</h3></div></div></div> <a name="util-fns-summary"></a>3.1.3. Utility functions summary</h3></div></div></div>
<p>For very simple needs, <p>For very simple needs,
<code class="computeroutput">BZ2_bzBuffToBuffCompress</code> and <code class="computeroutput">BZ2_bzBuffToBuffCompress</code> and
<code class="computeroutput">BZ2_bzBuffToBuffDecompress</code> are <code class="computeroutput">BZ2_bzBuffToBuffDecompress</code> are
@@ -871,9 +872,9 @@ I hope to document them properly when time permits.</p>
library to be built as a Windows DLL.</p> library to be built as a Windows DLL.</p>
</div> </div>
</div> </div>
<div class="sect1" title="3.2.<2E>Error handling"> <div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="err-handling"></a>3.2.<EFBFBD>Error handling</h2></div></div></div> <a name="err-handling"></a>3.2. Error handling</h2></div></div></div>
<p>The library is designed to recover cleanly in all <p>The library is designed to recover cleanly in all
situations, including the worst-case situation of decompressing situations, including the worst-case situation of decompressing
random data. I'm not 100% sure that it can always do this, so random data. I'm not 100% sure that it can always do this, so
@@ -901,7 +902,7 @@ value may be returned -- those descriptions are given later.
Rather, it is intended to convey the rough meaning of each return Rather, it is intended to convey the rough meaning of each return
value. The first five actions are normal and not intended to value. The first five actions are normal and not intended to
denote an error situation.</p> denote an error situation.</p>
<div class="variablelist"><dl> <div class="variablelist"><dl class="variablelist">
<dt><span class="term"><code class="computeroutput">BZ_OK</code></span></dt> <dt><span class="term"><code class="computeroutput">BZ_OK</code></span></dt>
<dd><p>The requested action was completed <dd><p>The requested action was completed
successfully.</p></dd> successfully.</p></dd>
@@ -918,7 +919,7 @@ denote an error situation.</p>
</dl></div> </dl></div>
<p>The following return values indicate an error of some <p>The following return values indicate an error of some
kind.</p> kind.</p>
<div class="variablelist"><dl> <div class="variablelist"><dl class="variablelist">
<dt><span class="term"><code class="computeroutput">BZ_CONFIG_ERROR</code></span></dt> <dt><span class="term"><code class="computeroutput">BZ_CONFIG_ERROR</code></span></dt>
<dd><p>Indicates that the library has been improperly <dd><p>Indicates that the library has been improperly
compiled on your platform -- a major configuration error. compiled on your platform -- a major configuration error.
@@ -1008,12 +1009,12 @@ kind.</p>
buffer provided.</p></dd> buffer provided.</p></dd>
</dl></div> </dl></div>
</div> </div>
<div class="sect1" title="3.3.<2E>Low-level interface"> <div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="low-level"></a>3.3.<EFBFBD>Low-level interface</h2></div></div></div> <a name="low-level"></a>3.3. Low-level interface</h2></div></div></div>
<div class="sect2" title="3.3.1.<2E>BZ2_bzCompressInit"> <div class="sect2">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="bzcompress-init"></a>3.3.1.<EFBFBD>BZ2_bzCompressInit</h3></div></div></div> <a name="bzcompress-init"></a>3.3.1. BZ2_bzCompressInit</h3></div></div></div>
<pre class="programlisting">typedef struct { <pre class="programlisting">typedef struct {
char *next_in; char *next_in;
unsigned int avail_in; unsigned int avail_in;
@@ -1137,9 +1138,9 @@ BZ_OK
if BZ_OK is returned if BZ_OK is returned
no specific action needed in case of error</pre> no specific action needed in case of error</pre>
</div> </div>
<div class="sect2" title="3.3.2.<2E>BZ2_bzCompress"> <div class="sect2">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="bzCompress"></a>3.3.2.<EFBFBD>BZ2_bzCompress</h3></div></div></div> <a name="bzCompress"></a>3.3.2. BZ2_bzCompress</h3></div></div></div>
<pre class="programlisting">int BZ2_bzCompress ( bz_stream *strm, int action );</pre> <pre class="programlisting">int BZ2_bzCompress ( bz_stream *strm, int action );</pre>
<p>Provides more input and/or output buffer space for the <p>Provides more input and/or output buffer space for the
library. The caller maintains input and output buffers, and library. The caller maintains input and output buffers, and
@@ -1329,9 +1330,9 @@ a bug in your programming.</p>
<pre class="programlisting">BZ_PARAM_ERROR <pre class="programlisting">BZ_PARAM_ERROR
if strm is NULL, or strm-&gt;s is NULL</pre> if strm is NULL, or strm-&gt;s is NULL</pre>
</div> </div>
<div class="sect2" title="3.3.3.<2E>BZ2_bzCompressEnd"> <div class="sect2">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="bzCompress-end"></a>3.3.3.<EFBFBD>BZ2_bzCompressEnd</h3></div></div></div> <a name="bzCompress-end"></a>3.3.3. BZ2_bzCompressEnd</h3></div></div></div>
<pre class="programlisting">int BZ2_bzCompressEnd ( bz_stream *strm );</pre> <pre class="programlisting">int BZ2_bzCompressEnd ( bz_stream *strm );</pre>
<p>Releases all memory associated with a compression <p>Releases all memory associated with a compression
stream.</p> stream.</p>
@@ -1339,9 +1340,9 @@ stream.</p>
<pre class="programlisting">BZ_PARAM_ERROR if strm is NULL or strm-&gt;s is NULL <pre class="programlisting">BZ_PARAM_ERROR if strm is NULL or strm-&gt;s is NULL
BZ_OK otherwise</pre> BZ_OK otherwise</pre>
</div> </div>
<div class="sect2" title="3.3.4.<2E>BZ2_bzDecompressInit"> <div class="sect2">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="bzDecompress-init"></a>3.3.4.<EFBFBD>BZ2_bzDecompressInit</h3></div></div></div> <a name="bzDecompress-init"></a>3.3.4. BZ2_bzDecompressInit</h3></div></div></div>
<pre class="programlisting">int BZ2_bzDecompressInit ( bz_stream *strm, int verbosity, int small );</pre> <pre class="programlisting">int BZ2_bzDecompressInit ( bz_stream *strm, int verbosity, int small );</pre>
<p>Prepares for decompression. As with <p>Prepares for decompression. As with
<code class="computeroutput">BZ2_bzCompressInit</code>, a <code class="computeroutput">BZ2_bzCompressInit</code>, a
@@ -1364,7 +1365,7 @@ internal state will have been initialised, and
library will use an alternative decompression algorithm which library will use an alternative decompression algorithm which
uses less memory but at the cost of decompressing more slowly uses less memory but at the cost of decompressing more slowly
(roughly speaking, half the speed, but the maximum memory (roughly speaking, half the speed, but the maximum memory
requirement drops to around 2300k). See <a class="xref" href="#using" title="2.<EFBFBD>How to use bzip2">How to use bzip2</a> requirement drops to around 2300k). See <a class="xref" href="#using" title="2. How to use bzip2">How to use bzip2</a>
for more information on memory management.</p> for more information on memory management.</p>
<p>Note that the amount of memory needed to decompress a <p>Note that the amount of memory needed to decompress a
stream cannot be determined until the stream's header has been stream cannot be determined until the stream's header has been
@@ -1386,9 +1387,9 @@ BZ_MEM_ERROR
if BZ_OK was returned if BZ_OK was returned
no specific action required in case of error</pre> no specific action required in case of error</pre>
</div> </div>
<div class="sect2" title="3.3.5.<2E>BZ2_bzDecompress"> <div class="sect2">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="bzDecompress"></a>3.3.5.<EFBFBD>BZ2_bzDecompress</h3></div></div></div> <a name="bzDecompress"></a>3.3.5. BZ2_bzDecompress</h3></div></div></div>
<pre class="programlisting">int BZ2_bzDecompress ( bz_stream *strm );</pre> <pre class="programlisting">int BZ2_bzDecompress ( bz_stream *strm );</pre>
<p>Provides more input and/out output buffer space for the <p>Provides more input and/out output buffer space for the
library. The caller maintains input and output buffers, and uses library. The caller maintains input and output buffers, and uses
@@ -1461,9 +1462,9 @@ BZ_OK
BZ2_bzDecompressEnd BZ2_bzDecompressEnd
otherwise</pre> otherwise</pre>
</div> </div>
<div class="sect2" title="3.3.6.<2E>BZ2_bzDecompressEnd"> <div class="sect2">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="bzDecompress-end"></a>3.3.6.<EFBFBD>BZ2_bzDecompressEnd</h3></div></div></div> <a name="bzDecompress-end"></a>3.3.6. BZ2_bzDecompressEnd</h3></div></div></div>
<pre class="programlisting">int BZ2_bzDecompressEnd ( bz_stream *strm );</pre> <pre class="programlisting">int BZ2_bzDecompressEnd ( bz_stream *strm );</pre>
<p>Releases all memory associated with a decompression <p>Releases all memory associated with a decompression
stream.</p> stream.</p>
@@ -1476,13 +1477,13 @@ BZ_OK
<pre class="programlisting"> None.</pre> <pre class="programlisting"> None.</pre>
</div> </div>
</div> </div>
<div class="sect1" title="3.4.<2E>High-level interface"> <div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="hl-interface"></a>3.4.<EFBFBD>High-level interface</h2></div></div></div> <a name="hl-interface"></a>3.4. High-level interface</h2></div></div></div>
<p>This interface provides functions for reading and writing <p>This interface provides functions for reading and writing
<code class="computeroutput">bzip2</code> format files. First, some <code class="computeroutput">bzip2</code> format files. First, some
general points.</p> general points.</p>
<div class="itemizedlist"><ul class="itemizedlist" type="bullet"> <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: bullet; ">
<li class="listitem" style="list-style-type: disc"><p>All of the functions take an <li class="listitem" style="list-style-type: disc"><p>All of the functions take an
<code class="computeroutput">int*</code> first argument, <code class="computeroutput">int*</code> first argument,
<code class="computeroutput">bzerror</code>. After each call, <code class="computeroutput">bzerror</code>. After each call,
@@ -1532,9 +1533,9 @@ general points.</p>
facility for user-defined memory allocators in the file I/O facility for user-defined memory allocators in the file I/O
functions (could easily be added, though).</p></li> functions (could easily be added, though).</p></li>
</ul></div> </ul></div>
<div class="sect2" title="3.4.1.<2E>BZ2_bzReadOpen"> <div class="sect2">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="bzreadopen"></a>3.4.1.<EFBFBD>BZ2_bzReadOpen</h3></div></div></div> <a name="bzreadopen"></a>3.4.1. BZ2_bzReadOpen</h3></div></div></div>
<pre class="programlisting">typedef void BZFILE; <pre class="programlisting">typedef void BZFILE;
BZFILE *BZ2_bzReadOpen( int *bzerror, FILE *f, BZFILE *BZ2_bzReadOpen( int *bzerror, FILE *f,
@@ -1594,9 +1595,9 @@ NULL
BZ2_bzClose BZ2_bzClose
otherwise</pre> otherwise</pre>
</div> </div>
<div class="sect2" title="3.4.2.<2E>BZ2_bzRead"> <div class="sect2">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="bzread"></a>3.4.2.<EFBFBD>BZ2_bzRead</h3></div></div></div> <a name="bzread"></a>3.4.2. BZ2_bzRead</h3></div></div></div>
<pre class="programlisting">int BZ2_bzRead ( int *bzerror, BZFILE *b, void *buf, int len );</pre> <pre class="programlisting">int BZ2_bzRead ( int *bzerror, BZFILE *b, void *buf, int len );</pre>
<p>Reads up to <code class="computeroutput">len</code> <p>Reads up to <code class="computeroutput">len</code>
(uncompressed) bytes from the compressed file (uncompressed) bytes from the compressed file
@@ -1668,9 +1669,9 @@ collect data from buf, then BZ2_bzReadClose or BZ2_bzReadGetUnused
BZ2_bzReadClose BZ2_bzReadClose
otherwise</pre> otherwise</pre>
</div> </div>
<div class="sect2" title="3.4.3.<2E>BZ2_bzReadGetUnused"> <div class="sect2">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="bzreadgetunused"></a>3.4.3.<EFBFBD>BZ2_bzReadGetUnused</h3></div></div></div> <a name="bzreadgetunused"></a>3.4.3. BZ2_bzReadGetUnused</h3></div></div></div>
<pre class="programlisting">void BZ2_bzReadGetUnused( int* bzerror, BZFILE *b, <pre class="programlisting">void BZ2_bzReadGetUnused( int* bzerror, BZFILE *b,
void** unused, int* nUnused );</pre> void** unused, int* nUnused );</pre>
<p>Returns data which was read from the compressed file but <p>Returns data which was read from the compressed file but
@@ -1697,9 +1698,9 @@ BZ_OK
<p>Allowable next actions:</p> <p>Allowable next actions:</p>
<pre class="programlisting">BZ2_bzReadClose</pre> <pre class="programlisting">BZ2_bzReadClose</pre>
</div> </div>
<div class="sect2" title="3.4.4.<2E>BZ2_bzReadClose"> <div class="sect2">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="bzreadclose"></a>3.4.4.<EFBFBD>BZ2_bzReadClose</h3></div></div></div> <a name="bzreadclose"></a>3.4.4. BZ2_bzReadClose</h3></div></div></div>
<pre class="programlisting">void BZ2_bzReadClose ( int *bzerror, BZFILE *b );</pre> <pre class="programlisting">void BZ2_bzReadClose ( int *bzerror, BZFILE *b );</pre>
<p>Releases all memory pertaining to the compressed file <p>Releases all memory pertaining to the compressed file
<code class="computeroutput">b</code>. <code class="computeroutput">b</code>.
@@ -1717,9 +1718,9 @@ BZ_OK
<p>Allowable next actions:</p> <p>Allowable next actions:</p>
<pre class="programlisting">none</pre> <pre class="programlisting">none</pre>
</div> </div>
<div class="sect2" title="3.4.5.<2E>BZ2_bzWriteOpen"> <div class="sect2">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="bzwriteopen"></a>3.4.5.<EFBFBD>BZ2_bzWriteOpen</h3></div></div></div> <a name="bzwriteopen"></a>3.4.5. BZ2_bzWriteOpen</h3></div></div></div>
<pre class="programlisting">BZFILE *BZ2_bzWriteOpen( int *bzerror, FILE *f, <pre class="programlisting">BZFILE *BZ2_bzWriteOpen( int *bzerror, FILE *f,
int blockSize100k, int verbosity, int blockSize100k, int verbosity,
int workFactor );</pre> int workFactor );</pre>
@@ -1763,9 +1764,9 @@ NULL
BZ2_bzWriteClose BZ2_bzWriteClose
otherwise</pre> otherwise</pre>
</div> </div>
<div class="sect2" title="3.4.6.<2E>BZ2_bzWrite"> <div class="sect2">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="bzwrite"></a>3.4.6.<EFBFBD>BZ2_bzWrite</h3></div></div></div> <a name="bzwrite"></a>3.4.6. BZ2_bzWrite</h3></div></div></div>
<pre class="programlisting">void BZ2_bzWrite ( int *bzerror, BZFILE *b, void *buf, int len );</pre> <pre class="programlisting">void BZ2_bzWrite ( int *bzerror, BZFILE *b, void *buf, int len );</pre>
<p>Absorbs <code class="computeroutput">len</code> bytes from the <p>Absorbs <code class="computeroutput">len</code> bytes from the
buffer <code class="computeroutput">buf</code>, eventually to be buffer <code class="computeroutput">buf</code>, eventually to be
@@ -1781,9 +1782,9 @@ BZ_IO_ERROR
BZ_OK BZ_OK
otherwise</pre> otherwise</pre>
</div> </div>
<div class="sect2" title="3.4.7.<2E>BZ2_bzWriteClose"> <div class="sect2">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="bzwriteclose"></a>3.4.7.<EFBFBD>BZ2_bzWriteClose</h3></div></div></div> <a name="bzwriteclose"></a>3.4.7. BZ2_bzWriteClose</h3></div></div></div>
<pre class="programlisting">void BZ2_bzWriteClose( int *bzerror, BZFILE* f, <pre class="programlisting">void BZ2_bzWriteClose( int *bzerror, BZFILE* f,
int abandon, int abandon,
unsigned int* nbytes_in, unsigned int* nbytes_in,
@@ -1833,13 +1834,13 @@ BZ_IO_ERROR
BZ_OK BZ_OK
otherwise</pre> otherwise</pre>
</div> </div>
<div class="sect2" title="3.4.8.<2E>Handling embedded compressed data streams"> <div class="sect2">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="embed"></a>3.4.8.<EFBFBD>Handling embedded compressed data streams</h3></div></div></div> <a name="embed"></a>3.4.8. Handling embedded compressed data streams</h3></div></div></div>
<p>The high-level library facilitates use of <p>The high-level library facilitates use of
<code class="computeroutput">bzip2</code> data streams which form <code class="computeroutput">bzip2</code> data streams which form
some part of a surrounding, larger data stream.</p> some part of a surrounding, larger data stream.</p>
<div class="itemizedlist"><ul class="itemizedlist" type="bullet"> <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: bullet; ">
<li class="listitem" style="list-style-type: disc"><p>For writing, the library takes an open file handle, <li class="listitem" style="list-style-type: disc"><p>For writing, the library takes an open file handle,
writes compressed data to it, writes compressed data to it,
<code class="computeroutput">fflush</code>es it but does not <code class="computeroutput">fflush</code>es it but does not
@@ -1882,9 +1883,9 @@ can be used. If you require extra flexibility, you'll have to
bite the bullet and get to grips with the low-level bite the bullet and get to grips with the low-level
interface.</p> interface.</p>
</div> </div>
<div class="sect2" title="3.4.9.<2E>Standard file-reading/writing code"> <div class="sect2">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="std-rdwr"></a>3.4.9.<EFBFBD>Standard file-reading/writing code</h3></div></div></div> <a name="std-rdwr"></a>3.4.9. Standard file-reading/writing code</h3></div></div></div>
<p>Here's how you'd write data to a compressed file:</p> <p>Here's how you'd write data to a compressed file:</p>
<pre class="programlisting">FILE* f; <pre class="programlisting">FILE* f;
BZFILE* b; BZFILE* b;
@@ -1949,12 +1950,12 @@ if ( bzerror != BZ_STREAM_END ) {
}</pre> }</pre>
</div> </div>
</div> </div>
<div class="sect1" title="3.5.<2E>Utility functions"> <div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="util-fns"></a>3.5.<EFBFBD>Utility functions</h2></div></div></div> <a name="util-fns"></a>3.5. Utility functions</h2></div></div></div>
<div class="sect2" title="3.5.1.<2E>BZ2_bzBuffToBuffCompress"> <div class="sect2">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="bzbufftobuffcompress"></a>3.5.1.<EFBFBD>BZ2_bzBuffToBuffCompress</h3></div></div></div> <a name="bzbufftobuffcompress"></a>3.5.1. BZ2_bzBuffToBuffCompress</h3></div></div></div>
<pre class="programlisting">int BZ2_bzBuffToBuffCompress( char* dest, <pre class="programlisting">int BZ2_bzBuffToBuffCompress( char* dest,
unsigned int* destLen, unsigned int* destLen,
char* source, char* source,
@@ -2005,9 +2006,9 @@ BZ_OUTBUFF_FULL
BZ_OK BZ_OK
otherwise</pre> otherwise</pre>
</div> </div>
<div class="sect2" title="3.5.2.<2E>BZ2_bzBuffToBuffDecompress"> <div class="sect2">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="bzbufftobuffdecompress"></a>3.5.2.<EFBFBD>BZ2_bzBuffToBuffDecompress</h3></div></div></div> <a name="bzbufftobuffdecompress"></a>3.5.2. BZ2_bzBuffToBuffDecompress</h3></div></div></div>
<pre class="programlisting">int BZ2_bzBuffToBuffDecompress( char* dest, <pre class="programlisting">int BZ2_bzBuffToBuffDecompress( char* dest,
unsigned int* destLen, unsigned int* destLen,
char* source, char* source,
@@ -2065,9 +2066,9 @@ BZ_OK
otherwise</pre> otherwise</pre>
</div> </div>
</div> </div>
<div class="sect1" title="3.6.<2E>zlib compatibility functions"> <div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="zlib-compat"></a>3.6.<EFBFBD>zlib compatibility functions</h2></div></div></div> <a name="zlib-compat"></a>3.6. zlib compatibility functions</h2></div></div></div>
<p>Yoshioka Tsuneo has contributed some functions to give <p>Yoshioka Tsuneo has contributed some functions to give
better <code class="computeroutput">zlib</code> compatibility. better <code class="computeroutput">zlib</code> compatibility.
These functions are <code class="computeroutput">BZ2_bzopen</code>, These functions are <code class="computeroutput">BZ2_bzopen</code>,
@@ -2108,12 +2109,12 @@ and <code class="computeroutput">fclose</code>.</p>
<code class="computeroutput">*errnum</code> to its numerical <code class="computeroutput">*errnum</code> to its numerical
value.</p> value.</p>
</div> </div>
<div class="sect1" title="3.7.<2E>Using the library in a stdio-free environment"> <div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="stdio-free"></a>3.7.<EFBFBD>Using the library in a stdio-free environment</h2></div></div></div> <a name="stdio-free"></a>3.7. Using the library in a stdio-free environment</h2></div></div></div>
<div class="sect2" title="3.7.1.<2E>Getting rid of stdio"> <div class="sect2">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="stdio-bye"></a>3.7.1.<EFBFBD>Getting rid of stdio</h3></div></div></div> <a name="stdio-bye"></a>3.7.1. Getting rid of stdio</h3></div></div></div>
<p>In a deeply embedded application, you might want to use <p>In a deeply embedded application, you might want to use
just the memory-to-memory functions. You can do this just the memory-to-memory functions. You can do this
conveniently by compiling the library with preprocessor symbol conveniently by compiling the library with preprocessor symbol
@@ -2131,9 +2132,9 @@ functions:</p>
<p>When compiled like this, all functions will ignore <p>When compiled like this, all functions will ignore
<code class="computeroutput">verbosity</code> settings.</p> <code class="computeroutput">verbosity</code> settings.</p>
</div> </div>
<div class="sect2" title="3.7.2.<2E>Critical error handling"> <div class="sect2">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
<a name="critical-error"></a>3.7.2.<EFBFBD>Critical error handling</h3></div></div></div> <a name="critical-error"></a>3.7.2. Critical error handling</h3></div></div></div>
<p><code class="computeroutput">libbzip2</code> contains a number <p><code class="computeroutput">libbzip2</code> contains a number
of internal assertion checks which should, needless to say, never of internal assertion checks which should, needless to say, never
be activated. Nevertheless, if an assertion should fail, be activated. Nevertheless, if an assertion should fail,
@@ -2143,13 +2144,13 @@ behaviour depends on whether or not the library was compiled with
message:</p> message:</p>
<div class="blockquote"><blockquote class="blockquote"> <div class="blockquote"><blockquote class="blockquote">
<p>bzip2/libbzip2: internal error number N.</p> <p>bzip2/libbzip2: internal error number N.</p>
<p>This is a bug in bzip2/libbzip2, 1.0.6 of 6 September 2010. <p>This is a bug in bzip2/libbzip2, 1.0.8 of 13 July 2019.
Please report it to me at: jseward@bzip.org. If this happened Please report it to: bzip2-devel@sourceware.org. If this happened
when you were using some program which uses libbzip2 as a when you were using some program which uses libbzip2 as a
component, you should also report this bug to the author(s) component, you should also report this bug to the author(s)
of that program. Please make an effort to report this bug; of that program. Please make an effort to report this bug;
timely and accurate bug reports eventually lead to higher timely and accurate bug reports eventually lead to higher
quality software. Thanks. Julian Seward, 6 September 2010. quality software. Thanks.
</p> </p>
</blockquote></div> </blockquote></div>
<p>where <code class="computeroutput">N</code> is some error code <p>where <code class="computeroutput">N</code> is some error code
@@ -2176,14 +2177,14 @@ are indicated via error return codes from functions, and can be
recovered from.</p> recovered from.</p>
</div> </div>
</div> </div>
<div class="sect1" title="3.8.<2E>Making a Windows DLL"> <div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="win-dll"></a>3.8.<EFBFBD>Making a Windows DLL</h2></div></div></div> <a name="win-dll"></a>3.8. Making a Windows DLL</h2></div></div></div>
<p>Everything related to Windows has been contributed by <p>Everything related to Windows has been contributed by
Yoshioka Tsuneo Yoshioka Tsuneo
(<code class="computeroutput">tsuneo@rr.iij4u.or.jp</code>), so (<code class="computeroutput">tsuneo@rr.iij4u.or.jp</code>), so
you should send your queries to him (but perhaps Cc: me, you should send your queries to him (but please Cc:
<code class="computeroutput">jseward@bzip.org</code>).</p> <code class="computeroutput">bzip2-devel@sourceware.org</code>).</p>
<p>My vague understanding of what to do is: using Visual C++ <p>My vague understanding of what to do is: using Visual C++
5.0, open the project file 5.0, open the project file
<code class="computeroutput">libbz2.dsp</code>, and build. That's <code class="computeroutput">libbz2.dsp</code>, and build. That's
@@ -2218,12 +2219,12 @@ Otherwise the resulting binary won't work correctly.</p>
plausible.</p> plausible.</p>
</div> </div>
</div> </div>
<div class="chapter" title="4.<2E>Miscellanea"> <div class="chapter">
<div class="titlepage"><div><div><h2 class="title"> <div class="titlepage"><div><div><h1 class="title">
<a name="misc"></a>4.<EFBFBD>Miscellanea</h2></div></div></div> <a name="misc"></a>4. Miscellanea</h1></div></div></div>
<div class="toc"> <div class="toc">
<p><b>Table of Contents</b></p> <p><b>Table of Contents</b></p>
<dl> <dl class="toc">
<dt><span class="sect1"><a href="#limits">4.1. Limitations of the compressed file format</a></span></dt> <dt><span class="sect1"><a href="#limits">4.1. Limitations of the compressed file format</a></span></dt>
<dt><span class="sect1"><a href="#port-issues">4.2. Portability issues</a></span></dt> <dt><span class="sect1"><a href="#port-issues">4.2. Portability issues</a></span></dt>
<dt><span class="sect1"><a href="#bugs">4.3. Reporting bugs</a></span></dt> <dt><span class="sect1"><a href="#bugs">4.3. Reporting bugs</a></span></dt>
@@ -2233,9 +2234,9 @@ plausible.</p>
</div> </div>
<p>These are just some random thoughts of mine. Your mileage <p>These are just some random thoughts of mine. Your mileage
may vary.</p> may vary.</p>
<div class="sect1" title="4.1.<2E>Limitations of the compressed file format"> <div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="limits"></a>4.1.<EFBFBD>Limitations of the compressed file format</h2></div></div></div> <a name="limits"></a>4.1. Limitations of the compressed file format</h2></div></div></div>
<p><code class="computeroutput">bzip2-1.0.X</code>, <p><code class="computeroutput">bzip2-1.0.X</code>,
<code class="computeroutput">0.9.5</code> and <code class="computeroutput">0.9.5</code> and
<code class="computeroutput">0.9.0</code> use exactly the same file <code class="computeroutput">0.9.0</code> use exactly the same file
@@ -2250,7 +2251,7 @@ work since the release of
shown complexities in the file format which slow down shown complexities in the file format which slow down
decompression and, in retrospect, are unnecessary. These decompression and, in retrospect, are unnecessary. These
are:</p> are:</p>
<div class="itemizedlist"><ul class="itemizedlist" type="bullet"> <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: bullet; ">
<li class="listitem" style="list-style-type: disc"><p>The run-length encoder, which is the first of the <li class="listitem" style="list-style-type: disc"><p>The run-length encoder, which is the first of the
compression transformations, is entirely irrelevant. The compression transformations, is entirely irrelevant. The
original purpose was to protect the sorting algorithm from the original purpose was to protect the sorting algorithm from the
@@ -2298,7 +2299,7 @@ properly and fully understood the performance consequences of
doing so.</p> doing so.</p>
<p>Improvements which I was able to incorporate into 0.9.0, <p>Improvements which I was able to incorporate into 0.9.0,
despite using the same file format, are:</p> despite using the same file format, are:</p>
<div class="itemizedlist"><ul class="itemizedlist" type="bullet"> <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: bullet; ">
<li class="listitem" style="list-style-type: disc"><p>Single array implementation of the inverse BWT. This <li class="listitem" style="list-style-type: disc"><p>Single array implementation of the inverse BWT. This
significantly speeds up decompression, presumably because it significantly speeds up decompression, presumably because it
reduces the number of cache misses.</p></li> reduces the number of cache misses.</p></li>
@@ -2316,9 +2317,9 @@ despite using the same file format, are:</p>
access into files. This will require some careful design of access into files. This will require some careful design of
compressed file formats.</p> compressed file formats.</p>
</div> </div>
<div class="sect1" title="4.2.<2E>Portability issues"> <div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="port-issues"></a>4.2.<EFBFBD>Portability issues</h2></div></div></div> <a name="port-issues"></a>4.2. Portability issues</h2></div></div></div>
<p>After some consideration, I have decided not to use GNU <p>After some consideration, I have decided not to use GNU
<code class="computeroutput">autoconf</code> to configure 0.9.5 or <code class="computeroutput">autoconf</code> to configure 0.9.5 or
1.0.</p> 1.0.</p>
@@ -2366,9 +2367,9 @@ and <code class="computeroutput">BZ_LCCWIN32</code> to 1, in the
file <code class="computeroutput">bzip2.c</code>, before compiling. file <code class="computeroutput">bzip2.c</code>, before compiling.
Otherwise the resulting binary won't work correctly.</p> Otherwise the resulting binary won't work correctly.</p>
</div> </div>
<div class="sect1" title="4.3.<2E>Reporting bugs"> <div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="bugs"></a>4.3.<EFBFBD>Reporting bugs</h2></div></div></div> <a name="bugs"></a>4.3. Reporting bugs</h2></div></div></div>
<p>I tried pretty hard to make sure <p>I tried pretty hard to make sure
<code class="computeroutput">bzip2</code> is bug free, both by <code class="computeroutput">bzip2</code> is bug free, both by
design and by testing. Hopefully you'll never need to read this design and by testing. Hopefully you'll never need to read this
@@ -2379,7 +2380,7 @@ failure, it will ask you to email me a bug report. Experience from
years of feedback of bzip2 users indicates that almost all these years of feedback of bzip2 users indicates that almost all these
problems can be traced to either compiler bugs or hardware problems can be traced to either compiler bugs or hardware
problems.</p> problems.</p>
<div class="itemizedlist"><ul class="itemizedlist" type="bullet"> <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: bullet; ">
<li class="listitem" style="list-style-type: disc"> <li class="listitem" style="list-style-type: disc">
<p>Recompile the program with no optimisation, and <p>Recompile the program with no optimisation, and
see if it works. And/or try a different compiler. I heard all see if it works. And/or try a different compiler. I heard all
@@ -2447,9 +2448,9 @@ is the file that you were trying to compress or decompress at the
time the problem happened. Without that, my ability to do time the problem happened. Without that, my ability to do
anything more than speculate about the cause, is limited.</p> anything more than speculate about the cause, is limited.</p>
</div> </div>
<div class="sect1" title="4.4.<2E>Did you get the right package?"> <div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="package"></a>4.4.<EFBFBD>Did you get the right package?</h2></div></div></div> <a name="package"></a>4.4. Did you get the right package?</h2></div></div></div>
<p><code class="computeroutput">bzip2</code> is a resource hog. <p><code class="computeroutput">bzip2</code> is a resource hog.
It soaks up large amounts of CPU cycles and memory. Also, it It soaks up large amounts of CPU cycles and memory. Also, it
gives very large latencies. In the worst case, you can feed many gives very large latencies. In the worst case, you can feed many
@@ -2472,47 +2473,47 @@ X J Oberhumer's <code class="computeroutput">LZO</code> real-time
compression/decompression library, at compression/decompression library, at
<a class="ulink" href="http://www.oberhumer.com/opensource" target="_top">http://www.oberhumer.com/opensource</a>.</p> <a class="ulink" href="http://www.oberhumer.com/opensource" target="_top">http://www.oberhumer.com/opensource</a>.</p>
</div> </div>
<div class="sect1" title="4.5.<2E>Further Reading"> <div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both"> <div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="reading"></a>4.5.<EFBFBD>Further Reading</h2></div></div></div> <a name="reading"></a>4.5. Further Reading</h2></div></div></div>
<p><code class="computeroutput">bzip2</code> is not research <p><code class="computeroutput">bzip2</code> is not research
work, in the sense that it doesn't present any new ideas. work, in the sense that it doesn't present any new ideas.
Rather, it's an engineering exercise based on existing Rather, it's an engineering exercise based on existing
ideas.</p> ideas.</p>
<p>Four documents describe essentially all the ideas behind <p>Four documents describe essentially all the ideas behind
<code class="computeroutput">bzip2</code>:</p> <code class="computeroutput">bzip2</code>:</p>
<div class="literallayout"><p>Michael<EFBFBD>Burrows<EFBFBD>and<EFBFBD>D.<EFBFBD>J.<EFBFBD>Wheeler:<br> <div class="literallayout"><p>Michael Burrows and D. J. Wheeler:<br>
<EFBFBD><EFBFBD>"A<EFBFBD>block-sorting<EFBFBD>lossless<EFBFBD>data<EFBFBD>compression<EFBFBD>algorithm"<br>   "A block-sorting lossless data compression algorithm"<br>
<EFBFBD><EFBFBD><EFBFBD>10th<EFBFBD>May<EFBFBD>1994.<EFBFBD><br>    10th May 1994. <br>
<EFBFBD><EFBFBD><EFBFBD>Digital<EFBFBD>SRC<EFBFBD>Research<EFBFBD>Report<EFBFBD>124.<br>    Digital SRC Research Report 124.<br>
<EFBFBD><EFBFBD><EFBFBD>ftp://ftp.digital.com/pub/DEC/SRC/research-reports/SRC-124.ps.gz<br>    ftp://ftp.digital.com/pub/DEC/SRC/research-reports/SRC-124.ps.gz<br>
<EFBFBD><EFBFBD><EFBFBD>If<EFBFBD>you<EFBFBD>have<EFBFBD>trouble<EFBFBD>finding<EFBFBD>it,<EFBFBD>try<EFBFBD>searching<EFBFBD>at<EFBFBD>the<br>    If you have trouble finding it, try searching at the<br>
<EFBFBD><EFBFBD><EFBFBD>New<EFBFBD>Zealand<EFBFBD>Digital<EFBFBD>Library,<EFBFBD>http://www.nzdl.org.<br>    New Zealand Digital Library, http://www.nzdl.org.<br>
<br> <br>
Daniel<EFBFBD>S.<EFBFBD>Hirschberg<EFBFBD>and<EFBFBD>Debra<EFBFBD>A.<EFBFBD>LeLewer<br> Daniel S. Hirschberg and Debra A. LeLewer<br>
<EFBFBD><EFBFBD>"Efficient<EFBFBD>Decoding<EFBFBD>of<EFBFBD>Prefix<EFBFBD>Codes"<br>   "Efficient Decoding of Prefix Codes"<br>
<EFBFBD><EFBFBD><EFBFBD>Communications<EFBFBD>of<EFBFBD>the<EFBFBD>ACM,<EFBFBD>April<EFBFBD>1990,<EFBFBD>Vol<EFBFBD>33,<EFBFBD>Number<EFBFBD>4.<br>    Communications of the ACM, April 1990, Vol 33, Number 4.<br>
<EFBFBD><EFBFBD><EFBFBD>You<EFBFBD>might<EFBFBD>be<EFBFBD>able<EFBFBD>to<EFBFBD>get<EFBFBD>an<EFBFBD>electronic<EFBFBD>copy<EFBFBD>of<EFBFBD>this<br>    You might be able to get an electronic copy of this<br>
<EFBFBD><EFBFBD><EFBFBD>from<EFBFBD>the<EFBFBD>ACM<EFBFBD>Digital<EFBFBD>Library.<br>    from the ACM Digital Library.<br>
<br> <br>
David<EFBFBD>J.<EFBFBD>Wheeler<br> David J. Wheeler<br>
<EFBFBD><EFBFBD><EFBFBD>Program<EFBFBD>bred3.c<EFBFBD>and<EFBFBD>accompanying<EFBFBD>document<EFBFBD>bred3.ps.<br>    Program bred3.c and accompanying document bred3.ps.<br>
<EFBFBD><EFBFBD><EFBFBD>This<EFBFBD>contains<EFBFBD>the<EFBFBD>idea<EFBFBD>behind<EFBFBD>the<EFBFBD>multi-table<EFBFBD>Huffman<EFBFBD>coding<EFBFBD>scheme.<br>    This contains the idea behind the multi-table Huffman coding scheme.<br>
<EFBFBD><EFBFBD><EFBFBD>ftp://ftp.cl.cam.ac.uk/users/djw3/<br>    ftp://ftp.cl.cam.ac.uk/users/djw3/<br>
<br> <br>
Jon<EFBFBD>L.<EFBFBD>Bentley<EFBFBD>and<EFBFBD>Robert<EFBFBD>Sedgewick<br> Jon L. Bentley and Robert Sedgewick<br>
<EFBFBD><EFBFBD>"Fast<EFBFBD>Algorithms<EFBFBD>for<EFBFBD>Sorting<EFBFBD>and<EFBFBD>Searching<EFBFBD>Strings"<br>   "Fast Algorithms for Sorting and Searching Strings"<br>
<EFBFBD><EFBFBD><EFBFBD>Available<EFBFBD>from<EFBFBD>Sedgewick's<EFBFBD>web<EFBFBD>page,<br>    Available from Sedgewick's web page,<br>
<EFBFBD><EFBFBD><EFBFBD>www.cs.princeton.edu/~rs<br>    www.cs.princeton.edu/~rs<br>
</p></div> </p></div>
<p>The following paper gives valuable additional insights into <p>The following paper gives valuable additional insights into
the algorithm, but is not immediately the basis of any code used the algorithm, but is not immediately the basis of any code used
in bzip2.</p> in bzip2.</p>
<div class="literallayout"><p>Peter<EFBFBD>Fenwick:<br> <div class="literallayout"><p>Peter Fenwick:<br>
<EFBFBD><EFBFBD><EFBFBD>Block<EFBFBD>Sorting<EFBFBD>Text<EFBFBD>Compression<br>    Block Sorting Text Compression<br>
<EFBFBD><EFBFBD><EFBFBD>Proceedings<EFBFBD>of<EFBFBD>the<EFBFBD>19th<EFBFBD>Australasian<EFBFBD>Computer<EFBFBD>Science<EFBFBD>Conference,<br>    Proceedings of the 19th Australasian Computer Science Conference,<br>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Melbourne,<EFBFBD>Australia.<EFBFBD><EFBFBD>Jan<EFBFBD>31<EFBFBD>-<2D>Feb<EFBFBD>2,<EFBFBD>1996.<br>      Melbourne, Australia.  Jan 31 - Feb 2, 1996.<br>
<EFBFBD><EFBFBD><EFBFBD>ftp://ftp.cs.auckland.ac.nz/pub/peter-f/ACSC96paper.ps</p></div>    ftp://ftp.cs.auckland.ac.nz/pub/peter-f/ACSC96paper.ps</p></div>
<p>Kunihiko Sadakane's sorting algorithm, mentioned above, is <p>Kunihiko Sadakane's sorting algorithm, mentioned above, is
available from:</p> available from:</p>
<div class="literallayout"><p>http://naomi.is.s.u-tokyo.ac.jp/~sada/papers/Sada98b.ps.gz<br> <div class="literallayout"><p>http://naomi.is.s.u-tokyo.ac.jp/~sada/papers/Sada98b.ps.gz<br>
@@ -2524,15 +2525,15 @@ described in a paper available from:</p>
<p>Finally, the following papers document some <p>Finally, the following papers document some
investigations I made into the performance of sorting investigations I made into the performance of sorting
and decompression algorithms:</p> and decompression algorithms:</p>
<div class="literallayout"><p>Julian<EFBFBD>Seward<br> <div class="literallayout"><p>Julian Seward<br>
<EFBFBD><EFBFBD><EFBFBD>On<EFBFBD>the<EFBFBD>Performance<EFBFBD>of<EFBFBD>BWT<EFBFBD>Sorting<EFBFBD>Algorithms<br>    On the Performance of BWT Sorting Algorithms<br>
<EFBFBD><EFBFBD><EFBFBD>Proceedings<EFBFBD>of<EFBFBD>the<EFBFBD>IEEE<EFBFBD>Data<EFBFBD>Compression<EFBFBD>Conference<EFBFBD>2000<br>    Proceedings of the IEEE Data Compression Conference 2000<br>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Snowbird,<EFBFBD>Utah.<EFBFBD><EFBFBD>28-30<EFBFBD>March<EFBFBD>2000.<br>      Snowbird, Utah.  28-30 March 2000.<br>
<br> <br>
Julian<EFBFBD>Seward<br> Julian Seward<br>
<EFBFBD><EFBFBD><EFBFBD>Space-time<EFBFBD>Tradeoffs<EFBFBD>in<EFBFBD>the<EFBFBD>Inverse<EFBFBD>B-W<EFBFBD>Transform<br>    Space-time Tradeoffs in the Inverse B-W Transform<br>
<EFBFBD><EFBFBD><EFBFBD>Proceedings<EFBFBD>of<EFBFBD>the<EFBFBD>IEEE<EFBFBD>Data<EFBFBD>Compression<EFBFBD>Conference<EFBFBD>2001<br>    Proceedings of the IEEE Data Compression Conference 2001<br>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Snowbird,<EFBFBD>Utah.<EFBFBD><EFBFBD>27-29<EFBFBD>March<EFBFBD>2001.<br>      Snowbird, Utah.  27-29 March 2001.<br>
</p></div> </p></div>
</div> </div>
</div> </div>

Binary file not shown.

189846
manual.ps

File diff suppressed because it is too large Load Diff

View File

@@ -9,7 +9,7 @@
<book lang="en" id="userman" xreflabel="bzip2 Manual"> <book lang="en" id="userman" xreflabel="bzip2 Manual">
<bookinfo> <bookinfo>
<title>bzip2 and libbzip2, version 1.0.6</title> <title>bzip2 and libbzip2, version &bz-version;</title>
<subtitle>A program and library for data compression</subtitle> <subtitle>A program and library for data compression</subtitle>
<copyright> <copyright>
<year>&bz-lifespan;</year> <year>&bz-lifespan;</year>
@@ -27,7 +27,7 @@
</author> </author>
</authorgroup> </authorgroup>
<legalnotice> <legalnotice id="legal">
<para>This program, <computeroutput>bzip2</computeroutput>, the <para>This program, <computeroutput>bzip2</computeroutput>, the
associated library <computeroutput>libbzip2</computeroutput>, and associated library <computeroutput>libbzip2</computeroutput>, and
@@ -139,7 +139,7 @@ else.</para>
<listitem><para><computeroutput>bzip2</computeroutput>, <listitem><para><computeroutput>bzip2</computeroutput>,
<computeroutput>bunzip2</computeroutput> - a block-sorting file <computeroutput>bunzip2</computeroutput> - a block-sorting file
compressor, v1.0.6</para></listitem> compressor, v&bz-version;</para></listitem>
<listitem><para><computeroutput>bzcat</computeroutput> - <listitem><para><computeroutput>bzcat</computeroutput> -
decompresses files to stdout</para></listitem> decompresses files to stdout</para></listitem>
@@ -653,7 +653,7 @@ unsigned 64-bit integer.</para>
<title>AUTHOR</title> <title>AUTHOR</title>
<para>Julian Seward, <para>Julian Seward,
<computeroutput>&bz-email;</computeroutput></para> <computeroutput>&bz-author;</computeroutput></para>
<para>The ideas embodied in <para>The ideas embodied in
<computeroutput>bzip2</computeroutput> are due to (at least) the <computeroutput>bzip2</computeroutput> are due to (at least) the
@@ -2487,12 +2487,12 @@ message:</para>
<blockquote> <blockquote>
<para>bzip2/libbzip2: internal error number N.</para> <para>bzip2/libbzip2: internal error number N.</para>
<para>This is a bug in bzip2/libbzip2, &bz-version; of &bz-date;. <para>This is a bug in bzip2/libbzip2, &bz-version; of &bz-date;.
Please report it to me at: &bz-email;. If this happened Please report it to: &bz-email;. If this happened
when you were using some program which uses libbzip2 as a when you were using some program which uses libbzip2 as a
component, you should also report this bug to the author(s) component, you should also report this bug to the author(s)
of that program. Please make an effort to report this bug; of that program. Please make an effort to report this bug;
timely and accurate bug reports eventually lead to higher timely and accurate bug reports eventually lead to higher
quality software. Thanks. Julian Seward, &bz-date;. quality software. Thanks.
</para></blockquote> </para></blockquote>
<para>where <computeroutput>N</computeroutput> is some error code <para>where <computeroutput>N</computeroutput> is some error code
@@ -2537,7 +2537,7 @@ recovered from.</para>
<para>Everything related to Windows has been contributed by <para>Everything related to Windows has been contributed by
Yoshioka Tsuneo Yoshioka Tsuneo
(<computeroutput>tsuneo@rr.iij4u.or.jp</computeroutput>), so (<computeroutput>tsuneo@rr.iij4u.or.jp</computeroutput>), so
you should send your queries to him (but perhaps Cc: me, you should send your queries to him (but please Cc:
<computeroutput>&bz-email;</computeroutput>).</para> <computeroutput>&bz-email;</computeroutput>).</para>
<para>My vague understanding of what to do is: using Visual C++ <para>My vague understanding of what to do is: using Visual C++

View File

@@ -9,8 +9,8 @@
This file is part of bzip2/libbzip2, a program and library for This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression. lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010 bzip2/libbzip2 version 1.0.8 of 13 July 2019
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file. README file.

View File

@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression. lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010 bzip2/libbzip2 version 1.0.8 of 13 July 2019
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file. README file.

View File

@@ -13,8 +13,8 @@
This file is part of bzip2/libbzip2, a program and library for This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression. lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010 bzip2/libbzip2 version 1.0.8 of 13 July 2019
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file. README file.

View File

@@ -17,8 +17,8 @@
This file is part of bzip2/libbzip2, a program and library for This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression. lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010 bzip2/libbzip2 version 1.0.8 of 13 July 2019
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file. README file.

2
words2
View File

@@ -1,5 +1,5 @@
Checking test results. If any of the four "cmp"s which follow Checking test results. If any of the four "cmp"s which follow
report any differences, something is wrong. If you can't easily report any differences, something is wrong. If you can't easily
figure out what, please let me know (jseward@bzip.org). figure out what, please let me know (jseward@acm.org).

4
xmlproc.sh Normal file → Executable file
View File

@@ -5,8 +5,8 @@
# This file is part of bzip2/libbzip2, a program and library for # This file is part of bzip2/libbzip2, a program and library for
# lossless, block-sorting data compression. # lossless, block-sorting data compression.
# #
# bzip2/libbzip2 version 1.0.6 of 6 September 2010 # bzip2/libbzip2 version 1.0.8 of 13 July 2019
# Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> # Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
# #
# Please read the WARNING, DISCLAIMER and PATENTS sections in the # Please read the WARNING, DISCLAIMER and PATENTS sections in the
# README file. # README file.