Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/dist/bzip2 Import bzip2 1.0.1



details:   https://anonhg.NetBSD.org/src/rev/ba9fc9e29487
branches:  trunk
changeset: 510650:ba9fc9e29487
user:      simonb <simonb%NetBSD.org@localhost>
date:      Sun Jun 03 13:03:00 2001 +0000

description:
Import bzip2 1.0.1

diffstat:

 dist/bzip2/CHANGES                     |    167 +
 dist/bzip2/LICENSE                     |     39 +
 dist/bzip2/Makefile                    |    141 +
 dist/bzip2/Makefile-libbz2_so          |     43 +
 dist/bzip2/README                      |    166 +
 dist/bzip2/README.COMPILATION.PROBLEMS |    130 +
 dist/bzip2/Y2K_INFO                    |     34 +
 dist/bzip2/blocksort.c                 |   1136 +
 dist/bzip2/bzip2.1                     |    441 +
 dist/bzip2/bzip2.c                     |   2046 ++
 dist/bzip2/bzip2recover.c              |    437 +
 dist/bzip2/bzlib.c                     |   1566 +
 dist/bzip2/bzlib.h                     |    321 +
 dist/bzip2/bzlib_private.h             |    532 +
 dist/bzip2/compress.c                  |    716 +
 dist/bzip2/crctable.c                  |    146 +
 dist/bzip2/decompress.c                |    662 +
 dist/bzip2/dlltest.c                   |    178 +
 dist/bzip2/dlltest.dsp                 |     93 +
 dist/bzip2/huffman.c                   |    230 +
 dist/bzip2/libbz2.def                  |     27 +
 dist/bzip2/libbz2.dsp                  |    130 +
 dist/bzip2/makefile.msc                |     63 +
 dist/bzip2/manual.ps                   |   3808 +++
 dist/bzip2/manual.texi                 |   2216 ++
 dist/bzip2/manual_1.html               |     47 +
 dist/bzip2/manual_2.html               |    484 +
 dist/bzip2/manual_3.html               |   1773 +
 dist/bzip2/manual_4.html               |    528 +
 dist/bzip2/manual_toc.html             |    173 +
 dist/bzip2/randtable.c                 |    126 +
 dist/bzip2/sample1.bz2                 |    Bin 
 dist/bzip2/sample1.ref                 |    Bin 
 dist/bzip2/sample2.bz2                 |    Bin 
 dist/bzip2/sample2.ref                 |    Bin 
 dist/bzip2/sample3.bz2                 |    Bin 
 dist/bzip2/sample3.ref                 |  30007 +++++++++++++++++++++++++++++++
 dist/bzip2/spewG.c                     |     41 +
 dist/bzip2/unzcrash.c                  |    128 +
 dist/bzip2/words0                      |      5 +
 dist/bzip2/words1                      |      4 +
 dist/bzip2/words2                      |      5 +
 dist/bzip2/words3                      |     23 +
 43 files changed, 48812 insertions(+), 0 deletions(-)

diffs (truncated from 48974 to 300 lines):

diff -r 71461e8d2983 -r ba9fc9e29487 dist/bzip2/CHANGES
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/dist/bzip2/CHANGES        Sun Jun 03 13:03:00 2001 +0000
@@ -0,0 +1,167 @@
+
+
+0.9.0
+~~~~~
+First version.
+
+
+0.9.0a
+~~~~~~
+Removed 'ranlib' from Makefile, since most modern Unix-es 
+don't need it, or even know about it.
+
+
+0.9.0b
+~~~~~~
+Fixed a problem with error reporting in bzip2.c.  This does not effect
+the library in any way.  Problem is: versions 0.9.0 and 0.9.0a (of the
+program proper) compress and decompress correctly, but give misleading
+error messages (internal panics) when an I/O error occurs, instead of
+reporting the problem correctly.  This shouldn't give any data loss
+(as far as I can see), but is confusing.
+
+Made the inline declarations disappear for non-GCC compilers.
+
+
+0.9.0c
+~~~~~~
+Fixed some problems in the library pertaining to some boundary cases.
+This makes the library behave more correctly in those situations.  The
+fixes apply only to features (calls and parameters) not used by
+bzip2.c, so the non-fixedness of them in previous versions has no
+effect on reliability of bzip2.c.
+
+In bzlib.c:
+   * made zero-length BZ_FLUSH work correctly in bzCompress().
+   * fixed bzWrite/bzRead to ignore zero-length requests.
+   * fixed bzread to correctly handle read requests after EOF.
+   * wrong parameter order in call to bzDecompressInit in
+     bzBuffToBuffDecompress.  Fixed.
+
+In compress.c:
+   * changed setting of nGroups in sendMTFValues() so as to 
+     do a bit better on small files.  This _does_ effect
+     bzip2.c.
+
+
+0.9.5a
+~~~~~~
+Major change: add a fallback sorting algorithm (blocksort.c)
+to give reasonable behaviour even for very repetitive inputs.
+Nuked --repetitive-best and --repetitive-fast since they are
+no longer useful.
+
+Minor changes: mostly a whole bunch of small changes/
+bugfixes in the driver (bzip2.c).  Changes pertaining to the
+user interface are:
+
+   allow decompression of symlink'd files to stdout
+   decompress/test files even without .bz2 extension
+   give more accurate error messages for I/O errors
+   when compressing/decompressing to stdout, don't catch control-C
+   read flags from BZIP2 and BZIP environment variables
+   decline to break hard links to a file unless forced with -f
+   allow -c flag even with no filenames
+   preserve file ownerships as far as possible
+   make -s -1 give the expected block size (100k)
+   add a flag -q --quiet to suppress nonessential warnings
+   stop decoding flags after --, so files beginning in - can be handled
+   resolved inconsistent naming: bzcat or bz2cat ?
+   bzip2 --help now returns 0
+
+Programming-level changes are:
+
+   fixed syntax error in GET_LL4 for Borland C++ 5.02
+   let bzBuffToBuffDecompress return BZ_DATA_ERROR{_MAGIC}
+   fix overshoot of mode-string end in bzopen_or_bzdopen
+   wrapped bzlib.h in #ifdef __cplusplus ... extern "C" { ... }
+   close file handles under all error conditions
+   added minor mods so it compiles with DJGPP out of the box
+   fixed Makefile so it doesn't give problems with BSD make
+   fix uninitialised memory reads in dlltest.c
+
+0.9.5b
+~~~~~~
+Open stdin/stdout in binary mode for DJGPP.
+
+0.9.5c
+~~~~~~
+Changed BZ_N_OVERSHOOT to be ... + 2 instead of ... + 1.  The + 1
+version could cause the sorted order to be wrong in some extremely
+obscure cases.  Also changed setting of quadrant in blocksort.c.
+
+0.9.5d
+~~~~~~
+The only functional change is to make bzlibVersion() in the library
+return the correct string.  This has no effect whatsoever on the
+functioning of the bzip2 program or library.  Added a couple of casts
+so the library compiles without warnings at level 3 in MS Visual
+Studio 6.0.  Included a Y2K statement in the file Y2K_INFO.  All other
+changes are minor documentation changes.
+
+1.0
+~~~
+Several minor bugfixes and enhancements:
+
+* Large file support.  The library uses 64-bit counters to
+  count the volume of data passing through it.  bzip2.c 
+  is now compiled with -D_FILE_OFFSET_BITS=64 to get large
+  file support from the C library.  -v correctly prints out
+  file sizes greater than 4 gigabytes.  All these changes have
+  been made without assuming a 64-bit platform or a C compiler
+  which supports 64-bit ints, so, except for the C library
+  aspect, they are fully portable.
+
+* Decompression robustness.  The library/program should be
+  robust to any corruption of compressed data, detecting and
+  handling _all_ corruption, instead of merely relying on
+  the CRCs.  What this means is that the program should 
+  never crash, given corrupted data, and the library should
+  always return BZ_DATA_ERROR.
+
+* Fixed an obscure race-condition bug only ever observed on
+  Solaris, in which, if you were very unlucky and issued
+  control-C at exactly the wrong time, both input and output
+  files would be deleted.
+
+* Don't run out of file handles on test/decompression when
+  large numbers of files have invalid magic numbers.
+
+* Avoid library namespace pollution.  Prefix all exported 
+  symbols with BZ2_.
+
+* Minor sorting enhancements from my DCC2000 paper.
+
+* Advance the version number to 1.0, so as to counteract the
+  (false-in-this-case) impression some people have that programs 
+  with version numbers less than 1.0 are in someway, experimental,
+  pre-release versions.
+
+* Create an initial Makefile-libbz2_so to build a shared library.
+  Yes, I know I should really use libtool et al ...
+
+* Make the program exit with 2 instead of 0 when decompression
+  fails due to a bad magic number (ie, an invalid bzip2 header).
+  Also exit with 1 (as the manual claims :-) whenever a diagnostic
+  message would have been printed AND the corresponding operation 
+  is aborted, for example
+     bzip2: Output file xx already exists.
+  When a diagnostic message is printed but the operation is not 
+  aborted, for example
+     bzip2: Can't guess original name for wurble -- using wurble.out
+  then the exit value 0 is returned, unless some other problem is
+  also detected.
+
+  I think it corresponds more closely to what the manual claims now.
+
+
+1.0.1
+~~~~~
+* Modified dlltest.c so it uses the new BZ2_ naming scheme.
+* Modified makefile-msc to fix minor build probs on Win2k.
+* Updated README.COMPILATION.PROBLEMS.
+
+There are no functionality changes or bug fixes relative to version
+1.0.0.  This is just a documentation update + a fix for minor Win32
+build problems.  For almost everyone, upgrading from 1.0.0 to 1.0.1 is
+utterly pointless.  Don't bother.
diff -r 71461e8d2983 -r ba9fc9e29487 dist/bzip2/LICENSE
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/dist/bzip2/LICENSE        Sun Jun 03 13:03:00 2001 +0000
@@ -0,0 +1,39 @@
+
+This program, "bzip2" and associated library "libbzip2", are
+copyright (C) 1996-2000 Julian R Seward.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+2. The origin of this software must not be misrepresented; you must 
+   not claim that you wrote the original software.  If you use this 
+   software in a product, an acknowledgment in the product 
+   documentation would be appreciated but is not required.
+
+3. Altered source versions must be plainly marked as such, and must
+   not be misrepresented as being the original software.
+
+4. The name of the author may not be used to endorse or promote 
+   products derived from this software without specific prior written 
+   permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Julian Seward, Cambridge, UK.
+jseward%acm.org@localhost
+bzip2/libbzip2 version 1.0 of 21 March 2000
+
diff -r 71461e8d2983 -r ba9fc9e29487 dist/bzip2/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/dist/bzip2/Makefile       Sun Jun 03 13:03:00 2001 +0000
@@ -0,0 +1,141 @@
+
+SHELL=/bin/sh
+CC=gcc
+BIGFILES=-D_FILE_OFFSET_BITS=64
+CFLAGS=-Wall -Winline -O2 -fomit-frame-pointer -fno-strength-reduce $(BIGFILES)
+
+OBJS= blocksort.o  \
+      huffman.o    \
+      crctable.o   \
+      randtable.o  \
+      compress.o   \
+      decompress.o \
+      bzlib.o
+
+all: libbz2.a bzip2 bzip2recover test
+
+bzip2: libbz2.a bzip2.o
+       $(CC) $(CFLAGS) -o bzip2 bzip2.o -L. -lbz2
+
+bzip2recover: bzip2recover.o
+       $(CC) $(CFLAGS) -o bzip2recover bzip2recover.o
+
+libbz2.a: $(OBJS)
+       rm -f libbz2.a
+       ar cq libbz2.a $(OBJS)
+       @if ( test -f /usr/bin/ranlib -o -f /bin/ranlib -o \
+               -f /usr/ccs/bin/ranlib ) ; then \
+               echo ranlib libbz2.a ; \
+               ranlib libbz2.a ; \
+       fi
+
+test: bzip2
+       @cat words1
+       ./bzip2 -1  < sample1.ref > sample1.rb2
+       ./bzip2 -2  < sample2.ref > sample2.rb2
+       ./bzip2 -3  < sample3.ref > sample3.rb2
+       ./bzip2 -d  < sample1.bz2 > sample1.tst
+       ./bzip2 -d  < sample2.bz2 > sample2.tst
+       ./bzip2 -ds < sample3.bz2 > sample3.tst
+       cmp sample1.bz2 sample1.rb2 
+       cmp sample2.bz2 sample2.rb2
+       cmp sample3.bz2 sample3.rb2
+       cmp sample1.tst sample1.ref
+       cmp sample2.tst sample2.ref
+       cmp sample3.tst sample3.ref
+       @cat words3
+
+PREFIX=/usr
+
+install: bzip2 bzip2recover
+       if ( test ! -d $(PREFIX)/bin ) ; then mkdir $(PREFIX)/bin ; fi
+       if ( test ! -d $(PREFIX)/lib ) ; then mkdir $(PREFIX)/lib ; fi
+       if ( test ! -d $(PREFIX)/man ) ; then mkdir $(PREFIX)/man ; fi
+       if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir $(PREFIX)/man/man1 ; fi
+       if ( test ! -d $(PREFIX)/include ) ; then mkdir $(PREFIX)/include ; fi
+       cp -f bzip2 $(PREFIX)/bin/bzip2
+       cp -f bzip2 $(PREFIX)/bin/bunzip2
+       cp -f bzip2 $(PREFIX)/bin/bzcat
+       cp -f bzip2recover $(PREFIX)/bin/bzip2recover
+       chmod a+x $(PREFIX)/bin/bzip2
+       chmod a+x $(PREFIX)/bin/bunzip2
+       chmod a+x $(PREFIX)/bin/bzcat
+       chmod a+x $(PREFIX)/bin/bzip2recover
+       cp -f bzip2.1 $(PREFIX)/man/man1
+       chmod a+r $(PREFIX)/man/man1/bzip2.1
+       cp -f bzlib.h $(PREFIX)/include
+       chmod a+r $(PREFIX)/include/bzlib.h
+       cp -f libbz2.a $(PREFIX)/lib
+       chmod a+r $(PREFIX)/lib/libbz2.a
+
+clean: 
+       rm -f *.o libbz2.a bzip2 bzip2recover \
+       sample1.rb2 sample2.rb2 sample3.rb2 \
+       sample1.tst sample2.tst sample3.tst
+
+blocksort.o: blocksort.c
+       @cat words0
+       $(CC) $(CFLAGS) -c blocksort.c
+huffman.o: huffman.c
+       $(CC) $(CFLAGS) -c huffman.c
+crctable.o: crctable.c
+       $(CC) $(CFLAGS) -c crctable.c



Home | Main Index | Thread Index | Old Index