From 160de28119cdc7801215f4a61ffe8860ed49e2a5 Mon Sep 17 00:00:00 2001
From: Stephen Heumann
Date: Sat, 10 Oct 2015 14:36:21 -0500
Subject: [PATCH] GNO port source code (from 2003)
---
Makefile | 220 +-
Makefile-libbz2_so | 44 -
README.COMPILATION.PROBLEMS | 130 --
README.GNO | 158 ++
README => README.bzip2 | 0
Y2K_INFO | 34 -
blocksort.c | 1141 ----------
bunzip2.1 | 362 ++++
bunzip2.desc | 13 +
bunzip2.rez | 15 +
bzcat.1 | 1 +
bzdiff | 76 -
bzdiff.1 | 47 -
bzgrep | 71 -
bzgrep.1 | 56 -
bzip2.1 | 453 ----
bzip2.1.preformatted | 398 ----
bzip2.c | 213 +-
bzip2.txt | 390 ----
bzip2recover.1 | 1 +
bzip2recover.c | 131 +-
bzip2recover.rez | 15 +
bzlib.c | 173 +-
bzlib.h | 87 +
bzlib_private.h | 27 +-
bzmore | 61 -
bzmore.1 | 152 --
compress.c | 714 -------
decompress.c | 70 +-
dlltest.c | 176 --
dlltest.dsp | 93 -
huffman.c | 11 +
libbz2.def | 27 -
libbz2.dsp | 130 --
makefile.msc | 63 -
manual.html | 117 -
manual.pdf | Bin 298267 -> 0 bytes
manual.ps | 3991 -----------------------------------
manual.texi | 2243 --------------------
manual_1.html | 81 -
manual_2.html | 579 -----
manual_3.html | 1855 ----------------
manual_4.html | 530 -----
manual_abt.html | 201 --
manual_ovr.html | 54 -
manual_toc.html | 163 --
mk251.c | 16 -
randtable.c | 6 +-
spewG.c | 39 -
stristr.c | 58 +
unzcrash.c | 126 --
words0 | 5 -
words1 | 4 +-
words2 | 6 +-
words3 | 33 +-
words4 | 10 +
56 files changed, 1396 insertions(+), 14474 deletions(-)
delete mode 100644 Makefile-libbz2_so
delete mode 100644 README.COMPILATION.PROBLEMS
create mode 100644 README.GNO
rename README => README.bzip2 (100%)
delete mode 100644 Y2K_INFO
delete mode 100644 blocksort.c
create mode 100644 bunzip2.1
create mode 100644 bunzip2.desc
create mode 100644 bunzip2.rez
create mode 100644 bzcat.1
delete mode 100644 bzdiff
delete mode 100644 bzdiff.1
delete mode 100644 bzgrep
delete mode 100644 bzgrep.1
delete mode 100644 bzip2.1
delete mode 100644 bzip2.1.preformatted
delete mode 100644 bzip2.txt
create mode 100644 bzip2recover.1
create mode 100644 bzip2recover.rez
delete mode 100644 bzmore
delete mode 100644 bzmore.1
delete mode 100644 compress.c
delete mode 100644 dlltest.c
delete mode 100644 dlltest.dsp
delete mode 100644 libbz2.def
delete mode 100644 libbz2.dsp
delete mode 100644 makefile.msc
delete mode 100644 manual.html
delete mode 100644 manual.pdf
delete mode 100644 manual.ps
delete mode 100644 manual.texi
delete mode 100644 manual_1.html
delete mode 100644 manual_2.html
delete mode 100644 manual_3.html
delete mode 100644 manual_4.html
delete mode 100644 manual_abt.html
delete mode 100644 manual_ovr.html
delete mode 100644 manual_toc.html
delete mode 100644 mk251.c
delete mode 100644 spewG.c
create mode 100644 stristr.c
delete mode 100644 unzcrash.c
delete mode 100644 words0
create mode 100644 words4
diff --git a/Makefile b/Makefile
index 8305235..a3d8779 100644
--- a/Makefile
+++ b/Makefile
@@ -1,192 +1,94 @@
+# Makefile for bunzip2 for GNO (for use with dmake)
+# Based on Unix Makefile for bzip2
+# Modified for GNO by Stephen Heumann
-SHELL=/bin/sh
+# ORCA/C 2.1.0 may need more than 8 megabytes of RAM to compile decompress.c
+# with full optimization enabled. Thus, this makefile can only
+# be used as is on an emulated system with 14 megabyte RAM support.
# To assist in cross-compiling
-CC=gcc
-AR=ar
-RANLIB=ranlib
+# Uncomment this if make doesn't have the $CC variable set appropriately
+# CC=occ
+RM=cp -p rm
+
LDFLAGS=
-# Suitably paranoid flags to avoid bugs in gcc-2.7
-BIGFILES=-D_FILE_OFFSET_BITS=64
-CFLAGS=-Wall -Winline -O2 -fomit-frame-pointer -fno-strength-reduce $(BIGFILES)
+# The "-I /usr/include" shouldn't be needed but seemed to fix problems for me
+CFLAGS=-a0 -w -O -I /usr/include
+
+NOROOTFLAG=-r
# Where you want it installed when you do 'make install'
-PREFIX=/usr
+PREFIX=/usr/local
-OBJS= blocksort.o \
+OBJS= stristr.o \
huffman.o \
crctable.o \
randtable.o \
- compress.o \
decompress.o \
bzlib.o
-all: libbz2.a bzip2 bzip2recover test
+all: bunzip2 bzip2recover test
-bzip2: libbz2.a bzip2.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.o -L. -lbz2
+bunzip2: bzip2.o $(OBJS)
+ $(CC) -o bunzip2 bunzip2.rez
+ $(CC) $(CFLAGS) $(LDFLAGS) bzip2.o $(OBJS) -o bunzip2
bzip2recover: bzip2recover.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2recover bzip2recover.o
-
-libbz2.a: $(OBJS)
- rm -f libbz2.a
- $(AR) cq libbz2.a $(OBJS)
- @if ( test -f $(RANLIB) -o -f /usr/bin/ranlib -o \
- -f /bin/ranlib -o -f /usr/ccs/bin/ranlib ) ; then \
- echo $(RANLIB) libbz2.a ; \
- $(RANLIB) libbz2.a ; \
- fi
+ $(CC) -o bzip2recover bzip2recover.rez
+ $(CC) $(CFLAGS) $(LDFLAGS) bzip2recover.o -o bzip2recover
check: test
-test: bzip2
+test: bunzip2
@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
+ ./bunzip2 -dk < sample1.bz2 > sample1.tst
+ ./bunzip2 -dk < sample2.bz2 > sample2.tst
+ ./bunzip2 -dks < sample3.bz2 > sample3.tst
+ @cat words2
cmp sample1.tst sample1.ref
cmp sample2.tst sample2.ref
cmp sample3.tst sample3.ref
@cat words3
-install: bzip2 bzip2recover
- if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi
- if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi
- if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi
- if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fi
- if ( test ! -d $(PREFIX)/include ) ; then mkdir -p $(PREFIX)/include ; fi
- cp -f bzip2 $(PREFIX)/bin/bzip2
- cp -f bzip2 $(PREFIX)/bin/bunzip2
- cp -f bzip2 $(PREFIX)/bin/bzcat
+install: bunzip2 bzip2recover test justinstall
+
+justinstall:
+# This should install bunzip2 for GNO under /usr/local
+ mkdir $(PREFIX)/bin >& .null
+ mkdir $(PREFIX)/man >& .null
+ mkdir $(PREFIX)/man/man1 >& .null
+ cp -f bunzip2 $(PREFIX)/bin/bunzip2
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
- cp -f bzgrep $(PREFIX)/bin/bzgrep
- ln $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep
- ln $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep
- chmod a+x $(PREFIX)/bin/bzgrep
- cp -f bzmore $(PREFIX)/bin/bzmore
- ln $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless
- chmod a+x $(PREFIX)/bin/bzmore
- cp -f bzdiff $(PREFIX)/bin/bzdiff
- ln $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp
- chmod a+x $(PREFIX)/bin/bzdiff
- cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1
- chmod a+r $(PREFIX)/man/man1/bzgrep.1
- chmod a+r $(PREFIX)/man/man1/bzmore.1
- chmod a+r $(PREFIX)/man/man1/bzdiff.1
- echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzegrep.1
- echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzfgrep.1
- echo ".so man1/bzmore.1" > $(PREFIX)/man/man1/bzless.1
- echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1
+ cp -f bunzip2.1 $(PREFIX)/man/man1/bunzip2.1
+ cp -f bzip2recover.1 $(PREFIX)/man/man1/bzip2recover.1
+ cp -f bzcat.1 $(PREFIX)/man/man1/bzcat.1
+ @cat words4
distclean: clean
-clean:
- rm -f *.o libbz2.a bzip2 bzip2recover \
- sample1.rb2 sample2.rb2 sample3.rb2 \
+clean:
+ $(RM) -f *.o *.a *.sym *.root bunzip2 bzip2recover \
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
-randtable.o: randtable.c
- $(CC) $(CFLAGS) -c randtable.c
-compress.o: compress.c
- $(CC) $(CFLAGS) -c compress.c
-decompress.o: decompress.c
- $(CC) $(CFLAGS) -c decompress.c
-bzlib.o: bzlib.c
- $(CC) $(CFLAGS) -c bzlib.c
-bzip2.o: bzip2.c
- $(CC) $(CFLAGS) -c bzip2.c
+stristr.o: stristr.c
+ $(CC) $(CFLAGS) $(NOROOTFLAG) -c stristr.c
+huffman.o: huffman.c bzlib_private.h
+ $(CC) $(CFLAGS) $(NOROOTFLAG) -c huffman.c
+crctable.o: crctable.c bzlib_private.h
+ $(CC) $(CFLAGS) $(NOROOTFLAG) -c crctable.c
+randtable.o: randtable.c bzlib_private.h
+ $(CC) $(CFLAGS) $(NOROOTFLAG) -c randtable.c
+decompress.o: decompress.c bzlib_private.h
+ $(CC) $(CFLAGS) $(NOROOTFLAG) -c decompress.c
+bzlib.o: bzlib.c bzlib_private.h
+ $(CC) $(CFLAGS) $(NOROOTFLAG) -c bzlib.c
+bzip2.o: bzip2.c bzlib.h
+ $(CC) $(CFLAGS) -s 2048 -C1 -c bzip2.c
+# $(CC) $(CFLAGS) -C1 -D __STACK_CHECK__ -c bzip2.c
bzip2recover.o: bzip2recover.c
- $(CC) $(CFLAGS) -c bzip2recover.c
+ $(CC) $(CFLAGS) -s 1024 -c bzip2recover.c
+# $(CC) $(CFLAGS) -D __STACK_CHECK__ -c bzip2recover.c
+bzlib_private.h: bzlib.h
-DISTNAME=bzip2-1.0.2
-tarfile:
- rm -f $(DISTNAME)
- ln -sf . $(DISTNAME)
- tar cvf $(DISTNAME).tar \
- $(DISTNAME)/blocksort.c \
- $(DISTNAME)/huffman.c \
- $(DISTNAME)/crctable.c \
- $(DISTNAME)/randtable.c \
- $(DISTNAME)/compress.c \
- $(DISTNAME)/decompress.c \
- $(DISTNAME)/bzlib.c \
- $(DISTNAME)/bzip2.c \
- $(DISTNAME)/bzip2recover.c \
- $(DISTNAME)/bzlib.h \
- $(DISTNAME)/bzlib_private.h \
- $(DISTNAME)/Makefile \
- $(DISTNAME)/manual.texi \
- $(DISTNAME)/manual.ps \
- $(DISTNAME)/manual.pdf \
- $(DISTNAME)/LICENSE \
- $(DISTNAME)/bzip2.1 \
- $(DISTNAME)/bzip2.1.preformatted \
- $(DISTNAME)/bzip2.txt \
- $(DISTNAME)/words0 \
- $(DISTNAME)/words1 \
- $(DISTNAME)/words2 \
- $(DISTNAME)/words3 \
- $(DISTNAME)/sample1.ref \
- $(DISTNAME)/sample2.ref \
- $(DISTNAME)/sample3.ref \
- $(DISTNAME)/sample1.bz2 \
- $(DISTNAME)/sample2.bz2 \
- $(DISTNAME)/sample3.bz2 \
- $(DISTNAME)/dlltest.c \
- $(DISTNAME)/*.html \
- $(DISTNAME)/README \
- $(DISTNAME)/README.COMPILATION.PROBLEMS \
- $(DISTNAME)/CHANGES \
- $(DISTNAME)/libbz2.def \
- $(DISTNAME)/libbz2.dsp \
- $(DISTNAME)/dlltest.dsp \
- $(DISTNAME)/makefile.msc \
- $(DISTNAME)/Y2K_INFO \
- $(DISTNAME)/unzcrash.c \
- $(DISTNAME)/spewG.c \
- $(DISTNAME)/mk251.c \
- $(DISTNAME)/bzdiff \
- $(DISTNAME)/bzdiff.1 \
- $(DISTNAME)/bzmore \
- $(DISTNAME)/bzmore.1 \
- $(DISTNAME)/bzgrep \
- $(DISTNAME)/bzgrep.1 \
- $(DISTNAME)/Makefile-libbz2_so
- gzip -v $(DISTNAME).tar
-
-# For rebuilding the manual from sources on my RedHat 7.2 box
-manual: manual.ps manual.pdf manual.html
-
-manual.ps: manual.texi
- tex manual.texi
- dvips -o manual.ps manual.dvi
-
-manual.pdf: manual.ps
- ps2pdf manual.ps
-
-manual.html: manual.texi
- texi2html -split_chapter manual.texi
+chtyp:
+ chtyp -l cc *.c *.h
diff --git a/Makefile-libbz2_so b/Makefile-libbz2_so
deleted file mode 100644
index 4986fe2..0000000
--- a/Makefile-libbz2_so
+++ /dev/null
@@ -1,44 +0,0 @@
-
-# This Makefile builds a shared version of the library,
-# libbz2.so.1.0.2, with soname libbz2.so.1.0,
-# at least on x86-Linux (RedHat 7.2),
-# with gcc-2.96 20000731 (Red Hat Linux 7.1 2.96-98).
-# Please see the README file for some
-# important info about building the library like this.
-
-SHELL=/bin/sh
-CC=gcc
-BIGFILES=-D_FILE_OFFSET_BITS=64
-CFLAGS=-fpic -fPIC -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: $(OBJS)
- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.2 $(OBJS)
- $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.2
- rm -f libbz2.so.1.0
- ln -s libbz2.so.1.0.2 libbz2.so.1.0
-
-clean:
- rm -f $(OBJS) bzip2.o libbz2.so.1.0.2 libbz2.so.1.0 bzip2-shared
-
-blocksort.o: blocksort.c
- $(CC) $(CFLAGS) -c blocksort.c
-huffman.o: huffman.c
- $(CC) $(CFLAGS) -c huffman.c
-crctable.o: crctable.c
- $(CC) $(CFLAGS) -c crctable.c
-randtable.o: randtable.c
- $(CC) $(CFLAGS) -c randtable.c
-compress.o: compress.c
- $(CC) $(CFLAGS) -c compress.c
-decompress.o: decompress.c
- $(CC) $(CFLAGS) -c decompress.c
-bzlib.o: bzlib.c
- $(CC) $(CFLAGS) -c bzlib.c
diff --git a/README.COMPILATION.PROBLEMS b/README.COMPILATION.PROBLEMS
deleted file mode 100644
index bd1822d..0000000
--- a/README.COMPILATION.PROBLEMS
+++ /dev/null
@@ -1,130 +0,0 @@
-
-bzip2-1.0 should compile without problems on the vast majority of
-platforms. Using the supplied Makefile, I've built and tested it
-myself for x86-linux, sparc-solaris, alpha-linux, x86-cygwin32 and
-alpha-tru64unix. With makefile.msc, Visual C++ 6.0 and nmake, you can
-build a native Win32 version too. Large file support seems to work
-correctly on at least alpha-tru64unix and x86-cygwin32 (on Windows
-2000).
-
-When I say "large file" I mean a file of size 2,147,483,648 (2^31)
-bytes or above. Many older OSs can't handle files above this size,
-but many newer ones can. Large files are pretty huge -- most files
-you'll encounter are not Large Files.
-
-Earlier versions of bzip2 (0.1, 0.9.0, 0.9.5) compiled on a wide
-variety of platforms without difficulty, and I hope this version will
-continue in that tradition. However, in order to support large files,
-I've had to include the define -D_FILE_OFFSET_BITS=64 in the Makefile.
-This can cause problems.
-
-The technique of adding -D_FILE_OFFSET_BITS=64 to get large file
-support is, as far as I know, the Recommended Way to get correct large
-file support. For more details, see the Large File Support
-Specification, published by the Large File Summit, at
- http://www.sas.com/standard/large.file/
-
-As a general comment, if you get compilation errors which you think
-are related to large file support, try removing the above define from
-the Makefile, ie, delete the line
- BIGFILES=-D_FILE_OFFSET_BITS=64
-from the Makefile, and do 'make clean ; make'. This will give you a
-version of bzip2 without large file support, which, for most
-applications, is probably not a problem.
-
-Alternatively, try some of the platform-specific hints listed below.
-
-You can use the spewG.c program to generate huge files to test bzip2's
-large file support, if you are feeling paranoid. Be aware though that
-any compilation problems which affect bzip2 will also affect spewG.c,
-alas.
-
-
-Known problems as of 1.0pre8:
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-* HP/UX 10.20 and 11.00, using gcc (2.7.2.3 and 2.95.2): A large
- number of warnings appear, including the following:
-
- /usr/include/sys/resource.h: In function `getrlimit':
- /usr/include/sys/resource.h:168:
- warning: implicit declaration of function `__getrlimit64'
- /usr/include/sys/resource.h: In function `setrlimit':
- /usr/include/sys/resource.h:170:
- warning: implicit declaration of function `__setrlimit64'
-
- This would appear to be a problem with large file support, header
- files and gcc. gcc may or may not give up at this point. If it
- fails, you might be able to improve matters by adding
- -D__STDC_EXT__=1
- to the BIGFILES variable in the Makefile (ie, change its definition
- to
- BIGFILES=-D_FILE_OFFSET_BITS=64 -D__STDC_EXT__=1
-
- Even if gcc does produce a binary which appears to work (ie passes
- its self-tests), you might want to test it to see if it works properly
- on large files.
-
-
-* HP/UX 10.20 and 11.00, using HP's cc compiler.
-
- No specific problems for this combination, except that you'll need to
- specify the -Ae flag, and zap the gcc-specific stuff
- -Wall -Winline -O2 -fomit-frame-pointer -fno-strength-reduce.
- You should retain -D_FILE_OFFSET_BITS=64 in order to get large
- file support -- which is reported to work ok for this HP/UX + cc
- combination.
-
-
-* SunOS 4.1.X.
-
- Amazingly, there are still people out there using this venerable old
- banger. I shouldn't be too rude -- I started life on SunOS, and
- it was a pretty darn good OS, way back then. Anyway:
-
- SunOS doesn't seem to have strerror(), so you'll have to use
- perror(), perhaps by doing adding this (warning: UNTESTED CODE):
-
- char* strerror ( int errnum )
- {
- if (errnum < 0 || errnum >= sys_nerr)
- return "Unknown error";
- else
- return sys_errlist[errnum];
- }
-
- Or you could comment out the relevant calls to strerror; they're
- not mission-critical. Or you could upgrade to Solaris. Ha ha ha!
- (what?? you think I've got Bad Attitude?)
-
-
-* Making a shared library on Solaris. (Not really a compilation
- problem, but many people ask ...)
-
- Firstly, if you have Solaris 8, either you have libbz2.so already
- on your system, or you can install it from the Solaris CD.
-
- Secondly, be aware that there are potential naming conflicts
- between the .so file supplied with Solaris 8, and the .so file
- which Makefile-libbz2_so will make. Makefile-libbz2_so creates
- a .so which has the names which I intend to be "official" as
- of version 1.0.0 and onwards. Unfortunately, the .so in
- Solaris 8 appeared before I decided on the final names, so
- the two libraries are incompatible. We have since communicated
- and I hope that the problems will have been solved in the next
- version of Solaris, whenever that might appear.
-
- All that said: you might be able to get somewhere
- by finding the line in Makefile-libbz2_so which says
-
- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.2 $(OBJS)
-
- and replacing with
-
- $(CC) -G -shared -o libbz2.so.1.0.2 -h libbz2.so.1.0 $(OBJS)
-
- If gcc objects to the combination -fpic -fPIC, get rid of
- the second one, leaving just "-fpic".
-
-
-That's the end of the currently known compilation problems.
diff --git a/README.GNO b/README.GNO
new file mode 100644
index 0000000..6e8423e
--- /dev/null
+++ b/README.GNO
@@ -0,0 +1,158 @@
+README FOR BUNZIP2 FOR GNO
+==========================
+This is a port of the bunzip2 archive decompression program to the GNO
+environment on the Apple IIgs. It is based on Julian Seward's original
+bzip2 program, but it includes only the decompression (and testing)
+functionality; compression is disabled. This archive also includes the
+bzip2recover program, which may allow you to recover some data from a
+partially corrupted bzip2 archive file. These programs correspond to
+Julian Seward's bzip2 version 1.0.2.
+
+
+REQUIREMENTS
+============
+Bunzip2 reguires a ROM 01 or ROM 3 Apple IIgs (or an emulator thereof)
+running IIgs System Software 6.0.1 and GNO 2.0.6 (or later).
+
+Bunzip2 also needs considerable memory. It will not be able to decompress
+most archives if you have less than 4 megabytes of RAM. On 4-5 MB
+systems, you will likely have to specify the -s option to minimize memory
+usage; on an 8MB (or 14MB) system, this will probably not be necessary,
+unless you have a very large number of system extensions or other programs
+running under GNO. See the manpage for more details on memory usage.
+If bunzip2 gives you an out-of-memory error the first time you run it, try
+again. The first attempt may have caused the system to reorganize memory
+and purge unneeded data, freeing up enough space to run bunzip2 on the
+second attempt.
+
+Bunzip2 will also benefit from an accelerator, although one is obviously
+not required. Even with an accelerator, it can be rather slow when
+decompressing larger archives. Be prepared to wait a very long time
+(several hours or even longer) for bunzip2 to finish decompressing large
+bzip2 archives.
+
+
+INSTALLATION
+============
+To install bunzip2, simply run "dmake justinstall". Alternatively, you can
+install it manually: copy the bunzip2 and bzip2recover programs to your GNO
+installation's /usr/local/bin directory, and copy the bunzip2.1, bzcat.1,
+and bzip2recover.1 manpages to the /usr/local/man/man1 directory.
+
+After installing bunzip2, you should read the manpage for directions on how
+to use it. You can put the following line in your gshrc file so you can use
+'bzcat' as documented in the manpage:
+
+alias bzcat "bunzip2 -c"
+
+
+NOTES ON THE SOURCE CODE
+========================
+[If you just want to use bunzip2, you do not need to read this section.]
+
+Please note that a couple source files use non-ProDOS compatible filenames.
+If you do not have an HFS or AppleShare partition available, these can
+easily be changed to fit ProDOS conventions.
+
+I had to make several changes to the bzip2 program when porting it to GNO.
+The code is not very good-looking, but it does compile without warnings.
+
+First, I disabled the compression functionality and set up the program to
+decompress by default (and I renamed the binary to 'bunzip2' to reflect
+this). The compression functionality is not very important on the GS, since
+bzip2 is not a very good choice for compressing GS-specific data; ShrinkIt
+will be much faster and preserves GS-specific file attributes. Even if you
+want to create archives for use on UNIX-like systems, compress or gzip is
+a better choice, and both are already available under GNO. For these
+reasons, and because it reduced the amount of code that I had to modify, I
+removed the compression functionality from bunzip2.
+
+Other major changes to the code fell into several categories:
+(1) Type sizes: Most of the code used defines for types such as Int32, making
+ it easy to adapt to the GS's 16-bit ints. The interface between the
+ bzip2 program and code designed to be compiled as 'libbzip2,' however,
+ assumes that int is 32 bits, so I had to modify it to use the appropriate
+ integer types on the GS. There were also silent assumptions in some
+ other areas that native ints are 32 bits, and I had to identify and
+ correct these. There were also variables specified as 'Int32' even
+ though 16 bits were sufficient to represent their possible range of
+ values; when I noticed these variables, I changed them appropriately.
+
+(2) ORCA/C compiler limitations: ORCA/C in its 'small mode' (the only one
+ supported by the GNO libraries) places a 64k restriction on the size
+ of data structures that can be addressed as arrays. This is a problem
+ with bunzip2, which allocates and uses multi-megabyte data structures.
+ To work around this, I changed array-style references to these data
+ structures to use printer arithmetic instead, working around the
+ limitation (eg. I changed references to 'a[b]' to '*(a+b)'. ). I also
+ changed large local variables to be static or dynamically allocated
+ in order to avoid excessive stack usage.
+
+(3) ORCA/C compiler bugs: In several cases ORCA/C 2.1.0 generated bad code
+ at the maximum optimization level. Most instances where reduced
+ optimization levels are used are necessary to work around bugs encountered
+ when using the disabled optimizations. Also, the size of the main
+ decompression function in decompress.c stresses ORCA/C. I modified
+ the GET_BITS macro to reduce the code size of the BZ2_decompress function
+ by making some of the code into a separate function. If this is not done
+ or if optimization is not enabled (increasing the compiled code size
+ as compared to when optimization is enabled), the compiler will crash,
+ give an error, or generate bad object code that gives linker errors.
+
+(4) Modifications to work well with GNO and GS/OS These include setting the
+ output filetype and disabling newline translation in GNO's stdio
+ implementation. I also set the stack sizes of the programs to
+ appropriate values and enabled stack checking for the small recursive
+ segment of the program (although it shouldn't actually pose any problem).
+ Additionally, I changed filename operations to be case-insensitive,
+ reflecting the case-insensitive nature of filesystems in the Apple IIgs.
+
+I made most modifications conditional on the __appleiigs__, __ORCAC__, or
+__GNO__ macros. Which macro I used gives some hint at the reason for each
+modification, although all or none should be used to produce a working
+executable (changes conditionalized on one macro may depend on those
+conditionalized on another).
+
+
+COMPILING
+=========
+The included Makefile can be used with dmake, occ, and ORCA/C 2.1.0, all of
+which should be installed in your GNO 2.0.6 installation. You will also need
+a copy of the lsaneglue library (which is missing from the default GNO 2.0.6
+installation) to be present in your GNO /lib directory. Run 'dmake bunzip2'
+to build the main program or 'dmake test' to build both programs and run a
+simple test to ensure that bunzip2 is working correctly.
+
+There are some special considerations necessary when compiling the file
+decompress.c. As noted above, it must be compiled with (nearly) full
+optimization to compile properly. To compile it with full optimization using
+ORCA/C 2.1.0, however, requires more than 8MB of memory. Thus, decompress.c
+(and by extension the bunzip2 program as a whole) can only be compiled on an
+emulator with 14MB memory support enabled. The only emulators that presently
+support this are Bernie ][ The Rescue and Sweet16. I have included a
+prebuilt object file (decompress.o) so that you can rebuild bunzip2 with
+changes to other source files using a real IIgs.
+
+
+AREAS FOR IMPROVEMENT
+=====================
+* Resource forks and GS/OS filetypes are not supported. This is not a major
+ problem; other programs such as ShrinkIt should be used for GS-specific
+ archives.
+* Compression could be reenabled. This would require adapting the compression
+ and block sorting routines to work properly under GNO on the GS.
+* Some or all of the program could be rewritten in assembly language. This
+ would improve its performance by some amount, although I don't know how
+ much. It also might reduce memory usage. This would require a full
+ understanding of the BWT compression and decompression algorithms used in
+ bzip2, which I do not presently possess.
+
+
+SUPPORT
+=======
+I can be contacted by email at sheumann@myrealbox.com . Please contect me,
+rather than Julian Seward, about any problems that you are experiencing only
+in the GNO version of bunzip2.
+
+--
+Stephen Heumann
diff --git a/README b/README.bzip2
similarity index 100%
rename from README
rename to README.bzip2
diff --git a/Y2K_INFO b/Y2K_INFO
deleted file mode 100644
index 55fd56a..0000000
--- a/Y2K_INFO
+++ /dev/null
@@ -1,34 +0,0 @@
-
-Y2K status of bzip2 and libbzip2, versions 0.1, 0.9.0 and 0.9.5
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Informally speaking:
- bzip2 is a compression program built on top of libbzip2,
- a library which does the real work of compression and
- decompression. As far as I am aware, libbzip2 does not have
- any date-related code at all.
-
- bzip2 itself copies dates from source to destination files
- when compressing or decompressing, using the 'stat' and 'utime'
- UNIX system calls. It doesn't examine, manipulate or store the
- dates in any way. So as far as I can see, there shouldn't be any
- problem with bzip2 providing 'stat' and 'utime' work correctly
- on your system.
-
- On non-unix platforms (those for which BZ_UNIX in bzip2.c is
- not set to 1), bzip2 doesn't even do the date copying.
-
- Overall, informally speaking, I don't think bzip2 or libbzip2
- have a Y2K problem.
-
-Formally speaking:
- I am not prepared to offer you any assurance whatsoever
- regarding Y2K issues in my software. You alone assume the
- entire risk of using the software. The disclaimer of liability
- in the LICENSE file in the bzip2 source distribution continues
- to apply on this issue as with every other issue pertaining
- to the software.
-
-Julian Seward
-Cambridge, UK
-25 August 1999
diff --git a/blocksort.c b/blocksort.c
deleted file mode 100644
index aba3efc..0000000
--- a/blocksort.c
+++ /dev/null
@@ -1,1141 +0,0 @@
-
-/*-------------------------------------------------------------*/
-/*--- Block sorting machinery ---*/
-/*--- blocksort.c ---*/
-/*-------------------------------------------------------------*/
-
-/*--
- This file is a part of bzip2 and/or libbzip2, a program and
- library for lossless, block-sorting data compression.
-
- Copyright (C) 1996-2002 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
- bzip2/libbzip2 version 1.0 of 21 March 2000
-
- This program is based on (at least) the work of:
- Mike Burrows
- David Wheeler
- Peter Fenwick
- Alistair Moffat
- Radford Neal
- Ian H. Witten
- Robert Sedgewick
- Jon L. Bentley
-
- For more information on these sources, see the manual.
-
- To get some idea how the block sorting algorithms in this file
- work, read my paper
- On the Performance of BWT Sorting Algorithms
- in Proceedings of the IEEE Data Compression Conference 2000,
- Snowbird, Utah, USA, 27-30 March 2000. The main sort in this
- file implements the algorithm called cache in the paper.
---*/
-
-
-#include "bzlib_private.h"
-
-/*---------------------------------------------*/
-/*--- Fallback O(N log(N)^2) sorting ---*/
-/*--- algorithm, for repetitive blocks ---*/
-/*---------------------------------------------*/
-
-/*---------------------------------------------*/
-static
-__inline__
-void fallbackSimpleSort ( UInt32* fmap,
- UInt32* eclass,
- Int32 lo,
- Int32 hi )
-{
- Int32 i, j, tmp;
- UInt32 ec_tmp;
-
- if (lo == hi) return;
-
- if (hi - lo > 3) {
- for ( i = hi-4; i >= lo; i-- ) {
- tmp = fmap[i];
- ec_tmp = eclass[tmp];
- for ( j = i+4; j <= hi && ec_tmp > eclass[fmap[j]]; j += 4 )
- fmap[j-4] = fmap[j];
- fmap[j-4] = tmp;
- }
- }
-
- for ( i = hi-1; i >= lo; i-- ) {
- tmp = fmap[i];
- ec_tmp = eclass[tmp];
- for ( j = i+1; j <= hi && ec_tmp > eclass[fmap[j]]; j++ )
- fmap[j-1] = fmap[j];
- fmap[j-1] = tmp;
- }
-}
-
-
-/*---------------------------------------------*/
-#define fswap(zz1, zz2) \
- { Int32 zztmp = zz1; zz1 = zz2; zz2 = zztmp; }
-
-#define fvswap(zzp1, zzp2, zzn) \
-{ \
- Int32 yyp1 = (zzp1); \
- Int32 yyp2 = (zzp2); \
- Int32 yyn = (zzn); \
- while (yyn > 0) { \
- fswap(fmap[yyp1], fmap[yyp2]); \
- yyp1++; yyp2++; yyn--; \
- } \
-}
-
-
-#define fmin(a,b) ((a) < (b)) ? (a) : (b)
-
-#define fpush(lz,hz) { stackLo[sp] = lz; \
- stackHi[sp] = hz; \
- sp++; }
-
-#define fpop(lz,hz) { sp--; \
- lz = stackLo[sp]; \
- hz = stackHi[sp]; }
-
-#define FALLBACK_QSORT_SMALL_THRESH 10
-#define FALLBACK_QSORT_STACK_SIZE 100
-
-
-static
-void fallbackQSort3 ( UInt32* fmap,
- UInt32* eclass,
- Int32 loSt,
- Int32 hiSt )
-{
- Int32 unLo, unHi, ltLo, gtHi, n, m;
- Int32 sp, lo, hi;
- UInt32 med, r, r3;
- Int32 stackLo[FALLBACK_QSORT_STACK_SIZE];
- Int32 stackHi[FALLBACK_QSORT_STACK_SIZE];
-
- r = 0;
-
- sp = 0;
- fpush ( loSt, hiSt );
-
- while (sp > 0) {
-
- AssertH ( sp < FALLBACK_QSORT_STACK_SIZE, 1004 );
-
- fpop ( lo, hi );
- if (hi - lo < FALLBACK_QSORT_SMALL_THRESH) {
- fallbackSimpleSort ( fmap, eclass, lo, hi );
- continue;
- }
-
- /* Random partitioning. Median of 3 sometimes fails to
- avoid bad cases. Median of 9 seems to help but
- looks rather expensive. This too seems to work but
- is cheaper. Guidance for the magic constants
- 7621 and 32768 is taken from Sedgewick's algorithms
- book, chapter 35.
- */
- r = ((r * 7621) + 1) % 32768;
- r3 = r % 3;
- if (r3 == 0) med = eclass[fmap[lo]]; else
- if (r3 == 1) med = eclass[fmap[(lo+hi)>>1]]; else
- med = eclass[fmap[hi]];
-
- unLo = ltLo = lo;
- unHi = gtHi = hi;
-
- while (1) {
- while (1) {
- if (unLo > unHi) break;
- n = (Int32)eclass[fmap[unLo]] - (Int32)med;
- if (n == 0) {
- fswap(fmap[unLo], fmap[ltLo]);
- ltLo++; unLo++;
- continue;
- };
- if (n > 0) break;
- unLo++;
- }
- while (1) {
- if (unLo > unHi) break;
- n = (Int32)eclass[fmap[unHi]] - (Int32)med;
- if (n == 0) {
- fswap(fmap[unHi], fmap[gtHi]);
- gtHi--; unHi--;
- continue;
- };
- if (n < 0) break;
- unHi--;
- }
- if (unLo > unHi) break;
- fswap(fmap[unLo], fmap[unHi]); unLo++; unHi--;
- }
-
- AssertD ( unHi == unLo-1, "fallbackQSort3(2)" );
-
- if (gtHi < ltLo) continue;
-
- n = fmin(ltLo-lo, unLo-ltLo); fvswap(lo, unLo-n, n);
- m = fmin(hi-gtHi, gtHi-unHi); fvswap(unLo, hi-m+1, m);
-
- n = lo + unLo - ltLo - 1;
- m = hi - (gtHi - unHi) + 1;
-
- if (n - lo > hi - m) {
- fpush ( lo, n );
- fpush ( m, hi );
- } else {
- fpush ( m, hi );
- fpush ( lo, n );
- }
- }
-}
-
-#undef fmin
-#undef fpush
-#undef fpop
-#undef fswap
-#undef fvswap
-#undef FALLBACK_QSORT_SMALL_THRESH
-#undef FALLBACK_QSORT_STACK_SIZE
-
-
-/*---------------------------------------------*/
-/* Pre:
- nblock > 0
- eclass exists for [0 .. nblock-1]
- ((UChar*)eclass) [0 .. nblock-1] holds block
- ptr exists for [0 .. nblock-1]
-
- Post:
- ((UChar*)eclass) [0 .. nblock-1] holds block
- All other areas of eclass destroyed
- fmap [0 .. nblock-1] holds sorted order
- bhtab [ 0 .. 2+(nblock/32) ] destroyed
-*/
-
-#define SET_BH(zz) bhtab[(zz) >> 5] |= (1 << ((zz) & 31))
-#define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~(1 << ((zz) & 31))
-#define ISSET_BH(zz) (bhtab[(zz) >> 5] & (1 << ((zz) & 31)))
-#define WORD_BH(zz) bhtab[(zz) >> 5]
-#define UNALIGNED_BH(zz) ((zz) & 0x01f)
-
-static
-void fallbackSort ( UInt32* fmap,
- UInt32* eclass,
- UInt32* bhtab,
- Int32 nblock,
- Int32 verb )
-{
- Int32 ftab[257];
- Int32 ftabCopy[256];
- Int32 H, i, j, k, l, r, cc, cc1;
- Int32 nNotDone;
- Int32 nBhtab;
- UChar* eclass8 = (UChar*)eclass;
-
- /*--
- Initial 1-char radix sort to generate
- initial fmap and initial BH bits.
- --*/
- if (verb >= 4)
- VPrintf0 ( " bucket sorting ...\n" );
- for (i = 0; i < 257; i++) ftab[i] = 0;
- for (i = 0; i < nblock; i++) ftab[eclass8[i]]++;
- for (i = 0; i < 256; i++) ftabCopy[i] = ftab[i];
- for (i = 1; i < 257; i++) ftab[i] += ftab[i-1];
-
- for (i = 0; i < nblock; i++) {
- j = eclass8[i];
- k = ftab[j] - 1;
- ftab[j] = k;
- fmap[k] = i;
- }
-
- nBhtab = 2 + (nblock / 32);
- for (i = 0; i < nBhtab; i++) bhtab[i] = 0;
- for (i = 0; i < 256; i++) SET_BH(ftab[i]);
-
- /*--
- Inductively refine the buckets. Kind-of an
- "exponential radix sort" (!), inspired by the
- Manber-Myers suffix array construction algorithm.
- --*/
-
- /*-- set sentinel bits for block-end detection --*/
- for (i = 0; i < 32; i++) {
- SET_BH(nblock + 2*i);
- CLEAR_BH(nblock + 2*i + 1);
- }
-
- /*-- the log(N) loop --*/
- H = 1;
- while (1) {
-
- if (verb >= 4)
- VPrintf1 ( " depth %6d has ", H );
-
- j = 0;
- for (i = 0; i < nblock; i++) {
- if (ISSET_BH(i)) j = i;
- k = fmap[i] - H; if (k < 0) k += nblock;
- eclass[k] = j;
- }
-
- nNotDone = 0;
- r = -1;
- while (1) {
-
- /*-- find the next non-singleton bucket --*/
- k = r + 1;
- while (ISSET_BH(k) && UNALIGNED_BH(k)) k++;
- if (ISSET_BH(k)) {
- while (WORD_BH(k) == 0xffffffff) k += 32;
- while (ISSET_BH(k)) k++;
- }
- l = k - 1;
- if (l >= nblock) break;
- while (!ISSET_BH(k) && UNALIGNED_BH(k)) k++;
- if (!ISSET_BH(k)) {
- while (WORD_BH(k) == 0x00000000) k += 32;
- while (!ISSET_BH(k)) k++;
- }
- r = k - 1;
- if (r >= nblock) break;
-
- /*-- now [l, r] bracket current bucket --*/
- if (r > l) {
- nNotDone += (r - l + 1);
- fallbackQSort3 ( fmap, eclass, l, r );
-
- /*-- scan bucket and generate header bits-- */
- cc = -1;
- for (i = l; i <= r; i++) {
- cc1 = eclass[fmap[i]];
- if (cc != cc1) { SET_BH(i); cc = cc1; };
- }
- }
- }
-
- if (verb >= 4)
- VPrintf1 ( "%6d unresolved strings\n", nNotDone );
-
- H *= 2;
- if (H > nblock || nNotDone == 0) break;
- }
-
- /*--
- Reconstruct the original block in
- eclass8 [0 .. nblock-1], since the
- previous phase destroyed it.
- --*/
- if (verb >= 4)
- VPrintf0 ( " reconstructing block ...\n" );
- j = 0;
- for (i = 0; i < nblock; i++) {
- while (ftabCopy[j] == 0) j++;
- ftabCopy[j]--;
- eclass8[fmap[i]] = (UChar)j;
- }
- AssertH ( j < 256, 1005 );
-}
-
-#undef SET_BH
-#undef CLEAR_BH
-#undef ISSET_BH
-#undef WORD_BH
-#undef UNALIGNED_BH
-
-
-/*---------------------------------------------*/
-/*--- The main, O(N^2 log(N)) sorting ---*/
-/*--- algorithm. Faster for "normal" ---*/
-/*--- non-repetitive blocks. ---*/
-/*---------------------------------------------*/
-
-/*---------------------------------------------*/
-static
-__inline__
-Bool mainGtU ( UInt32 i1,
- UInt32 i2,
- UChar* block,
- UInt16* quadrant,
- UInt32 nblock,
- Int32* budget )
-{
- Int32 k;
- UChar c1, c2;
- UInt16 s1, s2;
-
- AssertD ( i1 != i2, "mainGtU" );
- /* 1 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- i1++; i2++;
- /* 2 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- i1++; i2++;
- /* 3 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- i1++; i2++;
- /* 4 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- i1++; i2++;
- /* 5 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- i1++; i2++;
- /* 6 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- i1++; i2++;
- /* 7 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- i1++; i2++;
- /* 8 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- i1++; i2++;
- /* 9 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- i1++; i2++;
- /* 10 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- i1++; i2++;
- /* 11 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- i1++; i2++;
- /* 12 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- i1++; i2++;
-
- k = nblock + 8;
-
- do {
- /* 1 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- s1 = quadrant[i1]; s2 = quadrant[i2];
- if (s1 != s2) return (s1 > s2);
- i1++; i2++;
- /* 2 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- s1 = quadrant[i1]; s2 = quadrant[i2];
- if (s1 != s2) return (s1 > s2);
- i1++; i2++;
- /* 3 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- s1 = quadrant[i1]; s2 = quadrant[i2];
- if (s1 != s2) return (s1 > s2);
- i1++; i2++;
- /* 4 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- s1 = quadrant[i1]; s2 = quadrant[i2];
- if (s1 != s2) return (s1 > s2);
- i1++; i2++;
- /* 5 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- s1 = quadrant[i1]; s2 = quadrant[i2];
- if (s1 != s2) return (s1 > s2);
- i1++; i2++;
- /* 6 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- s1 = quadrant[i1]; s2 = quadrant[i2];
- if (s1 != s2) return (s1 > s2);
- i1++; i2++;
- /* 7 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- s1 = quadrant[i1]; s2 = quadrant[i2];
- if (s1 != s2) return (s1 > s2);
- i1++; i2++;
- /* 8 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- s1 = quadrant[i1]; s2 = quadrant[i2];
- if (s1 != s2) return (s1 > s2);
- i1++; i2++;
-
- if (i1 >= nblock) i1 -= nblock;
- if (i2 >= nblock) i2 -= nblock;
-
- k -= 8;
- (*budget)--;
- }
- while (k >= 0);
-
- return False;
-}
-
-
-/*---------------------------------------------*/
-/*--
- Knuth's increments seem to work better
- than Incerpi-Sedgewick here. Possibly
- because the number of elems to sort is
- usually small, typically <= 20.
---*/
-static
-Int32 incs[14] = { 1, 4, 13, 40, 121, 364, 1093, 3280,
- 9841, 29524, 88573, 265720,
- 797161, 2391484 };
-
-static
-void mainSimpleSort ( UInt32* ptr,
- UChar* block,
- UInt16* quadrant,
- Int32 nblock,
- Int32 lo,
- Int32 hi,
- Int32 d,
- Int32* budget )
-{
- Int32 i, j, h, bigN, hp;
- UInt32 v;
-
- bigN = hi - lo + 1;
- if (bigN < 2) return;
-
- hp = 0;
- while (incs[hp] < bigN) hp++;
- hp--;
-
- for (; hp >= 0; hp--) {
- h = incs[hp];
-
- i = lo + h;
- while (True) {
-
- /*-- copy 1 --*/
- if (i > hi) break;
- v = ptr[i];
- j = i;
- while ( mainGtU (
- ptr[j-h]+d, v+d, block, quadrant, nblock, budget
- ) ) {
- ptr[j] = ptr[j-h];
- j = j - h;
- if (j <= (lo + h - 1)) break;
- }
- ptr[j] = v;
- i++;
-
- /*-- copy 2 --*/
- if (i > hi) break;
- v = ptr[i];
- j = i;
- while ( mainGtU (
- ptr[j-h]+d, v+d, block, quadrant, nblock, budget
- ) ) {
- ptr[j] = ptr[j-h];
- j = j - h;
- if (j <= (lo + h - 1)) break;
- }
- ptr[j] = v;
- i++;
-
- /*-- copy 3 --*/
- if (i > hi) break;
- v = ptr[i];
- j = i;
- while ( mainGtU (
- ptr[j-h]+d, v+d, block, quadrant, nblock, budget
- ) ) {
- ptr[j] = ptr[j-h];
- j = j - h;
- if (j <= (lo + h - 1)) break;
- }
- ptr[j] = v;
- i++;
-
- if (*budget < 0) return;
- }
- }
-}
-
-
-/*---------------------------------------------*/
-/*--
- The following is an implementation of
- an elegant 3-way quicksort for strings,
- described in a paper "Fast Algorithms for
- Sorting and Searching Strings", by Robert
- Sedgewick and Jon L. Bentley.
---*/
-
-#define mswap(zz1, zz2) \
- { Int32 zztmp = zz1; zz1 = zz2; zz2 = zztmp; }
-
-#define mvswap(zzp1, zzp2, zzn) \
-{ \
- Int32 yyp1 = (zzp1); \
- Int32 yyp2 = (zzp2); \
- Int32 yyn = (zzn); \
- while (yyn > 0) { \
- mswap(ptr[yyp1], ptr[yyp2]); \
- yyp1++; yyp2++; yyn--; \
- } \
-}
-
-static
-__inline__
-UChar mmed3 ( UChar a, UChar b, UChar c )
-{
- UChar t;
- if (a > b) { t = a; a = b; b = t; };
- if (b > c) {
- b = c;
- if (a > b) b = a;
- }
- return b;
-}
-
-#define mmin(a,b) ((a) < (b)) ? (a) : (b)
-
-#define mpush(lz,hz,dz) { stackLo[sp] = lz; \
- stackHi[sp] = hz; \
- stackD [sp] = dz; \
- sp++; }
-
-#define mpop(lz,hz,dz) { sp--; \
- lz = stackLo[sp]; \
- hz = stackHi[sp]; \
- dz = stackD [sp]; }
-
-
-#define mnextsize(az) (nextHi[az]-nextLo[az])
-
-#define mnextswap(az,bz) \
- { Int32 tz; \
- tz = nextLo[az]; nextLo[az] = nextLo[bz]; nextLo[bz] = tz; \
- tz = nextHi[az]; nextHi[az] = nextHi[bz]; nextHi[bz] = tz; \
- tz = nextD [az]; nextD [az] = nextD [bz]; nextD [bz] = tz; }
-
-
-#define MAIN_QSORT_SMALL_THRESH 20
-#define MAIN_QSORT_DEPTH_THRESH (BZ_N_RADIX + BZ_N_QSORT)
-#define MAIN_QSORT_STACK_SIZE 100
-
-static
-void mainQSort3 ( UInt32* ptr,
- UChar* block,
- UInt16* quadrant,
- Int32 nblock,
- Int32 loSt,
- Int32 hiSt,
- Int32 dSt,
- Int32* budget )
-{
- Int32 unLo, unHi, ltLo, gtHi, n, m, med;
- Int32 sp, lo, hi, d;
-
- Int32 stackLo[MAIN_QSORT_STACK_SIZE];
- Int32 stackHi[MAIN_QSORT_STACK_SIZE];
- Int32 stackD [MAIN_QSORT_STACK_SIZE];
-
- Int32 nextLo[3];
- Int32 nextHi[3];
- Int32 nextD [3];
-
- sp = 0;
- mpush ( loSt, hiSt, dSt );
-
- while (sp > 0) {
-
- AssertH ( sp < MAIN_QSORT_STACK_SIZE, 1001 );
-
- mpop ( lo, hi, d );
- if (hi - lo < MAIN_QSORT_SMALL_THRESH ||
- d > MAIN_QSORT_DEPTH_THRESH) {
- mainSimpleSort ( ptr, block, quadrant, nblock, lo, hi, d, budget );
- if (*budget < 0) return;
- continue;
- }
-
- med = (Int32)
- mmed3 ( block[ptr[ lo ]+d],
- block[ptr[ hi ]+d],
- block[ptr[ (lo+hi)>>1 ]+d] );
-
- unLo = ltLo = lo;
- unHi = gtHi = hi;
-
- while (True) {
- while (True) {
- if (unLo > unHi) break;
- n = ((Int32)block[ptr[unLo]+d]) - med;
- if (n == 0) {
- mswap(ptr[unLo], ptr[ltLo]);
- ltLo++; unLo++; continue;
- };
- if (n > 0) break;
- unLo++;
- }
- while (True) {
- if (unLo > unHi) break;
- n = ((Int32)block[ptr[unHi]+d]) - med;
- if (n == 0) {
- mswap(ptr[unHi], ptr[gtHi]);
- gtHi--; unHi--; continue;
- };
- if (n < 0) break;
- unHi--;
- }
- if (unLo > unHi) break;
- mswap(ptr[unLo], ptr[unHi]); unLo++; unHi--;
- }
-
- AssertD ( unHi == unLo-1, "mainQSort3(2)" );
-
- if (gtHi < ltLo) {
- mpush(lo, hi, d+1 );
- continue;
- }
-
- n = mmin(ltLo-lo, unLo-ltLo); mvswap(lo, unLo-n, n);
- m = mmin(hi-gtHi, gtHi-unHi); mvswap(unLo, hi-m+1, m);
-
- n = lo + unLo - ltLo - 1;
- m = hi - (gtHi - unHi) + 1;
-
- nextLo[0] = lo; nextHi[0] = n; nextD[0] = d;
- nextLo[1] = m; nextHi[1] = hi; nextD[1] = d;
- nextLo[2] = n+1; nextHi[2] = m-1; nextD[2] = d+1;
-
- if (mnextsize(0) < mnextsize(1)) mnextswap(0,1);
- if (mnextsize(1) < mnextsize(2)) mnextswap(1,2);
- if (mnextsize(0) < mnextsize(1)) mnextswap(0,1);
-
- AssertD (mnextsize(0) >= mnextsize(1), "mainQSort3(8)" );
- AssertD (mnextsize(1) >= mnextsize(2), "mainQSort3(9)" );
-
- mpush (nextLo[0], nextHi[0], nextD[0]);
- mpush (nextLo[1], nextHi[1], nextD[1]);
- mpush (nextLo[2], nextHi[2], nextD[2]);
- }
-}
-
-#undef mswap
-#undef mvswap
-#undef mpush
-#undef mpop
-#undef mmin
-#undef mnextsize
-#undef mnextswap
-#undef MAIN_QSORT_SMALL_THRESH
-#undef MAIN_QSORT_DEPTH_THRESH
-#undef MAIN_QSORT_STACK_SIZE
-
-
-/*---------------------------------------------*/
-/* Pre:
- nblock > N_OVERSHOOT
- block32 exists for [0 .. nblock-1 +N_OVERSHOOT]
- ((UChar*)block32) [0 .. nblock-1] holds block
- ptr exists for [0 .. nblock-1]
-
- Post:
- ((UChar*)block32) [0 .. nblock-1] holds block
- All other areas of block32 destroyed
- ftab [0 .. 65536 ] destroyed
- ptr [0 .. nblock-1] holds sorted order
- if (*budget < 0), sorting was abandoned
-*/
-
-#define BIGFREQ(b) (ftab[((b)+1) << 8] - ftab[(b) << 8])
-#define SETMASK (1 << 21)
-#define CLEARMASK (~(SETMASK))
-
-static
-void mainSort ( UInt32* ptr,
- UChar* block,
- UInt16* quadrant,
- UInt32* ftab,
- Int32 nblock,
- Int32 verb,
- Int32* budget )
-{
- Int32 i, j, k, ss, sb;
- Int32 runningOrder[256];
- Bool bigDone[256];
- Int32 copyStart[256];
- Int32 copyEnd [256];
- UChar c1;
- Int32 numQSorted;
- UInt16 s;
- if (verb >= 4) VPrintf0 ( " main sort initialise ...\n" );
-
- /*-- set up the 2-byte frequency table --*/
- for (i = 65536; i >= 0; i--) ftab[i] = 0;
-
- j = block[0] << 8;
- i = nblock-1;
- for (; i >= 3; i -= 4) {
- quadrant[i] = 0;
- j = (j >> 8) | ( ((UInt16)block[i]) << 8);
- ftab[j]++;
- quadrant[i-1] = 0;
- j = (j >> 8) | ( ((UInt16)block[i-1]) << 8);
- ftab[j]++;
- quadrant[i-2] = 0;
- j = (j >> 8) | ( ((UInt16)block[i-2]) << 8);
- ftab[j]++;
- quadrant[i-3] = 0;
- j = (j >> 8) | ( ((UInt16)block[i-3]) << 8);
- ftab[j]++;
- }
- for (; i >= 0; i--) {
- quadrant[i] = 0;
- j = (j >> 8) | ( ((UInt16)block[i]) << 8);
- ftab[j]++;
- }
-
- /*-- (emphasises close relationship of block & quadrant) --*/
- for (i = 0; i < BZ_N_OVERSHOOT; i++) {
- block [nblock+i] = block[i];
- quadrant[nblock+i] = 0;
- }
-
- if (verb >= 4) VPrintf0 ( " bucket sorting ...\n" );
-
- /*-- Complete the initial radix sort --*/
- for (i = 1; i <= 65536; i++) ftab[i] += ftab[i-1];
-
- s = block[0] << 8;
- i = nblock-1;
- for (; i >= 3; i -= 4) {
- s = (s >> 8) | (block[i] << 8);
- j = ftab[s] -1;
- ftab[s] = j;
- ptr[j] = i;
- s = (s >> 8) | (block[i-1] << 8);
- j = ftab[s] -1;
- ftab[s] = j;
- ptr[j] = i-1;
- s = (s >> 8) | (block[i-2] << 8);
- j = ftab[s] -1;
- ftab[s] = j;
- ptr[j] = i-2;
- s = (s >> 8) | (block[i-3] << 8);
- j = ftab[s] -1;
- ftab[s] = j;
- ptr[j] = i-3;
- }
- for (; i >= 0; i--) {
- s = (s >> 8) | (block[i] << 8);
- j = ftab[s] -1;
- ftab[s] = j;
- ptr[j] = i;
- }
-
- /*--
- Now ftab contains the first loc of every small bucket.
- Calculate the running order, from smallest to largest
- big bucket.
- --*/
- for (i = 0; i <= 255; i++) {
- bigDone [i] = False;
- runningOrder[i] = i;
- }
-
- {
- Int32 vv;
- Int32 h = 1;
- do h = 3 * h + 1; while (h <= 256);
- do {
- h = h / 3;
- for (i = h; i <= 255; i++) {
- vv = runningOrder[i];
- j = i;
- while ( BIGFREQ(runningOrder[j-h]) > BIGFREQ(vv) ) {
- runningOrder[j] = runningOrder[j-h];
- j = j - h;
- if (j <= (h - 1)) goto zero;
- }
- zero:
- runningOrder[j] = vv;
- }
- } while (h != 1);
- }
-
- /*--
- The main sorting loop.
- --*/
-
- numQSorted = 0;
-
- for (i = 0; i <= 255; i++) {
-
- /*--
- Process big buckets, starting with the least full.
- Basically this is a 3-step process in which we call
- mainQSort3 to sort the small buckets [ss, j], but
- also make a big effort to avoid the calls if we can.
- --*/
- ss = runningOrder[i];
-
- /*--
- Step 1:
- Complete the big bucket [ss] by quicksorting
- any unsorted small buckets [ss, j], for j != ss.
- Hopefully previous pointer-scanning phases have already
- completed many of the small buckets [ss, j], so
- we don't have to sort them at all.
- --*/
- for (j = 0; j <= 255; j++) {
- if (j != ss) {
- sb = (ss << 8) + j;
- if ( ! (ftab[sb] & SETMASK) ) {
- Int32 lo = ftab[sb] & CLEARMASK;
- Int32 hi = (ftab[sb+1] & CLEARMASK) - 1;
- if (hi > lo) {
- if (verb >= 4)
- VPrintf4 ( " qsort [0x%x, 0x%x] "
- "done %d this %d\n",
- ss, j, numQSorted, hi - lo + 1 );
- mainQSort3 (
- ptr, block, quadrant, nblock,
- lo, hi, BZ_N_RADIX, budget
- );
- numQSorted += (hi - lo + 1);
- if (*budget < 0) return;
- }
- }
- ftab[sb] |= SETMASK;
- }
- }
-
- AssertH ( !bigDone[ss], 1006 );
-
- /*--
- Step 2:
- Now scan this big bucket [ss] so as to synthesise the
- sorted order for small buckets [t, ss] for all t,
- including, magically, the bucket [ss,ss] too.
- This will avoid doing Real Work in subsequent Step 1's.
- --*/
- {
- for (j = 0; j <= 255; j++) {
- copyStart[j] = ftab[(j << 8) + ss] & CLEARMASK;
- copyEnd [j] = (ftab[(j << 8) + ss + 1] & CLEARMASK) - 1;
- }
- for (j = ftab[ss << 8] & CLEARMASK; j < copyStart[ss]; j++) {
- k = ptr[j]-1; if (k < 0) k += nblock;
- c1 = block[k];
- if (!bigDone[c1])
- ptr[ copyStart[c1]++ ] = k;
- }
- for (j = (ftab[(ss+1) << 8] & CLEARMASK) - 1; j > copyEnd[ss]; j--) {
- k = ptr[j]-1; if (k < 0) k += nblock;
- c1 = block[k];
- if (!bigDone[c1])
- ptr[ copyEnd[c1]-- ] = k;
- }
- }
-
- AssertH ( (copyStart[ss]-1 == copyEnd[ss])
- ||
- /* Extremely rare case missing in bzip2-1.0.0 and 1.0.1.
- Necessity for this case is demonstrated by compressing
- a sequence of approximately 48.5 million of character
- 251; 1.0.0/1.0.1 will then die here. */
- (copyStart[ss] == 0 && copyEnd[ss] == nblock-1),
- 1007 )
-
- for (j = 0; j <= 255; j++) ftab[(j << 8) + ss] |= SETMASK;
-
- /*--
- Step 3:
- The [ss] big bucket is now done. Record this fact,
- and update the quadrant descriptors. Remember to
- update quadrants in the overshoot area too, if
- necessary. The "if (i < 255)" test merely skips
- this updating for the last bucket processed, since
- updating for the last bucket is pointless.
-
- The quadrant array provides a way to incrementally
- cache sort orderings, as they appear, so as to
- make subsequent comparisons in fullGtU() complete
- faster. For repetitive blocks this makes a big
- difference (but not big enough to be able to avoid
- the fallback sorting mechanism, exponential radix sort).
-
- The precise meaning is: at all times:
-
- for 0 <= i < nblock and 0 <= j <= nblock
-
- if block[i] != block[j],
-
- then the relative values of quadrant[i] and
- quadrant[j] are meaningless.
-
- else {
- if quadrant[i] < quadrant[j]
- then the string starting at i lexicographically
- precedes the string starting at j
-
- else if quadrant[i] > quadrant[j]
- then the string starting at j lexicographically
- precedes the string starting at i
-
- else
- the relative ordering of the strings starting
- at i and j has not yet been determined.
- }
- --*/
- bigDone[ss] = True;
-
- if (i < 255) {
- Int32 bbStart = ftab[ss << 8] & CLEARMASK;
- Int32 bbSize = (ftab[(ss+1) << 8] & CLEARMASK) - bbStart;
- Int32 shifts = 0;
-
- while ((bbSize >> shifts) > 65534) shifts++;
-
- for (j = bbSize-1; j >= 0; j--) {
- Int32 a2update = ptr[bbStart + j];
- UInt16 qVal = (UInt16)(j >> shifts);
- quadrant[a2update] = qVal;
- if (a2update < BZ_N_OVERSHOOT)
- quadrant[a2update + nblock] = qVal;
- }
- AssertH ( ((bbSize-1) >> shifts) <= 65535, 1002 );
- }
-
- }
-
- if (verb >= 4)
- VPrintf3 ( " %d pointers, %d sorted, %d scanned\n",
- nblock, numQSorted, nblock - numQSorted );
-}
-
-#undef BIGFREQ
-#undef SETMASK
-#undef CLEARMASK
-
-
-/*---------------------------------------------*/
-/* Pre:
- nblock > 0
- arr2 exists for [0 .. nblock-1 +N_OVERSHOOT]
- ((UChar*)arr2) [0 .. nblock-1] holds block
- arr1 exists for [0 .. nblock-1]
-
- Post:
- ((UChar*)arr2) [0 .. nblock-1] holds block
- All other areas of block destroyed
- ftab [ 0 .. 65536 ] destroyed
- arr1 [0 .. nblock-1] holds sorted order
-*/
-void BZ2_blockSort ( EState* s )
-{
- UInt32* ptr = s->ptr;
- UChar* block = s->block;
- UInt32* ftab = s->ftab;
- Int32 nblock = s->nblock;
- Int32 verb = s->verbosity;
- Int32 wfact = s->workFactor;
- UInt16* quadrant;
- Int32 budget;
- Int32 budgetInit;
- Int32 i;
-
- if (nblock < 10000) {
- fallbackSort ( s->arr1, s->arr2, ftab, nblock, verb );
- } else {
- /* Calculate the location for quadrant, remembering to get
- the alignment right. Assumes that &(block[0]) is at least
- 2-byte aligned -- this should be ok since block is really
- the first section of arr2.
- */
- i = nblock+BZ_N_OVERSHOOT;
- if (i & 1) i++;
- quadrant = (UInt16*)(&(block[i]));
-
- /* (wfact-1) / 3 puts the default-factor-30
- transition point at very roughly the same place as
- with v0.1 and v0.9.0.
- Not that it particularly matters any more, since the
- resulting compressed stream is now the same regardless
- of whether or not we use the main sort or fallback sort.
- */
- if (wfact < 1 ) wfact = 1;
- if (wfact > 100) wfact = 100;
- budgetInit = nblock * ((wfact-1) / 3);
- budget = budgetInit;
-
- mainSort ( ptr, block, quadrant, ftab, nblock, verb, &budget );
- if (verb >= 3)
- VPrintf3 ( " %d work, %d block, ratio %5.2f\n",
- budgetInit - budget,
- nblock,
- (float)(budgetInit - budget) /
- (float)(nblock==0 ? 1 : nblock) );
- if (budget < 0) {
- if (verb >= 2)
- VPrintf0 ( " too repetitive; using fallback"
- " sorting algorithm\n" );
- fallbackSort ( s->arr1, s->arr2, ftab, nblock, verb );
- }
- }
-
- s->origPtr = -1;
- for (i = 0; i < s->nblock; i++)
- if (ptr[i] == 0)
- { s->origPtr = i; break; };
-
- AssertH( s->origPtr != -1, 1003 );
-}
-
-
-/*-------------------------------------------------------------*/
-/*--- end blocksort.c ---*/
-/*-------------------------------------------------------------*/
diff --git a/bunzip2.1 b/bunzip2.1
new file mode 100644
index 0000000..ced3a73
--- /dev/null
+++ b/bunzip2.1
@@ -0,0 +1,362 @@
+.TH BUNZIP2 1 "9 June 2003"
+.SH NAME
+bunzip2 \- a block-sorting file decompressor, v1.0.2gs1
+.br
+bzcat \- decompresses files to stdout
+.br
+bzip2recover \- recovers data from damaged bzip2 files
+
+.SH SYNOPSIS
+.br
+.B bunzip2
+.RB [ " \-fkvsVL " ]
+[
+.I "filenames \&..."
+]
+.br
+.B bzcat
+.RB [ " \-s " ]
+[
+.I "filenames \&..."
+]
+.br
+.B bzip2recover
+.I "filename"
+
+.SH DESCRIPTION
+.I bunzip2
+decompresses files created by
+.I bzip2
+using the Burrows-Wheeler block sorting
+text compression algorithm, and Huffman coding.
+.I bzip2
+generally achieves
+considerably better compression than that achieved by more conventional
+LZ77/LZ78-based compressors, and approaches the performance of the PPM
+family of statistical compressors.
+.LP
+The command-line options are deliberately very similar to
+those of
+.I GNU
+.I gunzip,
+but they are not identical.
+.LP
+.I bunzip2
+will by default not overwrite existing
+files. If you want this to happen, specify the \-f flag.
+.LP
+.I bunzip2
+decompresses all specified files. Files which were not created by
+.I bzip2
+will be detected and ignored, and a warning issued.
+.I bunzip2
+attempts to guess the filename for the decompressed file
+from that of the compressed file as follows:
+.LP
+.nf
+ filename.bz2 becomes filename
+ filename.bz becomes filename
+ filename.tbz2 becomes filename.tar
+ filename.tbz becomes filename.tar
+ anyothername becomes anyothername.out
+.fi
+.LP
+If the file does not end in one of the recognised endings,
+.I .bz2,
+.I .bz,
+.I .tbz2
+or
+.I .tbz,
+.I bunzip2
+complains that it cannot
+guess the name of the original file, and uses the original name
+with
+.I .out
+appended.
+.LP
+Supplying no filenames causes decompression from
+standard input to standard output.
+.LP
+File name handling is
+naive in the sense that there is no mechanism for preserving original
+file names, permissions, ownerships or dates in operating systems or
+filesystems which lack these concepts, or have serious file name length
+restrictions, such as MS-DOS or GS/OS.
+.LP
+.I bunzip2
+will correctly decompress a file which is the
+concatenation of two or more compressed files. The result is the
+concatenation of the corresponding uncompressed files. Integrity
+testing (\-t)
+of concatenated
+compressed files is also supported.
+.LP
+You can also decompress files to the standard output by
+giving the \-c flag. Multiple files may be
+decompressed like this. The resulting outputs are fed sequentially to stdout.
+.LP
+.I bzcat
+(or
+.I bunzip2
+.I \-c)
+decompresses all specified files to
+the standard output.
+.LP
+.I bunzip2
+will read arguments from the environment variables
+.I BZIP2
+and
+.I BZIP,
+in that order, and will process them
+before any arguments read from the command line. This gives a
+convenient way to supply default arguments.
+.LP
+As a self-check for your protection,
+.I bzip2
+and
+.I bunzip2
+use 32-bit CRCs to
+make sure that the decompressed version of a file is identical to the
+original. This guards against corruption of the compressed data, and
+against undetected bugs in
+.I bzip2
+and
+.I bunzip2
+(hopefully very unlikely). The
+chances of data corruption going undetected are microscopic, about one
+chance in four billion for each file processed. Be aware, though, that
+the check occurs upon decompression, so it can only tell you that
+something is wrong. It can't help you
+recover the original uncompressed
+data. You can use
+.I bzip2recover
+to try to recover data from
+damaged files.
+.LP
+This manual page pertains to version 1.0.2gs1 of
+.I bunzip2.
+It is fully campatible with compressed data created with all of the previous
+public releases of bzip2, versions
+0.1pl2, 0.9.0, 0.9.5, 1.0.0 and 1.0.1, as well as version 1.0.2.
+.LP
+Return values: 0 for a normal exit, 1 for environmental problems (file
+not found, invalid flags, I/O errors, &c), 2 to indicate a corrupt
+compressed file, 3 for an internal consistency error (eg, bug) which
+caused
+.I bunzip2
+to panic.
+.LP
+.SH OPTIONS
+.IP "\fB\-c\fP \fB\--stdout\fP"
+Decompress to standard output.
+
+.IP "\fB\-d\fP \fB\--decompress\fP"
+Force decompression. This flag is unnecessary on bunzip2 for GNO,
+since it always decompresses.
+
+.IP "\fB\-t\fP \fB\--test\fP"
+Check integrity of the specified file(s), but don't decompress them.
+This really performs a trial decompression and throws away the result.
+
+.IP "\fB\-f\fP \fB\--force\fP"
+Force overwrite of output files. Normally,
+.I bunzip2
+will not overwrite
+existing output files.
+.sp
+.I bunzip2
+normally declines to decompress files which don't have the
+correct magic header bytes. If forced (-f), however, it will pass
+such files through unmodified. This is how GNU gzip behaves.
+
+.IP "\fB\-k\fP \fB\--keep\fP"
+Keep (don't delete) input files during decompression.
+
+.IP "\fB\-s\fP \fB\--small\fP"
+Reduce memory usage, for decompression and testing. Files
+are decompressed and tested using a modified algorithm which only
+requires 2.5 bytes per block byte. This means any file can be
+decompressed in 2300k of memory, albeit at about half the normal speed.
+.sp
+In short, if your machine is low on memory (5 megabytes or
+less), you will probably need to use \-s. See MEMORY MANAGEMENT below.
+
+.IP "\fB\-q\fP \fB\--quiet\fP"
+Suppress non-essential warning messages. Messages pertaining to
+I/O errors and other critical events will not be suppressed.
+
+.IP "\fB\-v\fP \fB\--verbose\fP"
+Verbose mode -- show the compression ratio for each file processed.
+Further \-v's increase the verbosity level, spewing out lots of
+information which is primarily of interest for diagnostic purposes.
+
+.IP "\fB\-L\fP \fB\--license\fP \fB\-V\fP \fB\--version\fP"
+Display the software version, license terms and conditions.
+
+.IP "\fB\--\fP"
+Treats all subsequent arguments as file names, even if they start
+with a dash. This is so you can handle files with names beginning
+with a dash, for example: bunzip2 \-- \-myfilename.
+.LP
+.SH MEMORY MANAGEMENT
+.I bzip2
+compresses large files in blocks. The block size affects
+both the compression ratio achieved, and the amount of memory needed for
+compression and decompression. The block size can be specified
+to be 100,000 bytes through 900,000 bytes (the
+default). At decompression time, the block size used for
+compression is read from the header of the compressed file, and
+.I bunzip2
+then allocates itself just enough memory to decompress
+the file.
+.LP
+Decompression requirements, in bytes, can be estimated as:
+.LP
+.nf
+ 100k + ( 4 x block size ), or
+ 100k + ( 2.5 x block size ) if using \-s
+.fi
+.LP
+For files compressed with the default 900k block size,
+.I bunzip2
+will require about 3700 kbytes to decompress. To support decompression
+of any file on a 4 megabyte machine,
+.I bunzip2
+has an option to
+decompress using approximately half this amount of memory, about 2300
+kbytes. Decompression speed is also halved, so you should use this
+option only where necessary. The relevant flag is -s.
+.LP
+Decompression speeds are virtually unaffected by block size.
+.LP
+Another significant point applies to files which fit in a single block
+-- that means most files you'd encounter using a large block size. The
+amount of real memory touched is proportional to the size of the file,
+since the file is smaller than a block. For example, compressing a file
+20,000 bytes long with a 900k block size will cause the decompressor to
+allocate 3700k but only touch 100k + 20000 * 4 = 180 kbytes
+when decompressing it.
+.LP
+Here is a table which summarises the maximum memory usage for different
+block sizes. Also recorded is the total compressed size for 14 files of
+the Calgary Text Compression Corpus totalling 3,141,622 bytes. This
+column gives some feel for how compression varies with block size.
+These figures tend to understate the advantage of larger block sizes for
+larger files, since the Corpus is dominated by smaller files.
+.LP
+.nf
+ Block Decompress Decompress Corpus
+ Size usage -s usage Size
+.fi
+.LP
+.nf
+ 100k 500k 350k 914704
+ 200k 900k 600k 877703
+ 300k 1300k 850k 860338
+ 400k 1700k 1100k 846899
+ 500k 2100k 1350k 845160
+ 600k 2500k 1600k 838626
+ 700k 2900k 1850k 834096
+ 800k 3300k 2100k 828642
+ 900k 3700k 2350k 828642
+.fi
+.LP
+.SH RECOVERING DATA FROM DAMAGED FILES
+.I bzip2
+compresses files in blocks, usually 900kbytes long. Each
+block is handled independently. If a media or transmission error causes
+a multi-block .bz2
+file to become damaged, it may be possible to
+recover data from the undamaged blocks in the file.
+.LP
+The compressed representation of each block is delimited by a 48-bit
+pattern, which makes it possible to find the block boundaries with
+reasonable certainty. Each block also carries its own 32-bit CRC, so
+damaged blocks can be distinguished from undamaged ones.
+.LP
+.I bzip2recover
+is a simple program whose purpose is to search for blocks in .bz2 files,
+and write each block out into its own .bz2 file. You can then use
+.I bunzip2
+\-t
+to test the
+integrity of the resulting files, and decompress those which are
+undamaged.
+.LP
+.I bzip2recover
+takes a single argument, the name of the damaged file,
+and writes a number of files named "rec0001file.bz2",
+"rec0002file.bz2", etc, containing the extracted blocks.
+The output filenames are designed so that the use of
+wildcards in subsequent processing -- for example,
+"bunzip2 -c rec*file.bz2 > recovered_data" -- processes the files in
+the correct order.
+.LP
+.I bzip2recover
+should be of most use dealing with large .bz2
+files, as these will contain many blocks. It is clearly
+futile to use it on damaged single-block files, since a
+damaged block cannot be recovered. If you wish to minimise
+any potential data loss through media or transmission errors,
+you might consider compressing with a smaller
+block size.
+.LP
+.SH PERFORMANCE NOTES
+.I bunzip2
+usually allocates several megabytes of memory to operate
+in, and then charges all over it in a fairly random fashion. This means
+that performance is largely determined by the speed at which your machine can
+access main memory or (if you have a caching accelerator) serve cache misses.
+Because of this, small changes to the code to reduce the miss rate have
+been observed to give disproportionately large performance improvements.
+I imagine that
+.I bunzip2
+will perform best on machines with very large caches.
+.LP
+.SH CAVEATS
+I/O error messages are not as helpful as they could be.
+.I bunzip2
+tries hard to detect I/O errors and exit cleanly, but the details of
+what the problem is sometimes seem rather misleading.
+.LP
+.I bzip2recover
+for GNO uses 32-bit integers to represent bit positions in compressed files,
+so it cannot handle compressed files more than 512 megabytes long.
+.LP
+
+.SH AUTHOR
+Julian Seward, jseward@acm.org.
+.LP
+http://sources.redhat.com/bzip2
+.LP
+The ideas embodied in
+.I bzip2
+are due to (at least) the following
+people: Michael Burrows and David Wheeler (for the block sorting
+transformation), David Wheeler (again, for the Huffman coder), Peter
+Fenwick (for the structured coding model in the original
+.I bzip,
+and many refinements), and Alistair Moffat, Radford Neal and Ian Witten
+(for the arithmetic coder in the original
+.I bzip).
+I am much
+indebted for their help, support and advice. See the manual in the
+source distribution for pointers to sources of documentation. Christian
+von Roques encouraged me to look for faster sorting algorithms, so as to
+speed up compression. Bela Lubkin encouraged me to improve the
+worst-case compression performance. Many people sent patches, helped
+with portability problems, lent machines, gave advice and were generally
+helpful.
+.LP
+This version of
+.I bunzip2
+for GNO has been ported by Stephen Heumann from
+Julian Seward's
+.I bzip2
+version 1.0.2 for other platforms.
+.LP
+This program contains material from the ORCA/C Run-Time Libraries,
+copyright 1987-1996 by Byte Works, Inc. Used with permission.
+.LP
+It also incorporates a public domain stristr routine by Fred Cole,
+Bob Stout, and Greg Thayer, which was obtained from http://www.snippets.org .
diff --git a/bunzip2.desc b/bunzip2.desc
new file mode 100644
index 0000000..cfd7d3f
--- /dev/null
+++ b/bunzip2.desc
@@ -0,0 +1,13 @@
+Name: bunzip2
+Version: 1.0.2
+Shell: GNO/ME
+Author: Stephen Heumann (GNO port of original code by Julian Seward)
+Contact: sheumann@myrealbox.com
+Where: /usr/local/bin
+FTP: ftp.gno.org
+
+ Decompression program for files compressed in the bzip2 format. Based
+on Julian Seward's bzip2 program, but only supports file decompression and
+testing, not compression. Can also be used as bzcat, writing decompressed
+data to stdout. Also includes bzip2recover program for restoring data
+from partially corrupted bzip2 archives.
diff --git a/bunzip2.rez b/bunzip2.rez
new file mode 100644
index 0000000..51753cf
--- /dev/null
+++ b/bunzip2.rez
@@ -0,0 +1,15 @@
+#include "/lang/orca/libraries/rinclude/Types.Rez"
+
+resource rVersion (0x1, purgeable3, nocrossbank) {
+
+ { 1, 0, 2, /* version 1.0.2 */
+ release, /* development|alpha|beta|final|release */
+ 0 /* non-final release number */
+ },
+ verUS, /* country code -- only some are avail */
+ "bunzip2", /* name */
+ /* _Very_ brief descrition. Check "file info" */
+ /* shown in the Finder to see if it's too long */
+ /* Note that \n is used to separate lines here. */
+ "Bzip2 archive decompression program\n"
+};
diff --git a/bzcat.1 b/bzcat.1
new file mode 100644
index 0000000..9f972a0
--- /dev/null
+++ b/bzcat.1
@@ -0,0 +1 @@
+.so man1/bunzip2.1
diff --git a/bzdiff b/bzdiff
deleted file mode 100644
index 3c2eb85..0000000
--- a/bzdiff
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/sh
-# sh is buggy on RS/6000 AIX 3.2. Replace above line with #!/bin/ksh
-
-# Bzcmp/diff wrapped for bzip2,
-# adapted from zdiff by Philippe Troin for Debian GNU/Linux.
-
-# Bzcmp and bzdiff are used to invoke the cmp or the diff pro-
-# gram on compressed files. All options specified are passed
-# directly to cmp or diff. If only 1 file is specified, then
-# the files compared are file1 and an uncompressed file1.gz.
-# If two files are specified, then they are uncompressed (if
-# necessary) and fed to cmp or diff. The exit status from cmp
-# or diff is preserved.
-
-PATH="/usr/bin:$PATH"; export PATH
-prog=`echo $0 | sed 's|.*/||'`
-case "$prog" in
- *cmp) comp=${CMP-cmp} ;;
- *) comp=${DIFF-diff} ;;
-esac
-
-OPTIONS=
-FILES=
-for ARG
-do
- case "$ARG" in
- -*) OPTIONS="$OPTIONS $ARG";;
- *) if test -f "$ARG"; then
- FILES="$FILES $ARG"
- else
- echo "${prog}: $ARG not found or not a regular file"
- exit 1
- fi ;;
- esac
-done
-if test -z "$FILES"; then
- echo "Usage: $prog [${comp}_options] file [file]"
- exit 1
-fi
-tmp=`tempfile -d /tmp -p bz` || {
- echo 'cannot create a temporary file' >&2
- exit 1
-}
-set $FILES
-if test $# -eq 1; then
- FILE=`echo "$1" | sed 's/.bz2$//'`
- bzip2 -cd "$FILE.bz2" | $comp $OPTIONS - "$FILE"
- STAT="$?"
-
-elif test $# -eq 2; then
- case "$1" in
- *.bz2)
- case "$2" in
- *.bz2)
- F=`echo "$2" | sed 's|.*/||;s|.bz2$||'`
- bzip2 -cdfq "$2" > $tmp
- bzip2 -cdfq "$1" | $comp $OPTIONS - $tmp
- STAT="$?"
- /bin/rm -f $tmp;;
-
- *) bzip2 -cdfq "$1" | $comp $OPTIONS - "$2"
- STAT="$?";;
- esac;;
- *) case "$2" in
- *.bz2)
- bzip2 -cdfq "$2" | $comp $OPTIONS "$1" -
- STAT="$?";;
- *) $comp $OPTIONS "$1" "$2"
- STAT="$?";;
- esac;;
- esac
- exit "$STAT"
-else
- echo "Usage: $prog [${comp}_options] file [file]"
- exit 1
-fi
diff --git a/bzdiff.1 b/bzdiff.1
deleted file mode 100644
index adb7a8e..0000000
--- a/bzdiff.1
+++ /dev/null
@@ -1,47 +0,0 @@
-\"Shamelessly copied from zmore.1 by Philippe Troin
-\"for Debian GNU/Linux
-.TH BZDIFF 1
-.SH NAME
-bzcmp, bzdiff \- compare bzip2 compressed files
-.SH SYNOPSIS
-.B bzcmp
-[ cmp_options ] file1
-[ file2 ]
-.br
-.B bzdiff
-[ diff_options ] file1
-[ file2 ]
-.SH DESCRIPTION
-.I Bzcmp
-and
-.I bzdiff
-are used to invoke the
-.I cmp
-or the
-.I diff
-program on bzip2 compressed files. All options specified are passed
-directly to
-.I cmp
-or
-.IR diff "."
-If only 1 file is specified, then the files compared are
-.I file1
-and an uncompressed
-.IR file1 ".bz2."
-If two files are specified, then they are uncompressed if necessary and fed to
-.I cmp
-or
-.IR diff "."
-The exit status from
-.I cmp
-or
-.I diff
-is preserved.
-.SH "SEE ALSO"
-cmp(1), diff(1), bzmore(1), bzless(1), bzgrep(1), bzip2(1)
-.SH BUGS
-Messages from the
-.I cmp
-or
-.I diff
-programs refer to temporary filenames instead of those specified.
diff --git a/bzgrep b/bzgrep
deleted file mode 100644
index dbfc00e..0000000
--- a/bzgrep
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/bin/sh
-
-# Bzgrep wrapped for bzip2,
-# adapted from zgrep by Philippe Troin for Debian GNU/Linux.
-## zgrep notice:
-## zgrep -- a wrapper around a grep program that decompresses files as needed
-## Adapted from a version sent by Charles Levert
-
-PATH="/usr/bin:$PATH"; export PATH
-
-prog=`echo $0 | sed 's|.*/||'`
-case "$prog" in
- *egrep) grep=${EGREP-egrep} ;;
- *fgrep) grep=${FGREP-fgrep} ;;
- *) grep=${GREP-grep} ;;
-esac
-pat=""
-while test $# -ne 0; do
- case "$1" in
- -e | -f) opt="$opt $1"; shift; pat="$1"
- if test "$grep" = grep; then # grep is buggy with -e on SVR4
- grep=egrep
- fi;;
- -A | -B) opt="$opt $1 $2"; shift;;
- -*) opt="$opt $1";;
- *) if test -z "$pat"; then
- pat="$1"
- else
- break;
- fi;;
- esac
- shift
-done
-
-if test -z "$pat"; then
- echo "grep through bzip2 files"
- echo "usage: $prog [grep_options] pattern [files]"
- exit 1
-fi
-
-list=0
-silent=0
-op=`echo "$opt" | sed -e 's/ //g' -e 's/-//g'`
-case "$op" in
- *l*) list=1
-esac
-case "$op" in
- *h*) silent=1
-esac
-
-if test $# -eq 0; then
- bzip2 -cdfq | $grep $opt "$pat"
- exit $?
-fi
-
-res=0
-for i do
- if test -f "$i"; then :; else if test -f "$i.bz2"; then i="$i.bz2"; fi; fi
- if test $list -eq 1; then
- bzip2 -cdfq "$i" | $grep $opt "$pat" 2>&1 > /dev/null && echo $i
- r=$?
- elif test $# -eq 1 -o $silent -eq 1; then
- bzip2 -cdfq "$i" | $grep $opt "$pat"
- r=$?
- else
- bzip2 -cdfq "$i" | $grep $opt "$pat" | sed "s|^|${i}:|"
- r=$?
- fi
- test "$r" -ne 0 && res="$r"
-done
-exit $res
diff --git a/bzgrep.1 b/bzgrep.1
deleted file mode 100644
index 930af8c..0000000
--- a/bzgrep.1
+++ /dev/null
@@ -1,56 +0,0 @@
-\"Shamelessly copied from zmore.1 by Philippe Troin
-\"for Debian GNU/Linux
-.TH BZGREP 1
-.SH NAME
-bzgrep, bzfgrep, bzegrep \- search possibly bzip2 compressed files for a regular expression
-.SH SYNOPSIS
-.B bzgrep
-[ grep_options ]
-.BI [\ -e\ ] " pattern"
-.IR filename ".\|.\|."
-.br
-.B bzegrep
-[ egrep_options ]
-.BI [\ -e\ ] " pattern"
-.IR filename ".\|.\|."
-.br
-.B bzfgrep
-[ fgrep_options ]
-.BI [\ -e\ ] " pattern"
-.IR filename ".\|.\|."
-.SH DESCRIPTION
-.IR Bzgrep
-is used to invoke the
-.I grep
-on bzip2-compressed files. All options specified are passed directly to
-.I grep.
-If no file is specified, then the standard input is decompressed
-if necessary and fed to grep.
-Otherwise the given files are uncompressed if necessary and fed to
-.I grep.
-.PP
-If
-.I bzgrep
-is invoked as
-.I bzegrep
-or
-.I bzfgrep
-then
-.I egrep
-or
-.I fgrep
-is used instead of
-.I grep.
-If the GREP environment variable is set,
-.I bzgrep
-uses it as the
-.I grep
-program to be invoked. For example:
-
- for sh: GREP=fgrep bzgrep string files
- for csh: (setenv GREP fgrep; bzgrep string files)
-.SH AUTHOR
-Charles Levert (charles@comm.polymtl.ca). Adapted to bzip2 by Philippe
-Troin for Debian GNU/Linux.
-.SH "SEE ALSO"
-grep(1), egrep(1), fgrep(1), bzdiff(1), bzmore(1), bzless(1), bzip2(1)
diff --git a/bzip2.1 b/bzip2.1
deleted file mode 100644
index 623435c..0000000
--- a/bzip2.1
+++ /dev/null
@@ -1,453 +0,0 @@
-.PU
-.TH bzip2 1
-.SH NAME
-bzip2, bunzip2 \- a block-sorting file compressor, v1.0.2
-.br
-bzcat \- decompresses files to stdout
-.br
-bzip2recover \- recovers data from damaged bzip2 files
-
-.SH SYNOPSIS
-.ll +8
-.B bzip2
-.RB [ " \-cdfkqstvzVL123456789 " ]
-[
-.I "filenames \&..."
-]
-.ll -8
-.br
-.B bunzip2
-.RB [ " \-fkvsVL " ]
-[
-.I "filenames \&..."
-]
-.br
-.B bzcat
-.RB [ " \-s " ]
-[
-.I "filenames \&..."
-]
-.br
-.B bzip2recover
-.I "filename"
-
-.SH DESCRIPTION
-.I bzip2
-compresses files using the Burrows-Wheeler block sorting
-text compression algorithm, and Huffman coding. Compression is
-generally considerably better than that achieved by more conventional
-LZ77/LZ78-based compressors, and approaches the performance of the PPM
-family of statistical compressors.
-
-The command-line options are deliberately very similar to
-those of
-.I GNU gzip,
-but they are not identical.
-
-.I bzip2
-expects a list of file names to accompany the
-command-line flags. Each file is replaced by a compressed version of
-itself, with the name "original_name.bz2".
-Each compressed file
-has the same modification date, permissions, and, when possible,
-ownership as the corresponding original, so that these properties can
-be correctly restored at decompression time. File name handling is
-naive in the sense that there is no mechanism for preserving original
-file names, permissions, ownerships or dates in filesystems which lack
-these concepts, or have serious file name length restrictions, such as
-MS-DOS.
-
-.I bzip2
-and
-.I bunzip2
-will by default not overwrite existing
-files. If you want this to happen, specify the \-f flag.
-
-If no file names are specified,
-.I bzip2
-compresses from standard
-input to standard output. In this case,
-.I bzip2
-will decline to
-write compressed output to a terminal, as this would be entirely
-incomprehensible and therefore pointless.
-
-.I bunzip2
-(or
-.I bzip2 \-d)
-decompresses all
-specified files. Files which were not created by
-.I bzip2
-will be detected and ignored, and a warning issued.
-.I bzip2
-attempts to guess the filename for the decompressed file
-from that of the compressed file as follows:
-
- filename.bz2 becomes filename
- filename.bz becomes filename
- filename.tbz2 becomes filename.tar
- filename.tbz becomes filename.tar
- anyothername becomes anyothername.out
-
-If the file does not end in one of the recognised endings,
-.I .bz2,
-.I .bz,
-.I .tbz2
-or
-.I .tbz,
-.I bzip2
-complains that it cannot
-guess the name of the original file, and uses the original name
-with
-.I .out
-appended.
-
-As with compression, supplying no
-filenames causes decompression from
-standard input to standard output.
-
-.I bunzip2
-will correctly decompress a file which is the
-concatenation of two or more compressed files. The result is the
-concatenation of the corresponding uncompressed files. Integrity
-testing (\-t)
-of concatenated
-compressed files is also supported.
-
-You can also compress or decompress files to the standard output by
-giving the \-c flag. Multiple files may be compressed and
-decompressed like this. The resulting outputs are fed sequentially to
-stdout. Compression of multiple files
-in this manner generates a stream
-containing multiple compressed file representations. Such a stream
-can be decompressed correctly only by
-.I bzip2
-version 0.9.0 or
-later. Earlier versions of
-.I bzip2
-will stop after decompressing
-the first file in the stream.
-
-.I bzcat
-(or
-.I bzip2 -dc)
-decompresses all specified files to
-the standard output.
-
-.I bzip2
-will read arguments from the environment variables
-.I BZIP2
-and
-.I BZIP,
-in that order, and will process them
-before any arguments read from the command line. This gives a
-convenient way to supply default arguments.
-
-Compression is always performed, even if the compressed
-file is slightly
-larger than the original. Files of less than about one hundred bytes
-tend to get larger, since the compression mechanism has a constant
-overhead in the region of 50 bytes. Random data (including the output
-of most file compressors) is coded at about 8.05 bits per byte, giving
-an expansion of around 0.5%.
-
-As a self-check for your protection,
-.I
-bzip2
-uses 32-bit CRCs to
-make sure that the decompressed version of a file is identical to the
-original. This guards against corruption of the compressed data, and
-against undetected bugs in
-.I bzip2
-(hopefully very unlikely). The
-chances of data corruption going undetected is microscopic, about one
-chance in four billion for each file processed. Be aware, though, that
-the check occurs upon decompression, so it can only tell you that
-something is wrong. It can't help you
-recover the original uncompressed
-data. You can use
-.I bzip2recover
-to try to recover data from
-damaged files.
-
-Return values: 0 for a normal exit, 1 for environmental problems (file
-not found, invalid flags, I/O errors, &c), 2 to indicate a corrupt
-compressed file, 3 for an internal consistency error (eg, bug) which
-caused
-.I bzip2
-to panic.
-
-.SH OPTIONS
-.TP
-.B \-c --stdout
-Compress or decompress to standard output.
-.TP
-.B \-d --decompress
-Force decompression.
-.I bzip2,
-.I bunzip2
-and
-.I bzcat
-are
-really the same program, and the decision about what actions to take is
-done on the basis of which name is used. This flag overrides that
-mechanism, and forces
-.I bzip2
-to decompress.
-.TP
-.B \-z --compress
-The complement to \-d: forces compression, regardless of the
-invocation name.
-.TP
-.B \-t --test
-Check integrity of the specified file(s), but don't decompress them.
-This really performs a trial decompression and throws away the result.
-.TP
-.B \-f --force
-Force overwrite of output files. Normally,
-.I bzip2
-will not overwrite
-existing output files. Also forces
-.I bzip2
-to break hard links
-to files, which it otherwise wouldn't do.
-
-bzip2 normally declines to decompress files which don't have the
-correct magic header bytes. If forced (-f), however, it will pass
-such files through unmodified. This is how GNU gzip behaves.
-.TP
-.B \-k --keep
-Keep (don't delete) input files during compression
-or decompression.
-.TP
-.B \-s --small
-Reduce memory usage, for compression, decompression and testing. Files
-are decompressed and tested using a modified algorithm which only
-requires 2.5 bytes per block byte. This means any file can be
-decompressed in 2300k of memory, albeit at about half the normal speed.
-
-During compression, \-s selects a block size of 200k, which limits
-memory use to around the same figure, at the expense of your compression
-ratio. In short, if your machine is low on memory (8 megabytes or
-less), use \-s for everything. See MEMORY MANAGEMENT below.
-.TP
-.B \-q --quiet
-Suppress non-essential warning messages. Messages pertaining to
-I/O errors and other critical events will not be suppressed.
-.TP
-.B \-v --verbose
-Verbose mode -- show the compression ratio for each file processed.
-Further \-v's increase the verbosity level, spewing out lots of
-information which is primarily of interest for diagnostic purposes.
-.TP
-.B \-L --license -V --version
-Display the software version, license terms and conditions.
-.TP
-.B \-1 (or \-\-fast) to \-9 (or \-\-best)
-Set the block size to 100 k, 200 k .. 900 k when compressing. Has no
-effect when decompressing. See MEMORY MANAGEMENT below.
-The \-\-fast and \-\-best aliases are primarily for GNU gzip
-compatibility. In particular, \-\-fast doesn't make things
-significantly faster.
-And \-\-best merely selects the default behaviour.
-.TP
-.B \--
-Treats all subsequent arguments as file names, even if they start
-with a dash. This is so you can handle files with names beginning
-with a dash, for example: bzip2 \-- \-myfilename.
-.TP
-.B \--repetitive-fast --repetitive-best
-These flags are redundant in versions 0.9.5 and above. They provided
-some coarse control over the behaviour of the sorting algorithm in
-earlier versions, which was sometimes useful. 0.9.5 and above have an
-improved algorithm which renders these flags irrelevant.
-
-.SH MEMORY MANAGEMENT
-.I bzip2
-compresses large files in blocks. The block size affects
-both the compression ratio achieved, and the amount of memory needed for
-compression and decompression. The flags \-1 through \-9
-specify the block size to be 100,000 bytes through 900,000 bytes (the
-default) respectively. At decompression time, the block size used for
-compression is read from the header of the compressed file, and
-.I bunzip2
-then allocates itself just enough memory to decompress
-the file. Since block sizes are stored in compressed files, it follows
-that the flags \-1 to \-9 are irrelevant to and so ignored
-during decompression.
-
-Compression and decompression requirements,
-in bytes, can be estimated as:
-
- Compression: 400k + ( 8 x block size )
-
- Decompression: 100k + ( 4 x block size ), or
- 100k + ( 2.5 x block size )
-
-Larger block sizes give rapidly diminishing marginal returns. Most of
-the compression comes from the first two or three hundred k of block
-size, a fact worth bearing in mind when using
-.I bzip2
-on small machines.
-It is also important to appreciate that the decompression memory
-requirement is set at compression time by the choice of block size.
-
-For files compressed with the default 900k block size,
-.I bunzip2
-will require about 3700 kbytes to decompress. To support decompression
-of any file on a 4 megabyte machine,
-.I bunzip2
-has an option to
-decompress using approximately half this amount of memory, about 2300
-kbytes. Decompression speed is also halved, so you should use this
-option only where necessary. The relevant flag is -s.
-
-In general, try and use the largest block size memory constraints allow,
-since that maximises the compression achieved. Compression and
-decompression speed are virtually unaffected by block size.
-
-Another significant point applies to files which fit in a single block
--- that means most files you'd encounter using a large block size. The
-amount of real memory touched is proportional to the size of the file,
-since the file is smaller than a block. For example, compressing a file
-20,000 bytes long with the flag -9 will cause the compressor to
-allocate around 7600k of memory, but only touch 400k + 20000 * 8 = 560
-kbytes of it. Similarly, the decompressor will allocate 3700k but only
-touch 100k + 20000 * 4 = 180 kbytes.
-
-Here is a table which summarises the maximum memory usage for different
-block sizes. Also recorded is the total compressed size for 14 files of
-the Calgary Text Compression Corpus totalling 3,141,622 bytes. This
-column gives some feel for how compression varies with block size.
-These figures tend to understate the advantage of larger block sizes for
-larger files, since the Corpus is dominated by smaller files.
-
- Compress Decompress Decompress Corpus
- Flag usage usage -s usage Size
-
- -1 1200k 500k 350k 914704
- -2 2000k 900k 600k 877703
- -3 2800k 1300k 850k 860338
- -4 3600k 1700k 1100k 846899
- -5 4400k 2100k 1350k 845160
- -6 5200k 2500k 1600k 838626
- -7 6100k 2900k 1850k 834096
- -8 6800k 3300k 2100k 828642
- -9 7600k 3700k 2350k 828642
-
-.SH RECOVERING DATA FROM DAMAGED FILES
-.I bzip2
-compresses files in blocks, usually 900kbytes long. Each
-block is handled independently. If a media or transmission error causes
-a multi-block .bz2
-file to become damaged, it may be possible to
-recover data from the undamaged blocks in the file.
-
-The compressed representation of each block is delimited by a 48-bit
-pattern, which makes it possible to find the block boundaries with
-reasonable certainty. Each block also carries its own 32-bit CRC, so
-damaged blocks can be distinguished from undamaged ones.
-
-.I bzip2recover
-is a simple program whose purpose is to search for
-blocks in .bz2 files, and write each block out into its own .bz2
-file. You can then use
-.I bzip2
-\-t
-to test the
-integrity of the resulting files, and decompress those which are
-undamaged.
-
-.I bzip2recover
-takes a single argument, the name of the damaged file,
-and writes a number of files "rec00001file.bz2",
-"rec00002file.bz2", etc, containing the extracted blocks.
-The output filenames are designed so that the use of
-wildcards in subsequent processing -- for example,
-"bzip2 -dc rec*file.bz2 > recovered_data" -- processes the files in
-the correct order.
-
-.I bzip2recover
-should be of most use dealing with large .bz2
-files, as these will contain many blocks. It is clearly
-futile to use it on damaged single-block files, since a
-damaged block cannot be recovered. If you wish to minimise
-any potential data loss through media or transmission errors,
-you might consider compressing with a smaller
-block size.
-
-.SH PERFORMANCE NOTES
-The sorting phase of compression gathers together similar strings in the
-file. Because of this, files containing very long runs of repeated
-symbols, like "aabaabaabaab ..." (repeated several hundred times) may
-compress more slowly than normal. Versions 0.9.5 and above fare much
-better than previous versions in this respect. The ratio between
-worst-case and average-case compression time is in the region of 10:1.
-For previous versions, this figure was more like 100:1. You can use the
-\-vvvv option to monitor progress in great detail, if you want.
-
-Decompression speed is unaffected by these phenomena.
-
-.I bzip2
-usually allocates several megabytes of memory to operate
-in, and then charges all over it in a fairly random fashion. This means
-that performance, both for compressing and decompressing, is largely
-determined by the speed at which your machine can service cache misses.
-Because of this, small changes to the code to reduce the miss rate have
-been observed to give disproportionately large performance improvements.
-I imagine
-.I bzip2
-will perform best on machines with very large caches.
-
-.SH CAVEATS
-I/O error messages are not as helpful as they could be.
-.I bzip2
-tries hard to detect I/O errors and exit cleanly, but the details of
-what the problem is sometimes seem rather misleading.
-
-This manual page pertains to version 1.0.2 of
-.I bzip2.
-Compressed data created by this version is entirely forwards and
-backwards compatible with the previous public releases, versions
-0.1pl2, 0.9.0, 0.9.5, 1.0.0 and 1.0.1, but with the following
-exception: 0.9.0 and above can correctly decompress multiple
-concatenated compressed files. 0.1pl2 cannot do this; it will stop
-after decompressing just the first file in the stream.
-
-.I bzip2recover
-versions prior to this one, 1.0.2, used 32-bit integers to represent
-bit positions in compressed files, so it could not handle compressed
-files more than 512 megabytes long. Version 1.0.2 and above uses
-64-bit ints on some platforms which support them (GNU supported
-targets, and Windows). To establish whether or not bzip2recover was
-built with such a limitation, run it without arguments. In any event
-you can build yourself an unlimited version if you can recompile it
-with MaybeUInt64 set to be an unsigned 64-bit integer.
-
-
-
-.SH AUTHOR
-Julian Seward, jseward@acm.org.
-
-http://sources.redhat.com/bzip2
-
-The ideas embodied in
-.I bzip2
-are due to (at least) the following
-people: Michael Burrows and David Wheeler (for the block sorting
-transformation), David Wheeler (again, for the Huffman coder), Peter
-Fenwick (for the structured coding model in the original
-.I bzip,
-and many refinements), and Alistair Moffat, Radford Neal and Ian Witten
-(for the arithmetic coder in the original
-.I bzip).
-I am much
-indebted for their help, support and advice. See the manual in the
-source distribution for pointers to sources of documentation. Christian
-von Roques encouraged me to look for faster sorting algorithms, so as to
-speed up compression. Bela Lubkin encouraged me to improve the
-worst-case compression performance.
-The bz* scripts are derived from those of GNU gzip.
-Many people sent patches, helped
-with portability problems, lent machines, gave advice and were generally
-helpful.
diff --git a/bzip2.1.preformatted b/bzip2.1.preformatted
deleted file mode 100644
index 0f20cb5..0000000
--- a/bzip2.1.preformatted
+++ /dev/null
@@ -1,398 +0,0 @@
-bzip2(1) bzip2(1)
-
-
-
-NNAAMMEE
- bzip2, bunzip2 - a block-sorting file compressor, v1.0.2
- bzcat - decompresses files to stdout
- bzip2recover - recovers data from damaged bzip2 files
-
-
-SSYYNNOOPPSSIISS
- bbzziipp22 [ --ccddffkkqqssttvvzzVVLL112233445566778899 ] [ _f_i_l_e_n_a_m_e_s _._._. ]
- bbuunnzziipp22 [ --ffkkvvssVVLL ] [ _f_i_l_e_n_a_m_e_s _._._. ]
- bbzzccaatt [ --ss ] [ _f_i_l_e_n_a_m_e_s _._._. ]
- bbzziipp22rreeccoovveerr _f_i_l_e_n_a_m_e
-
-
-DDEESSCCRRIIPPTTIIOONN
- _b_z_i_p_2 compresses files using the Burrows-Wheeler block
- sorting text compression algorithm, and Huffman coding.
- Compression is generally considerably better than that
- achieved by more conventional LZ77/LZ78-based compressors,
- and approaches the performance of the PPM family of sta
- tistical compressors.
-
- The command-line options are deliberately very similar to
- those of _G_N_U _g_z_i_p_, but they are not identical.
-
- _b_z_i_p_2 expects a list of file names to accompany the com
- mand-line flags. Each file is replaced by a compressed
- version of itself, with the name "original_name.bz2".
- Each compressed file has the same modification date, per
- missions, and, when possible, ownership as the correspond
- ing original, so that these properties can be correctly
- restored at decompression time. File name handling is
- naive in the sense that there is no mechanism for preserv
- ing original file names, permissions, ownerships or dates
- in filesystems which lack these concepts, or have serious
- file name length restrictions, such as MS-DOS.
-
- _b_z_i_p_2 and _b_u_n_z_i_p_2 will by default not overwrite existing
- files. If you want this to happen, specify the -f flag.
-
- If no file names are specified, _b_z_i_p_2 compresses from
- standard input to standard output. In this case, _b_z_i_p_2
- will decline to write compressed output to a terminal, as
- this would be entirely incomprehensible and therefore
- pointless.
-
- _b_u_n_z_i_p_2 (or _b_z_i_p_2 _-_d_) decompresses all specified files.
- Files which were not created by _b_z_i_p_2 will be detected and
- ignored, and a warning issued. _b_z_i_p_2 attempts to guess
- the filename for the decompressed file from that of the
- compressed file as follows:
-
- filename.bz2 becomes filename
- filename.bz becomes filename
- filename.tbz2 becomes filename.tar
- filename.tbz becomes filename.tar
- anyothername becomes anyothername.out
-
- If the file does not end in one of the recognised endings,
- _._b_z_2_, _._b_z_, _._t_b_z_2 or _._t_b_z_, _b_z_i_p_2 complains that it cannot
- guess the name of the original file, and uses the original
- name with _._o_u_t appended.
-
- As with compression, supplying no filenames causes decom
- pression from standard input to standard output.
-
- _b_u_n_z_i_p_2 will correctly decompress a file which is the con
- catenation of two or more compressed files. The result is
- the concatenation of the corresponding uncompressed files.
- Integrity testing (-t) of concatenated compressed files is
- also supported.
-
- You can also compress or decompress files to the standard
- output by giving the -c flag. Multiple files may be com
- pressed and decompressed like this. The resulting outputs
- are fed sequentially to stdout. Compression of multiple
- files in this manner generates a stream containing multi
- ple compressed file representations. Such a stream can be
- decompressed correctly only by _b_z_i_p_2 version 0.9.0 or
- later. Earlier versions of _b_z_i_p_2 will stop after decom
- pressing the first file in the stream.
-
- _b_z_c_a_t (or _b_z_i_p_2 _-_d_c_) decompresses all specified files to
- the standard output.
-
- _b_z_i_p_2 will read arguments from the environment variables
- _B_Z_I_P_2 and _B_Z_I_P_, in that order, and will process them
- before any arguments read from the command line. This
- gives a convenient way to supply default arguments.
-
- Compression is always performed, even if the compressed
- file is slightly larger than the original. Files of less
- than about one hundred bytes tend to get larger, since the
- compression mechanism has a constant overhead in the
- region of 50 bytes. Random data (including the output of
- most file compressors) is coded at about 8.05 bits per
- byte, giving an expansion of around 0.5%.
-
- As a self-check for your protection, _b_z_i_p_2 uses 32-bit
- CRCs to make sure that the decompressed version of a file
- is identical to the original. This guards against corrup
- tion of the compressed data, and against undetected bugs
- in _b_z_i_p_2 (hopefully very unlikely). The chances of data
- corruption going undetected is microscopic, about one
- chance in four billion for each file processed. Be aware,
- though, that the check occurs upon decompression, so it
- can only tell you that something is wrong. It can't help
- you recover the original uncompressed data. You can use
- _b_z_i_p_2_r_e_c_o_v_e_r to try to recover data from damaged files.
-
- Return values: 0 for a normal exit, 1 for environmental
- problems (file not found, invalid flags, I/O errors, &c),
- 2 to indicate a corrupt compressed file, 3 for an internal
- consistency error (eg, bug) which caused _b_z_i_p_2 to panic.
-
-
-OOPPTTIIOONNSS
- --cc ----ssttddoouutt
- Compress or decompress to standard output.
-
- --dd ----ddeeccoommpprreessss
- Force decompression. _b_z_i_p_2_, _b_u_n_z_i_p_2 and _b_z_c_a_t are
- really the same program, and the decision about
- what actions to take is done on the basis of which
- name is used. This flag overrides that mechanism,
- and forces _b_z_i_p_2 to decompress.
-
- --zz ----ccoommpprreessss
- The complement to -d: forces compression,
- regardless of the invocation name.
-
- --tt ----tteesstt
- Check integrity of the specified file(s), but don't
- decompress them. This really performs a trial
- decompression and throws away the result.
-
- --ff ----ffoorrccee
- Force overwrite of output files. Normally, _b_z_i_p_2
- will not overwrite existing output files. Also
- forces _b_z_i_p_2 to break hard links to files, which it
- otherwise wouldn't do.
-
- bzip2 normally declines to decompress files which
- don't have the correct magic header bytes. If
- forced (-f), however, it will pass such files
- through unmodified. This is how GNU gzip behaves.
-
- --kk ----kkeeeepp
- Keep (don't delete) input files during compression
- or decompression.
-
- --ss ----ssmmaallll
- Reduce memory usage, for compression, decompression
- and testing. Files are decompressed and tested
- using a modified algorithm which only requires 2.5
- bytes per block byte. This means any file can be
- decompressed in 2300k of memory, albeit at about
- half the normal speed.
-
- During compression, -s selects a block size of
- 200k, which limits memory use to around the same
- figure, at the expense of your compression ratio.
- In short, if your machine is low on memory (8
- megabytes or less), use -s for everything. See
- MEMORY MANAGEMENT below.
-
- --qq ----qquuiieett
- Suppress non-essential warning messages. Messages
- pertaining to I/O errors and other critical events
- will not be suppressed.
-
- --vv ----vveerrbboossee
- Verbose mode -- show the compression ratio for each
- file processed. Further -v's increase the ver
- bosity level, spewing out lots of information which
- is primarily of interest for diagnostic purposes.
-
- --LL ----lliicceennssee --VV ----vveerrssiioonn
- Display the software version, license terms and
- conditions.
-
- --11 ((oorr ----ffaasstt)) ttoo --99 ((oorr ----bbeesstt))
- Set the block size to 100 k, 200 k .. 900 k when
- compressing. Has no effect when decompressing.
- See MEMORY MANAGEMENT below. The --fast and --best
- aliases are primarily for GNU gzip compatibility.
- In particular, --fast doesn't make things signifi
- cantly faster. And --best merely selects the
- default behaviour.
-
- ---- Treats all subsequent arguments as file names, even
- if they start with a dash. This is so you can han
- dle files with names beginning with a dash, for
- example: bzip2 -- -myfilename.
-
- ----rreeppeettiittiivvee--ffaasstt ----rreeppeettiittiivvee--bbeesstt
- These flags are redundant in versions 0.9.5 and
- above. They provided some coarse control over the
- behaviour of the sorting algorithm in earlier ver
- sions, which was sometimes useful. 0.9.5 and above
- have an improved algorithm which renders these
- flags irrelevant.
-
-
-MMEEMMOORRYY MMAANNAAGGEEMMEENNTT
- _b_z_i_p_2 compresses large files in blocks. The block size
- affects both the compression ratio achieved, and the
- amount of memory needed for compression and decompression.
- The flags -1 through -9 specify the block size to be
- 100,000 bytes through 900,000 bytes (the default) respec
- tively. At decompression time, the block size used for
- compression is read from the header of the compressed
- file, and _b_u_n_z_i_p_2 then allocates itself just enough memory
- to decompress the file. Since block sizes are stored in
- compressed files, it follows that the flags -1 to -9 are
- irrelevant to and so ignored during decompression.
-
- Compression and decompression requirements, in bytes, can
- be estimated as:
-
- Compression: 400k + ( 8 x block size )
-
- Decompression: 100k + ( 4 x block size ), or
- 100k + ( 2.5 x block size )
-
- Larger block sizes give rapidly diminishing marginal
- returns. Most of the compression comes from the first two
- or three hundred k of block size, a fact worth bearing in
- mind when using _b_z_i_p_2 on small machines. It is also
- important to appreciate that the decompression memory
- requirement is set at compression time by the choice of
- block size.
-
- For files compressed with the default 900k block size,
- _b_u_n_z_i_p_2 will require about 3700 kbytes to decompress. To
- support decompression of any file on a 4 megabyte machine,
- _b_u_n_z_i_p_2 has an option to decompress using approximately
- half this amount of memory, about 2300 kbytes. Decompres
- sion speed is also halved, so you should use this option
- only where necessary. The relevant flag is -s.
-
- In general, try and use the largest block size memory con
- straints allow, since that maximises the compression
- achieved. Compression and decompression speed are virtu
- ally unaffected by block size.
-
- Another significant point applies to files which fit in a
- single block -- that means most files you'd encounter
- using a large block size. The amount of real memory
- touched is proportional to the size of the file, since the
- file is smaller than a block. For example, compressing a
- file 20,000 bytes long with the flag -9 will cause the
- compressor to allocate around 7600k of memory, but only
- touch 400k + 20000 * 8 = 560 kbytes of it. Similarly, the
- decompressor will allocate 3700k but only touch 100k +
- 20000 * 4 = 180 kbytes.
-
- Here is a table which summarises the maximum memory usage
- for different block sizes. Also recorded is the total
- compressed size for 14 files of the Calgary Text Compres
- sion Corpus totalling 3,141,622 bytes. This column gives
- some feel for how compression varies with block size.
- These figures tend to understate the advantage of larger
- block sizes for larger files, since the Corpus is domi
- nated by smaller files.
-
- Compress Decompress Decompress Corpus
- Flag usage usage -s usage Size
-
- -1 1200k 500k 350k 914704
- -2 2000k 900k 600k 877703
- -3 2800k 1300k 850k 860338
- -4 3600k 1700k 1100k 846899
- -5 4400k 2100k 1350k 845160
- -6 5200k 2500k 1600k 838626
- -7 6100k 2900k 1850k 834096
- -8 6800k 3300k 2100k 828642
- -9 7600k 3700k 2350k 828642
-
-
-RREECCOOVVEERRIINNGG DDAATTAA FFRROOMM DDAAMMAAGGEEDD FFIILLEESS
- _b_z_i_p_2 compresses files in blocks, usually 900kbytes long.
- Each block is handled independently. If a media or trans
- mission error causes a multi-block .bz2 file to become
- damaged, it may be possible to recover data from the
- undamaged blocks in the file.
-
- The compressed representation of each block is delimited
- by a 48-bit pattern, which makes it possible to find the
- block boundaries with reasonable certainty. Each block
- also carries its own 32-bit CRC, so damaged blocks can be
- distinguished from undamaged ones.
-
- _b_z_i_p_2_r_e_c_o_v_e_r is a simple program whose purpose is to
- search for blocks in .bz2 files, and write each block out
- into its own .bz2 file. You can then use _b_z_i_p_2 -t to test
- the integrity of the resulting files, and decompress those
- which are undamaged.
-
- _b_z_i_p_2_r_e_c_o_v_e_r takes a single argument, the name of the dam
- aged file, and writes a number of files
- "rec00001file.bz2", "rec00002file.bz2", etc, containing
- the extracted blocks. The output filenames are
- designed so that the use of wildcards in subsequent pro
- cessing -- for example, "bzip2 -dc rec*file.bz2 > recov
- ered_data" -- processes the files in the correct order.
-
- _b_z_i_p_2_r_e_c_o_v_e_r should be of most use dealing with large .bz2
- files, as these will contain many blocks. It is clearly
- futile to use it on damaged single-block files, since a
- damaged block cannot be recovered. If you wish to min
- imise any potential data loss through media or transmis
- sion errors, you might consider compressing with a smaller
- block size.
-
-
-PPEERRFFOORRMMAANNCCEE NNOOTTEESS
- The sorting phase of compression gathers together similar
- strings in the file. Because of this, files containing
- very long runs of repeated symbols, like "aabaabaabaab
- ..." (repeated several hundred times) may compress more
- slowly than normal. Versions 0.9.5 and above fare much
- better than previous versions in this respect. The ratio
- between worst-case and average-case compression time is in
- the region of 10:1. For previous versions, this figure
- was more like 100:1. You can use the -vvvv option to mon
- itor progress in great detail, if you want.
-
- Decompression speed is unaffected by these phenomena.
-
- _b_z_i_p_2 usually allocates several megabytes of memory to
- operate in, and then charges all over it in a fairly ran
- dom fashion. This means that performance, both for com
- pressing and decompressing, is largely determined by the
- speed at which your machine can service cache misses.
- Because of this, small changes to the code to reduce the
- miss rate have been observed to give disproportionately
- large performance improvements. I imagine _b_z_i_p_2 will per
- form best on machines with very large caches.
-
-
-CCAAVVEEAATTSS
- I/O error messages are not as helpful as they could be.
- _b_z_i_p_2 tries hard to detect I/O errors and exit cleanly,
- but the details of what the problem is sometimes seem
- rather misleading.
-
- This manual page pertains to version 1.0.2 of _b_z_i_p_2_. Com
- pressed data created by this version is entirely forwards
- and backwards compatible with the previous public
- releases, versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0 and 1.0.1,
- but with the following exception: 0.9.0 and above can cor
- rectly decompress multiple concatenated compressed files.
- 0.1pl2 cannot do this; it will stop after decompressing
- just the first file in the stream.
-
- _b_z_i_p_2_r_e_c_o_v_e_r versions prior to this one, 1.0.2, used
- 32-bit integers to represent bit positions in compressed
- files, so it could not handle compressed files more than
- 512 megabytes long. Version 1.0.2 and above uses 64-bit
- ints on some platforms which support them (GNU supported
- targets, and Windows). To establish whether or not
- bzip2recover was built with such a limitation, run it
- without arguments. In any event you can build yourself an
- unlimited version if you can recompile it with MaybeUInt64
- set to be an unsigned 64-bit integer.
-
-
-
-
-AAUUTTHHOORR
- Julian Seward, jseward@acm.org.
-
- http://sources.redhat.com/bzip2
-
- 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
- block sorting transformation), David Wheeler (again, for
- the Huffman coder), Peter Fenwick (for the structured cod
- ing model in the original _b_z_i_p_, and many refinements), and
- Alistair Moffat, Radford Neal and Ian Witten (for the
- arithmetic coder in the original _b_z_i_p_)_. I am much
- indebted for their help, support and advice. See the man
- ual in the source distribution for pointers to sources of
- documentation. Christian von Roques encouraged me to look
- for faster sorting algorithms, so as to speed up compres
- sion. Bela Lubkin encouraged me to improve the worst-case
- compression performance. The bz* scripts are derived from
- those of GNU gzip. Many people sent patches, helped with
- portability problems, lent machines, gave advice and were
- generally helpful.
-
-
-
- bzip2(1)
diff --git a/bzip2.c b/bzip2.c
index 807f420..5c1c609 100644
--- a/bzip2.c
+++ b/bzip2.c
@@ -3,6 +3,11 @@
/*--- A block-sorting, lossless compressor bzip2.c ---*/
/*-----------------------------------------------------------*/
+/*-- Modified for use under GNO by Stephen Heumann --*/
+#ifdef __ORCAC__
+segment "bzip2";
+#endif
+
/*--
This file is a part of bzip2 and/or libbzip2, a program and
library for lossless, block-sorting data compression.
@@ -148,6 +153,14 @@
#include
#include "bzlib.h"
+#ifdef __appleiigs__
+#include
+char *stristr(const char *, const char *);
+#if defined(__GNO__) && defined(__STACK_CHECK__)
+#include
+#endif
+#endif
+
#define ERROR_IF_EOF(i) { if ((i) == EOF) ioError(); }
#define ERROR_IF_NOT_ZERO(i) { if ((i) != 0) ioError(); }
#define ERROR_IF_MINUS_ONE(i) { if ((i) == (-1)) ioError(); }
@@ -213,6 +226,11 @@
ERROR_IF_MINUS_ONE ( retVal ); \
} while ( 0 )
# endif
+
+# ifdef __GNO__
+# undef SET_BINARY_MODE
+# define SET_BINARY_MODE(fd) fsetbinary(fd);
+# endif
#endif /* BZ_UNIX */
@@ -220,7 +238,10 @@
#if BZ_LCCWIN32
# include
# include
-# include
+/* This was "#include ", but ORCA/C complains
+ about an invalid character, so I changed it. This
+ might possibly break compilation on Win 32 systems. */
+# include
# define NORETURN /**/
# define PATH_SEP '\\'
@@ -253,8 +274,15 @@
typedef char Char;
typedef unsigned char Bool;
typedef unsigned char UChar;
+#ifdef __ORCAC__
+typedef long Int32;
+typedef unsigned long UInt32;
+# define Int32_FMT "%ld"
+#else
typedef int Int32;
typedef unsigned int UInt32;
+# define Int32_FMT "%d"
+#endif /* defined __ORCAC__ */
typedef short Int16;
typedef unsigned short UInt16;
@@ -386,7 +414,11 @@ static
void uInt64_toAscii ( char* outbuf, UInt64* n )
{
Int32 i, q;
+#ifdef __ORCAC__
+ static UChar buf[32];
+#else
UChar buf[32];
+#endif
Int32 nBuf = 0;
UInt64 n_copy = *n;
do {
@@ -416,15 +448,24 @@ Bool myfeof ( FILE* f )
/*---------------------------------------------*/
+#ifndef __ORCAC__
static
void compressStream ( FILE *stream, FILE *zStream )
{
BZFILE* bzf = NULL;
+#ifdef __ORCAC__
+ static UChar ibuf[5000];
+#else
UChar ibuf[5000];
+#endif
Int32 nIbuf;
UInt32 nbytes_in_lo32, nbytes_in_hi32;
UInt32 nbytes_out_lo32, nbytes_out_hi32;
+#ifdef __ORCAC__
+ Int16 bzerr, bzerr_dummy, ret;
+#else
Int32 bzerr, bzerr_dummy, ret;
+#endif
SET_BINARY_MODE(stream);
SET_BINARY_MODE(zStream);
@@ -513,6 +554,7 @@ void compressStream ( FILE *stream, FILE *zStream )
panic ( "compress:end" );
/*notreached*/
}
+#endif
@@ -521,10 +563,18 @@ static
Bool uncompressStream ( FILE *zStream, FILE *stream )
{
BZFILE* bzf = NULL;
+#ifdef __ORCAC__
+ Int16 bzerr, bzerr_dummy;
+ Int32 ret, nread, streamNo, i;
+ static UChar obuf[5000];
+ static UChar unused[BZ_MAX_UNUSED];
+ Int16 nUnused;
+#else
Int32 bzerr, bzerr_dummy, ret, nread, streamNo, i;
UChar obuf[5000];
UChar unused[BZ_MAX_UNUSED];
Int32 nUnused;
+#endif
UChar* unusedTmp;
nUnused = 0;
@@ -635,10 +685,18 @@ static
Bool testStream ( FILE *zStream )
{
BZFILE* bzf = NULL;
+#ifdef __ORCAC__
+ Int16 bzerr, bzerr_dummy, ret;
+ Int32 nread, streamNo, i;
+ static UChar obuf[5000];
+ static UChar unused[BZ_MAX_UNUSED];
+ Int16 nUnused;
+#else
Int32 bzerr, bzerr_dummy, ret, nread, streamNo, i;
UChar obuf[5000];
UChar unused[BZ_MAX_UNUSED];
Int32 nUnused;
+#endif
UChar* unusedTmp;
nUnused = 0;
@@ -802,7 +860,11 @@ void cleanUpAndFail ( Int32 ec )
"%s: `%s' may be incomplete.\n",
progName, outName );
fprintf ( stderr,
+#ifndef __GNO__
"%s: I suggest doing an integrity test (bzip2 -tv)"
+#else
+ "%s: I suggest doing an integrity test (bunzip2 -tv)"
+#endif
" of it.\n",
progName );
}
@@ -811,7 +873,7 @@ void cleanUpAndFail ( Int32 ec )
if (noisy && numFileNames > 0 && numFilesProcessed < numFileNames) {
fprintf ( stderr,
"%s: WARNING: some files have not been processed:\n"
- "%s: %d specified on command line, %d not processed yet.\n\n",
+ "%s: " Int32_FMT " specified on command line, " Int32_FMT " not processed yet.\n\n",
progName, progName,
numFileNames, numFileNames - numFilesProcessed );
}
@@ -827,8 +889,16 @@ void panic ( Char* s )
fprintf ( stderr,
"\n%s: PANIC -- internal consistency error:\n"
"\t%s\n"
+#ifndef __GNO__
"\tThis is a BUG. Please report it to me at:\n"
"\tjseward@acm.org\n",
+#else
+ "\tThis is a BUG. If you are experiencing it only in\n"
+ "the GNO version of bunzip2, please report it to me at\n"
+ "sheumann@myrealbox.com . If you can duplicate it in\n"
+ "other versions of bzip2 as well, please report it to\n"
+ "the original author Julian Seward at tjseward@acm.org\n",
+#endif
progName, s );
showFileNames();
cleanUpAndFail( 3 );
@@ -880,6 +950,10 @@ void ioError ( void )
/*---------------------------------------------*/
+#ifdef __ORCAC__
+#pragma databank 1
+#endif
+
static
void mySignalCatcher ( IntNative n )
{
@@ -889,11 +963,14 @@ void mySignalCatcher ( IntNative n )
cleanUpAndFail(1);
}
-
+/* This function should never be called on a normal GNO system,
+ but it doesn't hurt to leave it in. */
/*---------------------------------------------*/
static
void mySIGSEGVorSIGBUScatcher ( IntNative n )
{
+#ifndef __ORCAC__
+/* Not needed for decompression */
if (opMode == OM_Z)
fprintf (
stderr,
@@ -915,7 +992,10 @@ void mySIGSEGVorSIGBUScatcher ( IntNative n )
" have the manual or can't be bothered to read it, mail me anyway.\n"
"\n",
progName );
- else
+ else
+#else
+ if (opMode != OM_Z)
+#endif
fprintf (
stderr,
"\n%s: Caught a SIGSEGV or SIGBUS whilst decompressing.\n"
@@ -945,6 +1025,10 @@ void mySIGSEGVorSIGBUScatcher ( IntNative n )
{ cadvise(); cleanUpAndFail( 2 ); }
}
+#ifdef __ORCAC__
+#pragma databank 0
+#endif
+
/*---------------------------------------------*/
static
@@ -1000,10 +1084,10 @@ void copyFileName ( Char* to, Char* from )
if ( strlen(from) > FILE_NAME_LEN-10 ) {
fprintf (
stderr,
- "bzip2: file name\n`%s'\n"
+ "%s: file name\n`%s'\n"
"is suspiciously (more than %d chars) long.\n"
"Try using a reasonable file name instead. Sorry! :-)\n",
- from, FILE_NAME_LEN-10
+ progName, from, FILE_NAME_LEN-10
);
setExit(1);
exit(exitValue);
@@ -1137,13 +1221,43 @@ void applySavedMetaInfoToOutputFile ( Char *dstName )
retVal = chmod ( dstName, fileMetaInfo.st_mode );
ERROR_IF_NOT_ZERO ( retVal );
+#ifndef __ORCAC__
+ /* ORCA/C's localtime(), which is called by utime(), is broken.
+ * We fix this by simply disabling time setting, as bzip2 does
+ * on non-Unix platforms anyway. A better solution would be
+ * to fix or replace utime() and/or localtime().
+ */
retVal = utime ( dstName, &uTimBuf );
ERROR_IF_NOT_ZERO ( retVal );
+#endif
+#ifdef __appleiigs__
+ /* Set filetype to BIN if running on the GS */
+ {
+ static GSString255 fileNameStringGS;
+ static FileInfoRecGS infoRec = { 4, /* pCount */
+ &fileNameStringGS, /* Ptr to file name */
+ 0x00C3, /* access restrictions (none) */
+ 0x06, /* filetype (BIN) */
+ 0x0000 /* auxtype ($0000) */
+ };
+
+ if (strlen( dstName ) <= 255) {
+ strncpy( fileNameStringGS.text, dstName, 255 );
+ fileNameStringGS.length = strlen( dstName );
+ SetFileInfo( &infoRec );
+ /* Ignore any errors produced by this call, leaving the file's
+ existing filetype intact. This parallels the approach taken
+ when setting file attributes on Unix.
+ */
+ }
+ }
+#else
retVal = chown ( dstName, fileMetaInfo.st_uid, fileMetaInfo.st_gid );
/* chown() will in many cases return with EPERM, which can
be safely ignored.
*/
+#endif /* defined __GNO__ */
# endif
}
@@ -1181,8 +1295,14 @@ Bool hasSuffix ( Char* s, Char* suffix )
{
Int32 ns = strlen(s);
Int32 nx = strlen(suffix);
- if (ns < nx) return False;
+ if (ns < nx) return False;
+#ifndef __appleiigs__
if (strcmp(s + ns - nx, suffix) == 0) return True;
+#else
+ /* Filenames are case-insensitive on the GS,
+ so use a case-insensitive compare for them */
+ if (strcasecmp(s + ns - nx, suffix) == 0) return True;
+#endif
return False;
}
@@ -1198,6 +1318,7 @@ Bool mapSuffix ( Char* name,
/*---------------------------------------------*/
+#ifndef __ORCAC__
static
void compress ( Char *name )
{
@@ -1279,7 +1400,7 @@ void compress ( Char *name )
}
if ( srcMode == SM_F2F && !forceOverwrite &&
(n=countHardLinks ( inName )) > 0) {
- fprintf ( stderr, "%s: Input file %s has %d other link%s.\n",
+ fprintf ( stderr, "%s: Input file %s has " Int32_FMT " other link%s.\n",
progName, inName, n, n > 1 ? "s" : "" );
setExit(1);
return;
@@ -1376,6 +1497,7 @@ void compress ( Char *name )
deleteOutputOnInterrupt = False;
}
+#endif
/*---------------------------------------------*/
@@ -1465,7 +1587,7 @@ void uncompress ( Char *name )
}
if ( srcMode == SM_F2F && !forceOverwrite &&
(n=countHardLinks ( inName ) ) > 0) {
- fprintf ( stderr, "%s: Input file %s has %d other link%s.\n",
+ fprintf ( stderr, "%s: Input file %s has " Int32_FMT " other link%s.\n",
progName, inName, n, n > 1 ? "s" : "" );
setExit(1);
return;
@@ -1671,7 +1793,11 @@ void license ( void )
{
fprintf ( stderr,
+#ifndef __ORCAC__
"bzip2, a block-sorting file compressor. "
+#else
+ "bunzip2, a block-sorting file decompressor. "
+#endif
"Version %s.\n"
" \n"
" Copyright (C) 1996-2002 by Julian Seward.\n"
@@ -1684,6 +1810,14 @@ void license ( void )
" but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
" LICENSE file for more details.\n"
+#ifdef __ORCAC__
+ " \n"
+ " This version of bunzip2 for GNO is based on Julian Seward's bzip2\n"
+ " program for other platforms, with modifications by Stephen Heumann.\n"
+ " \n"
+ " This program contains material from the ORCA/C Run-Time Libraries,\n"
+ " copyright 1987-1996 by Byte Works, Inc. Used with permission.\n"
+#endif
" \n",
BZ2_bzlibVersion()
);
@@ -1696,13 +1830,19 @@ void usage ( Char *fullProgName )
{
fprintf (
stderr,
+#ifndef __ORCAC__
"bzip2, a block-sorting file compressor. "
+#else
+ "bunzip2, a block-sorting file decompressor. "
+#endif
"Version %s.\n"
"\n usage: %s [flags and input files in any order]\n"
"\n"
" -h --help print this message\n"
" -d --decompress force decompression\n"
+#ifndef __ORCAC__
" -z --compress force compression\n"
+#endif
" -k --keep keep (don't delete) input files\n"
" -f --force overwrite existing output files\n"
" -t --test test compressed file integrity\n"
@@ -1712,17 +1852,33 @@ void usage ( Char *fullProgName )
" -L --license display software version & license\n"
" -V --version display software version & license\n"
" -s --small use less memory (at most 2500k)\n"
+#ifndef __ORCAC__
" -1 .. -9 set block size to 100k .. 900k\n"
" --fast alias for -1\n"
" --best alias for -9\n"
+#endif
"\n"
+#ifndef __ORCAC__
" If invoked as `bzip2', default action is to compress.\n"
" as `bunzip2', default action is to decompress.\n"
+#else
+ " If invoked as 'bunzip2', default action is to decompress.\n"
+#endif
" as `bzcat', default action is to decompress to stdout.\n"
"\n"
+#ifndef __ORCAC__
" If no file names are given, bzip2 compresses or decompresses\n"
" from standard input to standard output. You can combine\n"
" short flags, so `-v -4' means the same as -v4 or -4v, &c.\n"
+#else
+ " If no file names are given, bunzip2 decompresses from standard\n"
+ " input to standard output. You can combine short flags, so\n"
+ " `-v -4' means the same as -v4 or -4v, &c.\n"
+ "\n"
+ " This version of bunzip2 for GNO is based on the bzip2 program for\n"
+ " other platforms; however, it has all compression functionality\n"
+ " disabled and will only decompress or test compressed files.\n"
+#endif
# if BZ_UNIX
"\n"
# endif
@@ -1794,6 +1950,10 @@ Cell *mkCell ( void )
/*---------------------------------------------*/
+#ifdef __ORCAC__
+#pragma optimize 119
+#endif
+
static
Cell *snocString ( Cell *root, Char *name )
{
@@ -1810,6 +1970,10 @@ Cell *snocString ( Cell *root, Char *name )
}
}
+#ifdef __ORCAC__
+#pragma optimize -1
+#endif
+
/*---------------------------------------------*/
static
@@ -1850,6 +2014,11 @@ IntNative main ( IntNative argc, Char *argv[] )
Cell *aa;
Bool decode;
+#if defined(__GNO__) && defined(__STACK_CHECK__)
+ __REPORT_STACK();
+ fprintf(stderr, "Stack checking on\n");
+#endif
+
/*-- Be really really really paranoid :-) --*/
if (sizeof(Int32) != 4 || sizeof(UInt32) != 4 ||
sizeof(Int16) != 2 || sizeof(UInt16) != 2 ||
@@ -1920,6 +2089,7 @@ IntNative main ( IntNative argc, Char *argv[] )
/*-- Determine what to do (compress/uncompress/test/cat). --*/
/*-- Note that subsequent flag handling may change this. --*/
+#ifndef __ORCAC__
opMode = OM_Z;
if ( (strstr ( progName, "unzip" ) != 0) ||
@@ -1934,6 +2104,23 @@ IntNative main ( IntNative argc, Char *argv[] )
srcMode = (numFileNames == 0) ? SM_I2O : SM_F2O;
}
+#else
+ /* GNO modifications: Decompress by default, and use case-insensitive
+ compares for filenames, in keeping with the normal practice on the GS */
+ opMode = OM_UNZ;
+
+ if (stristr ( progName, "bzip" ) != 0)
+ opMode = OM_Z;
+
+ if (stristr ( progName, "unzip" ) != 0)
+ opMode = OM_UNZ;
+
+ if ( (stristr ( progName, "z2cat" ) != 0) ||
+ (stristr ( progName, "zcat" ) != 0) ) {
+ opMode = OM_UNZ;
+ srcMode = (numFileNames == 0) ? SM_I2O : SM_F2O;
+ }
+#endif
/*-- Look at the flags. --*/
for (aa = argList; aa != NULL; aa = aa->link) {
@@ -2026,6 +2213,7 @@ IntNative main ( IntNative argc, Char *argv[] )
}
if (opMode == OM_Z) {
+#ifndef __ORCAC__
if (srcMode == SM_I2O) {
compress ( NULL );
} else {
@@ -2037,6 +2225,13 @@ IntNative main ( IntNative argc, Char *argv[] )
compress ( aa->name );
}
}
+#else
+ fprintf ( stderr,
+ "%s: Cannot compress data. The GNO version of bunzip2 does\n"
+ "%s: not support compression, only decompression and testing.\n",
+ progName, progName );
+ cleanUpAndFail( 4 );
+#endif
}
else
diff --git a/bzip2.txt b/bzip2.txt
deleted file mode 100644
index 6afe358..0000000
--- a/bzip2.txt
+++ /dev/null
@@ -1,390 +0,0 @@
-
-NAME
- bzip2, bunzip2 - a block-sorting file compressor, v1.0.2
- bzcat - decompresses files to stdout
- bzip2recover - recovers data from damaged bzip2 files
-
-
-SYNOPSIS
- bzip2 [ -cdfkqstvzVL123456789 ] [ filenames ... ]
- bunzip2 [ -fkvsVL ] [ filenames ... ]
- bzcat [ -s ] [ filenames ... ]
- bzip2recover filename
-
-
-DESCRIPTION
- bzip2 compresses files using the Burrows-Wheeler block
- sorting text compression algorithm, and Huffman coding.
- Compression is generally considerably better than that
- achieved by more conventional LZ77/LZ78-based compressors,
- and approaches the performance of the PPM family of sta
- tistical compressors.
-
- The command-line options are deliberately very similar to
- those of GNU gzip, but they are not identical.
-
- bzip2 expects a list of file names to accompany the com
- mand-line flags. Each file is replaced by a compressed
- version of itself, with the name "original_name.bz2".
- Each compressed file has the same modification date, per
- missions, and, when possible, ownership as the correspond
- ing original, so that these properties can be correctly
- restored at decompression time. File name handling is
- naive in the sense that there is no mechanism for preserv
- ing original file names, permissions, ownerships or dates
- in filesystems which lack these concepts, or have serious
- file name length restrictions, such as MS-DOS.
-
- bzip2 and bunzip2 will by default not overwrite existing
- files. If you want this to happen, specify the -f flag.
-
- If no file names are specified, bzip2 compresses from
- standard input to standard output. In this case, bzip2
- will decline to write compressed output to a terminal, as
- this would be entirely incomprehensible and therefore
- pointless.
-
- bunzip2 (or bzip2 -d) decompresses all specified files.
- Files which were not created by bzip2 will be detected and
- ignored, and a warning issued. bzip2 attempts to guess
- the filename for the decompressed file from that of the
- compressed file as follows:
-
- filename.bz2 becomes filename
- filename.bz becomes filename
- filename.tbz2 becomes filename.tar
- filename.tbz becomes filename.tar
- anyothername becomes anyothername.out
-
- If the file does not end in one of the recognised endings,
- .bz2, .bz, .tbz2 or .tbz, bzip2 complains that it cannot
- guess the name of the original file, and uses the original
- name with .out appended.
-
- As with compression, supplying no filenames causes decom
- pression from standard input to standard output.
-
- bunzip2 will correctly decompress a file which is the con
- catenation of two or more compressed files. The result is
- the concatenation of the corresponding uncompressed files.
- Integrity testing (-t) of concatenated compressed files is
- also supported.
-
- You can also compress or decompress files to the standard
- output by giving the -c flag. Multiple files may be com
- pressed and decompressed like this. The resulting outputs
- are fed sequentially to stdout. Compression of multiple
- files in this manner generates a stream containing multi
- ple compressed file representations. Such a stream can be
- decompressed correctly only by bzip2 version 0.9.0 or
- later. Earlier versions of bzip2 will stop after decom
- pressing the first file in the stream.
-
- bzcat (or bzip2 -dc) decompresses all specified files to
- the standard output.
-
- bzip2 will read arguments from the environment variables
- BZIP2 and BZIP, in that order, and will process them
- before any arguments read from the command line. This
- gives a convenient way to supply default arguments.
-
- Compression is always performed, even if the compressed
- file is slightly larger than the original. Files of less
- than about one hundred bytes tend to get larger, since the
- compression mechanism has a constant overhead in the
- region of 50 bytes. Random data (including the output of
- most file compressors) is coded at about 8.05 bits per
- byte, giving an expansion of around 0.5%.
-
- As a self-check for your protection, bzip2 uses 32-bit
- CRCs to make sure that the decompressed version of a file
- is identical to the original. This guards against corrup
- tion of the compressed data, and against undetected bugs
- in bzip2 (hopefully very unlikely). The chances of data
- corruption going undetected is microscopic, about one
- chance in four billion for each file processed. Be aware,
- though, that the check occurs upon decompression, so it
- can only tell you that something is wrong. It can't help
- you recover the original uncompressed data. You can use
- bzip2recover to try to recover data from damaged files.
-
- Return values: 0 for a normal exit, 1 for environmental
- problems (file not found, invalid flags, I/O errors, &c),
- 2 to indicate a corrupt compressed file, 3 for an internal
- consistency error (eg, bug) which caused bzip2 to panic.
-
-
-OPTIONS
- -c --stdout
- Compress or decompress to standard output.
-
- -d --decompress
- Force decompression. bzip2, bunzip2 and bzcat are
- really the same program, and the decision about
- what actions to take is done on the basis of which
- name is used. This flag overrides that mechanism,
- and forces bzip2 to decompress.
-
- -z --compress
- The complement to -d: forces compression,
- regardless of the invocation name.
-
- -t --test
- Check integrity of the specified file(s), but don't
- decompress them. This really performs a trial
- decompression and throws away the result.
-
- -f --force
- Force overwrite of output files. Normally, bzip2
- will not overwrite existing output files. Also
- forces bzip2 to break hard links to files, which it
- otherwise wouldn't do.
-
- bzip2 normally declines to decompress files which
- don't have the correct magic header bytes. If
- forced (-f), however, it will pass such files
- through unmodified. This is how GNU gzip behaves.
-
- -k --keep
- Keep (don't delete) input files during compression
- or decompression.
-
- -s --small
- Reduce memory usage, for compression, decompression
- and testing. Files are decompressed and tested
- using a modified algorithm which only requires 2.5
- bytes per block byte. This means any file can be
- decompressed in 2300k of memory, albeit at about
- half the normal speed.
-
- During compression, -s selects a block size of
- 200k, which limits memory use to around the same
- figure, at the expense of your compression ratio.
- In short, if your machine is low on memory (8
- megabytes or less), use -s for everything. See
- MEMORY MANAGEMENT below.
-
- -q --quiet
- Suppress non-essential warning messages. Messages
- pertaining to I/O errors and other critical events
- will not be suppressed.
-
- -v --verbose
- Verbose mode -- show the compression ratio for each
- file processed. Further -v's increase the ver
- bosity level, spewing out lots of information which
- is primarily of interest for diagnostic purposes.
-
- -L --license -V --version
- Display the software version, license terms and
- conditions.
-
- -1 (or --fast) to -9 (or --best)
- Set the block size to 100 k, 200 k .. 900 k when
- compressing. Has no effect when decompressing.
- See MEMORY MANAGEMENT below. The --fast and --best
- aliases are primarily for GNU gzip compatibility.
- In particular, --fast doesn't make things signifi
- cantly faster. And --best merely selects the
- default behaviour.
-
- -- Treats all subsequent arguments as file names, even
- if they start with a dash. This is so you can han
- dle files with names beginning with a dash, for
- example: bzip2 -- -myfilename.
-
- --repetitive-fast --repetitive-best
- These flags are redundant in versions 0.9.5 and
- above. They provided some coarse control over the
- behaviour of the sorting algorithm in earlier ver
- sions, which was sometimes useful. 0.9.5 and above
- have an improved algorithm which renders these
- flags irrelevant.
-
-
-MEMORY MANAGEMENT
- bzip2 compresses large files in blocks. The block size
- affects both the compression ratio achieved, and the
- amount of memory needed for compression and decompression.
- The flags -1 through -9 specify the block size to be
- 100,000 bytes through 900,000 bytes (the default) respec
- tively. At decompression time, the block size used for
- compression is read from the header of the compressed
- file, and bunzip2 then allocates itself just enough memory
- to decompress the file. Since block sizes are stored in
- compressed files, it follows that the flags -1 to -9 are
- irrelevant to and so ignored during decompression.
-
- Compression and decompression requirements, in bytes, can
- be estimated as:
-
- Compression: 400k + ( 8 x block size )
-
- Decompression: 100k + ( 4 x block size ), or
- 100k + ( 2.5 x block size )
-
- Larger block sizes give rapidly diminishing marginal
- returns. Most of the compression comes from the first two
- or three hundred k of block size, a fact worth bearing in
- mind when using bzip2 on small machines. It is also
- important to appreciate that the decompression memory
- requirement is set at compression time by the choice of
- block size.
-
- For files compressed with the default 900k block size,
- bunzip2 will require about 3700 kbytes to decompress. To
- support decompression of any file on a 4 megabyte machine,
- bunzip2 has an option to decompress using approximately
- half this amount of memory, about 2300 kbytes. Decompres
- sion speed is also halved, so you should use this option
- only where necessary. The relevant flag is -s.
-
- In general, try and use the largest block size memory con
- straints allow, since that maximises the compression
- achieved. Compression and decompression speed are virtu
- ally unaffected by block size.
-
- Another significant point applies to files which fit in a
- single block -- that means most files you'd encounter
- using a large block size. The amount of real memory
- touched is proportional to the size of the file, since the
- file is smaller than a block. For example, compressing a
- file 20,000 bytes long with the flag -9 will cause the
- compressor to allocate around 7600k of memory, but only
- touch 400k + 20000 * 8 = 560 kbytes of it. Similarly, the
- decompressor will allocate 3700k but only touch 100k +
- 20000 * 4 = 180 kbytes.
-
- Here is a table which summarises the maximum memory usage
- for different block sizes. Also recorded is the total
- compressed size for 14 files of the Calgary Text Compres
- sion Corpus totalling 3,141,622 bytes. This column gives
- some feel for how compression varies with block size.
- These figures tend to understate the advantage of larger
- block sizes for larger files, since the Corpus is domi
- nated by smaller files.
-
- Compress Decompress Decompress Corpus
- Flag usage usage -s usage Size
-
- -1 1200k 500k 350k 914704
- -2 2000k 900k 600k 877703
- -3 2800k 1300k 850k 860338
- -4 3600k 1700k 1100k 846899
- -5 4400k 2100k 1350k 845160
- -6 5200k 2500k 1600k 838626
- -7 6100k 2900k 1850k 834096
- -8 6800k 3300k 2100k 828642
- -9 7600k 3700k 2350k 828642
-
-
-RECOVERING DATA FROM DAMAGED FILES
- bzip2 compresses files in blocks, usually 900kbytes long.
- Each block is handled independently. If a media or trans
- mission error causes a multi-block .bz2 file to become
- damaged, it may be possible to recover data from the
- undamaged blocks in the file.
-
- The compressed representation of each block is delimited
- by a 48-bit pattern, which makes it possible to find the
- block boundaries with reasonable certainty. Each block
- also carries its own 32-bit CRC, so damaged blocks can be
- distinguished from undamaged ones.
-
- bzip2recover is a simple program whose purpose is to
- search for blocks in .bz2 files, and write each block out
- into its own .bz2 file. You can then use bzip2 -t to test
- the integrity of the resulting files, and decompress those
- which are undamaged.
-
- bzip2recover takes a single argument, the name of the dam
- aged file, and writes a number of files
- "rec00001file.bz2", "rec00002file.bz2", etc, containing
- the extracted blocks. The output filenames are
- designed so that the use of wildcards in subsequent pro
- cessing -- for example, "bzip2 -dc rec*file.bz2 > recov
- ered_data" -- processes the files in the correct order.
-
- bzip2recover should be of most use dealing with large .bz2
- files, as these will contain many blocks. It is clearly
- futile to use it on damaged single-block files, since a
- damaged block cannot be recovered. If you wish to min
- imise any potential data loss through media or transmis
- sion errors, you might consider compressing with a smaller
- block size.
-
-
-PERFORMANCE NOTES
- The sorting phase of compression gathers together similar
- strings in the file. Because of this, files containing
- very long runs of repeated symbols, like "aabaabaabaab
- ..." (repeated several hundred times) may compress more
- slowly than normal. Versions 0.9.5 and above fare much
- better than previous versions in this respect. The ratio
- between worst-case and average-case compression time is in
- the region of 10:1. For previous versions, this figure
- was more like 100:1. You can use the -vvvv option to mon
- itor progress in great detail, if you want.
-
- Decompression speed is unaffected by these phenomena.
-
- bzip2 usually allocates several megabytes of memory to
- operate in, and then charges all over it in a fairly ran
- dom fashion. This means that performance, both for com
- pressing and decompressing, is largely determined by the
- speed at which your machine can service cache misses.
- Because of this, small changes to the code to reduce the
- miss rate have been observed to give disproportionately
- large performance improvements. I imagine bzip2 will per
- form best on machines with very large caches.
-
-
-CAVEATS
- I/O error messages are not as helpful as they could be.
- bzip2 tries hard to detect I/O errors and exit cleanly,
- but the details of what the problem is sometimes seem
- rather misleading.
-
- This manual page pertains to version 1.0.2 of bzip2. Com
- pressed data created by this version is entirely forwards
- and backwards compatible with the previous public
- releases, versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0 and 1.0.1,
- but with the following exception: 0.9.0 and above can cor
- rectly decompress multiple concatenated compressed files.
- 0.1pl2 cannot do this; it will stop after decompressing
- just the first file in the stream.
-
- bzip2recover versions prior to this one, 1.0.2, used
- 32-bit integers to represent bit positions in compressed
- files, so it could not handle compressed files more than
- 512 megabytes long. Version 1.0.2 and above uses 64-bit
- ints on some platforms which support them (GNU supported
- targets, and Windows). To establish whether or not
- bzip2recover was built with such a limitation, run it
- without arguments. In any event you can build yourself an
- unlimited version if you can recompile it with MaybeUInt64
- set to be an unsigned 64-bit integer.
-
-
-AUTHOR
- Julian Seward, jseward@acm.org.
-
- http://sources.redhat.com/bzip2
-
- The ideas embodied in bzip2 are due to (at least) the fol
- lowing people: Michael Burrows and David Wheeler (for the
- block sorting transformation), David Wheeler (again, for
- the Huffman coder), Peter Fenwick (for the structured cod
- ing model in the original bzip, and many refinements), and
- Alistair Moffat, Radford Neal and Ian Witten (for the
- arithmetic coder in the original bzip). I am much
- indebted for their help, support and advice. See the man
- ual in the source distribution for pointers to sources of
- documentation. Christian von Roques encouraged me to look
- for faster sorting algorithms, so as to speed up compres
- sion. Bela Lubkin encouraged me to improve the worst-case
- compression performance. The bz* scripts are derived from
- those of GNU gzip. Many people sent patches, helped with
- portability problems, lent machines, gave advice and were
- generally helpful.
-
diff --git a/bzip2recover.1 b/bzip2recover.1
new file mode 100644
index 0000000..9f972a0
--- /dev/null
+++ b/bzip2recover.1
@@ -0,0 +1 @@
+.so man1/bunzip2.1
diff --git a/bzip2recover.c b/bzip2recover.c
index 286873b..68947d9 100644
--- a/bzip2recover.c
+++ b/bzip2recover.c
@@ -4,6 +4,8 @@
/*--- bzip2recover.c ---*/
/*-----------------------------------------------------------*/
+/*-- Modified for use under GNO by Stephen Heumann --*/
+
/*--
This program is bzip2recover, a program to attempt data
salvage from damaged files created by the accompanying
@@ -56,7 +58,14 @@
#include
#include
#include
+#include
+#ifdef __appleiigs__
+#include
+#if defined(__GNO__) && defined(__STACK_CHECK__)
+#include
+#endif
+#endif
/* This program records bit locations in the file to be recovered.
That means that if 64-bit ints are not supported, we will not
@@ -74,14 +83,28 @@
#ifdef _MSC_VER
typedef unsigned __int64 MaybeUInt64;
# define MaybeUInt64_FMT "%I64u"
+#else
+#ifdef __ORCAC__
+ typedef unsigned long MaybeUInt64;
+# define MaybeUInt64_FMT "%lu"
#else
typedef unsigned int MaybeUInt64;
# define MaybeUInt64_FMT "%u"
#endif
#endif
+#endif
-typedef unsigned int UInt32;
-typedef int Int32;
+#ifdef __ORCAC__
+ typedef unsigned long UInt32;
+ typedef long Int32;
+# define Int32_FMT "%ld"
+# define size_t_FMT "%lu"
+#else
+ typedef unsigned int UInt32;
+ typedef int Int32;
+# define Int32_FMT "%d"
+# define size_t_FMT "%d"
+#endif /* defined __ORCAC__ */
typedef unsigned char UChar;
typedef char Char;
typedef unsigned char Bool;
@@ -143,7 +166,7 @@ void writeError ( void )
void mallocFail ( Int32 n )
{
fprintf ( stderr,
- "%s: malloc failed on request for %d bytes.\n",
+ "%s: malloc failed on request for " Int32_FMT " bytes.\n",
progName, n );
fprintf ( stderr, "%s: warning: output file(s) may be incomplete.\n",
progName );
@@ -155,7 +178,7 @@ void mallocFail ( Int32 n )
void tooManyBlocks ( Int32 max_handled_blocks )
{
fprintf ( stderr,
- "%s: `%s' appears to contain more than %d blocks\n",
+ "%s: `%s' appears to contain more than " Int32_FMT " blocks\n",
progName, inFileName, max_handled_blocks );
fprintf ( stderr,
"%s: and cannot be handled. To fix, increase\n",
@@ -296,8 +319,13 @@ Bool endsInBz2 ( Char* name )
if (n <= 4) return False;
return
(name[n-4] == '.' &&
+#ifdef __GNO__
+ (name[n-3] == 'b' || name[n-3] == 'B') &&
+ (name[n-2] == 'z' || name[n-3] == 'Z') &&
+#else
name[n-3] == 'b' &&
name[n-2] == 'z' &&
+#endif
name[n-1] == '2');
}
@@ -313,6 +341,10 @@ Bool endsInBz2 ( Char* name )
# define BZ_SPLIT_SYM '/' /* path splitter on Unix platform */
#endif
+#ifdef __appleiigs__
+# define BZ_SPLIT_SYM_GS ':' /* possible path splitter on GS/OS */
+#endif
+
#define BLOCK_HEADER_HI 0x00003141UL
#define BLOCK_HEADER_LO 0x59265359UL
@@ -323,14 +355,28 @@ Bool endsInBz2 ( Char* name )
would have an uncompressed size of at least 40GB, so the chances
are low you'll need to up this.
*/
+/* STH - Values larger than 5369 (actually a bit less than that)
+ are useless when MaybeUInt64 is 32 bits.
+*/
+#ifdef __ORCAC__
+#define BZ_MAX_HANDLED_BLOCKS 5369
+#else
#define BZ_MAX_HANDLED_BLOCKS 50000
+#endif
+#ifndef __ORCAC__
MaybeUInt64 bStart [BZ_MAX_HANDLED_BLOCKS];
MaybeUInt64 bEnd [BZ_MAX_HANDLED_BLOCKS];
MaybeUInt64 rbStart[BZ_MAX_HANDLED_BLOCKS];
MaybeUInt64 rbEnd [BZ_MAX_HANDLED_BLOCKS];
+#else /* if defined __GNO__ */
+MaybeUInt64 *bStart;
+MaybeUInt64 *bEnd;
+MaybeUInt64 *rbStart;
+MaybeUInt64 *rbEnd;
+#endif
-Int32 main ( Int32 argc, Char** argv )
+int main ( int argc, Char** argv )
{
FILE* inFile;
FILE* outFile;
@@ -341,11 +387,19 @@ Int32 main ( Int32 argc, Char** argv )
UInt32 buffHi, buffLo, blockCRC;
Char* p;
+#if defined(__GNO__) && defined(__STACK_CHECK__)
+ __REPORT_STACK();
+#endif
+
strcpy ( progName, argv[0] );
inFileName[0] = outFileName[0] = 0;
- fprintf ( stderr,
+ fprintf ( stderr,
+#ifdef __GNO__
+ "bzip2recover 1.0.2gs1: extracts blocks from damaged .bz2 files.\n" );
+#else
"bzip2recover 1.0.2: extracts blocks from damaged .bz2 files.\n" );
+#endif
if (argc != 2) {
fprintf ( stderr, "%s: usage is `%s damaged_file_name'.\n",
@@ -358,9 +412,11 @@ Int32 main ( Int32 argc, Char** argv )
case 4:
fprintf(stderr,
"\trestrictions on size of recovered file: 512 MB\n");
+#ifndef __ORCAC__
fprintf(stderr,
"\tto circumvent, recompile with MaybeUInt64 as an\n"
"\tunsigned 64-bit int.\n");
+#endif
break;
default:
fprintf(stderr,
@@ -373,7 +429,7 @@ Int32 main ( Int32 argc, Char** argv )
if (strlen(argv[1]) >= BZ_MAX_FILENAME-20) {
fprintf ( stderr,
- "%s: supplied filename is suspiciously (>= %d chars) long. Bye!\n",
+ "%s: supplied filename is suspiciously (>= " size_t_FMT " chars) long. Bye!\n",
progName, strlen(argv[1]) );
exit(1);
}
@@ -386,6 +442,21 @@ Int32 main ( Int32 argc, Char** argv )
exit(1);
}
+/* Allocate big arrays dynamically so we can use small memory model. These aren't
+ explicitly free()'d anywhere, but exist for the duration of the program. */
+#ifdef __ORCAC__
+ bStart = malloc(BZ_MAX_HANDLED_BLOCKS * sizeof(MaybeUInt64));
+ bEnd = malloc(BZ_MAX_HANDLED_BLOCKS * sizeof(MaybeUInt64));
+ rbStart = malloc(BZ_MAX_HANDLED_BLOCKS * sizeof(MaybeUInt64));
+ rbEnd = malloc(BZ_MAX_HANDLED_BLOCKS * sizeof(MaybeUInt64));
+
+ if ((bStart == NULL) || (bEnd == NULL) ||
+ (rbStart == NULL) || (rbEnd == NULL)) {
+ fprintf ( stderr, "%s: couldn't allocate enough memory\n", progName );
+ exit(1);
+ }
+#endif
+
bsIn = bsOpenReadStream ( inFile );
fprintf ( stderr, "%s: searching for block boundaries ...\n", progName );
@@ -404,7 +475,7 @@ Int32 main ( Int32 argc, Char** argv )
(bitsRead - bStart[currBlock]) >= 40) {
bEnd[currBlock] = bitsRead-1;
if (currBlock > 0)
- fprintf ( stderr, " block %d runs from " MaybeUInt64_FMT
+ fprintf ( stderr, " block " Int32_FMT " runs from " MaybeUInt64_FMT
" to " MaybeUInt64_FMT " (incomplete)\n",
currBlock, bStart[currBlock], bEnd[currBlock] );
} else
@@ -426,7 +497,7 @@ Int32 main ( Int32 argc, Char** argv )
}
if (currBlock > 0 &&
(bEnd[currBlock] - bStart[currBlock]) >= 130) {
- fprintf ( stderr, " block %d runs from " MaybeUInt64_FMT
+ fprintf ( stderr, " block " Int32_FMT " runs from " MaybeUInt64_FMT
" to " MaybeUInt64_FMT "\n",
rbCtr+1, bStart[currBlock], bEnd[currBlock] );
rbStart[rbCtr] = bStart[currBlock];
@@ -496,26 +567,41 @@ Int32 main ( Int32 argc, Char** argv )
if (bitsRead == rbStart[wrBlock]) {
/* Create the output file name, correctly handling leading paths.
(31.10.2001 by Sergey E. Kusikov) */
+ /* Modified by STH to make it work better on GNO. It would still
+ be confused by files with a '/' character in their names. */
Char* split;
Int32 ofs, k;
for (k = 0; k < BZ_MAX_FILENAME; k++)
outFileName[k] = 0;
strcpy (outFileName, inFileName);
+#ifdef __appleiigs__
+ split = ((strrchr (outFileName, BZ_SPLIT_SYM_GS) >
+ strrchr (outFileName, BZ_SPLIT_SYM)) ?
+ strrchr (outFileName, BZ_SPLIT_SYM_GS) :
+ strrchr (outFileName, BZ_SPLIT_SYM));
+#else
split = strrchr (outFileName, BZ_SPLIT_SYM);
+#endif /* defined __appleiigs__ */
if (split == NULL) {
split = outFileName;
} else {
++split;
}
/* Now split points to the start of the basename. */
- ofs = split - outFileName;
+ ofs = split - outFileName;
+/* On GS, max. block number is < 6000, and ProDOS filenames are short,
+ so use only four digits in output file name */
+#ifdef __ORCAC__
+ sprintf (split, "rec%4ld", wrBlock+1);
+#else
sprintf (split, "rec%5d", wrBlock+1);
+#endif
for (p = split; *p != 0; p++) if (*p == ' ') *p = '0';
strcat (outFileName, inFileName + ofs);
if ( !endsInBz2(outFileName)) strcat ( outFileName, ".bz2" );
- fprintf ( stderr, " writing block %d to `%s' ...\n",
+ fprintf ( stderr, " writing block " Int32_FMT " to `%s' ...\n",
wrBlock+1, outFileName );
outFile = fopen ( outFileName, "wb" );
@@ -524,6 +610,27 @@ Int32 main ( Int32 argc, Char** argv )
progName, outFileName );
exit(1);
}
+
+#ifdef __appleiigs__
+ /* Set filetype to BIN if running on the GS */
+ {
+ static GSString255 fileNameStringGS;
+ static FileInfoRecGS infoRec = { 4, /* pCount */
+ &fileNameStringGS, /* Ptr to file name */
+ 0x00C3, /* access restrictions (none) */
+ 0x06, /* filetype (BIN) */
+ 0x0000 /* auxtype ($0000) */
+ };
+
+ if (strlen( outFileName ) <= 255) {
+ strncpy( fileNameStringGS.text, outFileName, 255 );
+ fileNameStringGS.length = strlen( outFileName );
+ SetFileInfo( &infoRec );
+ /* Ignoring any errors produced by this call */
+ }
+ }
+#endif
+
bsWr = bsOpenWriteStream ( outFile );
bsPutUChar ( bsWr, BZ_HDR_B );
bsPutUChar ( bsWr, BZ_HDR_Z );
@@ -535,7 +642,7 @@ Int32 main ( Int32 argc, Char** argv )
}
}
- fprintf ( stderr, "%s: finished\n", progName );
+ fprintf ( stderr, "%s: finished\n", progName );
return 0;
}
diff --git a/bzip2recover.rez b/bzip2recover.rez
new file mode 100644
index 0000000..37fc936
--- /dev/null
+++ b/bzip2recover.rez
@@ -0,0 +1,15 @@
+#include "/lang/orca/libraries/rinclude/Types.Rez"
+
+resource rVersion (0x1, purgeable3, nocrossbank) {
+
+ { 1, 0, 2, /* version 1.0.2 */
+ release, /* development|alpha|beta|final|release */
+ 0 /* non-final release number */
+ },
+ verUS, /* country code -- only some are avail */
+ "bzip2recover", /* name */
+ /* _Very_ brief descrition. Check "file info" */
+ /* shown in the Finder to see if it's too long */
+ /* Note that \n is used to separate lines here. */
+ "Bzip2 archive recovery program"
+};
diff --git a/bzlib.c b/bzlib.c
index 7d1cb27..43f552d 100644
--- a/bzlib.c
+++ b/bzlib.c
@@ -4,6 +4,11 @@
/*--- bzlib.c ---*/
/*-------------------------------------------------------------*/
+/*-- Modified for use under GNO by Stephen Heumann --*/
+#ifdef __ORCAC__
+segment "bzip2";
+#endif
+
/*--
This file is a part of bzip2 and/or libbzip2, a program and
library for lossless, block-sorting data compression.
@@ -85,7 +90,18 @@
#ifndef BZ_NO_STDIO
void BZ2_bz__AssertH__fail ( int errcode )
{
- fprintf(stderr,
+ fprintf(stderr,
+#ifdef __GNO__
+ "\n\nbunzip2/libbzip2: internal error number %d.\n"
+ "This is a bug in bunzip2/libbzip2, %s.\n"
+ "If you are experiencing it only in the GNO version of bunzip2,\n"
+ "please report it to me at sheumann@myrealbox.com . If you can\n"
+ "duplicate it in other versions of bzip2 as well, please report\n"
+ "it to the original author Julian Seward at tjseward@acm.org .\n",
+ "Please make an effort to report this bug; timely and accurate\n"
+ "bug reports eventually lead to higher quality software. Thanks.\n"
+ "Stephen Heumann and Julian Seward.\n\n",
+#else
"\n\nbzip2/libbzip2: internal error number %d.\n"
"This is a bug in bzip2/libbzip2, %s.\n"
"Please report it to me at: jseward@acm.org. If this happened\n"
@@ -94,10 +110,15 @@ void BZ2_bz__AssertH__fail ( int errcode )
"of that program. Please make an effort to report this bug;\n"
"timely and accurate bug reports eventually lead to higher\n"
"quality software. Thanks. Julian Seward, 30 December 2001.\n\n",
+#endif
errcode,
BZ2_bzlibVersion()
);
+#ifndef __ORCAC__
+/* Don't need this for decompression, since error 1007 is only
+ * produced in the blocksort routines used for compression.
+ */
if (errcode == 1007) {
fprintf(stderr,
"\n*** A special note about internal error number 1007 ***\n"
@@ -125,6 +146,7 @@ void BZ2_bz__AssertH__fail ( int errcode )
"\n"
);
}
+#endif
exit(3);
}
@@ -135,9 +157,11 @@ void BZ2_bz__AssertH__fail ( int errcode )
static
int bz_config_ok ( void )
{
+#ifndef __ORCAC__
if (sizeof(int) != 4) return 0;
if (sizeof(short) != 2) return 0;
if (sizeof(char) != 1) return 0;
+#endif
return 1;
}
@@ -158,6 +182,7 @@ void default_bzfree ( void* opaque, void* addr )
/*---------------------------------------------------*/
+#ifndef __ORCAC__
static
void prepare_new_block ( EState* s )
{
@@ -169,17 +194,21 @@ void prepare_new_block ( EState* s )
for (i = 0; i < 256; i++) s->inUse[i] = False;
s->blockNo++;
}
+#endif
/*---------------------------------------------------*/
+#ifndef __ORCAC__
static
void init_RL ( EState* s )
{
s->state_in_ch = 256;
s->state_in_len = 0;
}
+#endif
+#ifndef __ORCAC__
static
Bool isempty_RL ( EState* s )
{
@@ -187,9 +216,11 @@ Bool isempty_RL ( EState* s )
return False; else
return True;
}
+#endif
/*---------------------------------------------------*/
+#ifndef __ORCAC__
int BZ_API(BZ2_bzCompressInit)
( bz_stream* strm,
int blockSize100k,
@@ -254,9 +285,11 @@ int BZ_API(BZ2_bzCompressInit)
prepare_new_block ( s );
return BZ_OK;
}
+#endif
/*---------------------------------------------------*/
+#ifndef __ORCAC__
static
void add_pair_to_block ( EState* s )
{
@@ -267,6 +300,29 @@ void add_pair_to_block ( EState* s )
}
s->inUse[s->state_in_ch] = True;
switch (s->state_in_len) {
+#ifdef __ORCAC__
+ case 1:
+ *((s->block)+(s->nblock)) = (UChar)ch; s->nblock++;
+ break;
+ case 2:
+ *((s->block)+(s->nblock)) = (UChar)ch; s->nblock++;
+ *((s->block)+(s->nblock)) = (UChar)ch; s->nblock++;
+ break;
+ case 3:
+ *((s->block)+(s->nblock)) = (UChar)ch; s->nblock++;
+ *((s->block)+(s->nblock)) = (UChar)ch; s->nblock++;
+ *((s->block)+(s->nblock)) = (UChar)ch; s->nblock++;
+ break;
+ default:
+ *((s->inUse)+(s->state_in_len-4)) = True;
+ *((s->block)+(s->nblock)) = (UChar)ch; s->nblock++;
+ *((s->block)+(s->nblock)) = (UChar)ch; s->nblock++;
+ *((s->block)+(s->nblock)) = (UChar)ch; s->nblock++;
+ *((s->block)+(s->nblock)) = (UChar)ch; s->nblock++;
+ *((s->block)+(s->nblock)) = ((UChar)(s->state_in_len-4));
+ s->nblock++;
+ break;
+#else
case 1:
s->block[s->nblock] = (UChar)ch; s->nblock++;
break;
@@ -288,20 +344,51 @@ void add_pair_to_block ( EState* s )
s->block[s->nblock] = ((UChar)(s->state_in_len-4));
s->nblock++;
break;
+#endif
}
}
+#endif
/*---------------------------------------------------*/
+#ifndef __ORCAC__
static
void flush_RL ( EState* s )
{
if (s->state_in_ch < 256) add_pair_to_block ( s );
init_RL ( s );
}
+#endif
/*---------------------------------------------------*/
+#ifdef __ORCAC__
+#define ADD_CHAR_TO_BLOCK(zs,zchh0) \
+{ \
+ UInt32 zchh = (UInt32)(zchh0); \
+ /*-- fast track the common case --*/ \
+ if (zchh != zs->state_in_ch && \
+ zs->state_in_len == 1) { \
+ UChar ch = (UChar)(zs->state_in_ch); \
+ BZ_UPDATE_CRC( zs->blockCRC, ch ); \
+ *((zs->inUse)+(zs->state_in_ch)) = True; \
+ *((zs->block)+(zs->nblock)) = (UChar)ch; \
+ zs->nblock++; \
+ zs->state_in_ch = zchh; \
+ } \
+ else \
+ /*-- general, uncommon cases --*/ \
+ if (zchh != zs->state_in_ch || \
+ zs->state_in_len == 255) { \
+ if (zs->state_in_ch < 256) \
+ add_pair_to_block ( zs ); \
+ zs->state_in_ch = zchh; \
+ zs->state_in_len = 1; \
+ } else { \
+ zs->state_in_len++; \
+ } \
+}
+#else
#define ADD_CHAR_TO_BLOCK(zs,zchh0) \
{ \
UInt32 zchh = (UInt32)(zchh0); \
@@ -327,9 +414,11 @@ void flush_RL ( EState* s )
zs->state_in_len++; \
} \
}
+#endif
/*---------------------------------------------------*/
+#ifndef __ORCAC__
static
Bool copy_input_until_stop ( EState* s )
{
@@ -372,9 +461,11 @@ Bool copy_input_until_stop ( EState* s )
}
return progress_in;
}
+#endif
/*---------------------------------------------------*/
+#ifndef __ORCAC__
static
Bool copy_output_until_stop ( EState* s )
{
@@ -399,9 +490,11 @@ Bool copy_output_until_stop ( EState* s )
return progress_out;
}
+#endif
/*---------------------------------------------------*/
+#ifndef __ORCAC__
static
Bool handle_compress ( bz_stream* strm )
{
@@ -446,9 +539,11 @@ Bool handle_compress ( bz_stream* strm )
return progress_in || progress_out;
}
+#endif
/*---------------------------------------------------*/
+#ifndef __ORCAC__
int BZ_API(BZ2_bzCompress) ( bz_stream *strm, int action )
{
Bool progress;
@@ -507,9 +602,11 @@ int BZ_API(BZ2_bzCompress) ( bz_stream *strm, int action )
}
return BZ_OK; /*--not reached--*/
}
+#endif
/*---------------------------------------------------*/
+#ifndef __ORCAC__
int BZ_API(BZ2_bzCompressEnd) ( bz_stream *strm )
{
EState* s;
@@ -527,6 +624,7 @@ int BZ_API(BZ2_bzCompressEnd) ( bz_stream *strm )
return BZ_OK;
}
+#endif
/*---------------------------------------------------*/
@@ -636,12 +734,20 @@ void unRLE_obuf_to_output_FAST ( DState* s )
UInt32* c_tt = s->tt;
UInt32 c_tPos = s->tPos;
char* cs_next_out = s->strm->next_out;
+#ifdef __ORCAC__
+ unsigned long cs_avail_out = s->strm->avail_out;
+#else
unsigned int cs_avail_out = s->strm->avail_out;
+#endif
/* end restore */
UInt32 avail_out_INIT = cs_avail_out;
Int32 s_save_nblockPP = s->save_nblock+1;
+#ifdef __ORCAC__
+ unsigned long total_out_lo32_old;
+#else
unsigned int total_out_lo32_old;
+#endif
while (True) {
@@ -845,7 +951,7 @@ int BZ_API(BZ2_bzDecompress) ( bz_stream *strm )
if (s->nblock_used == s->save_nblock+1 && s->state_out_len == 0) {
BZ_FINALISE_CRC ( s->calculatedBlockCRC );
if (s->verbosity >= 3)
- VPrintf2 ( " {0x%x, 0x%x}", s->storedBlockCRC,
+ VPrintf2 ( " {" UInt32_HEXFMT ", " UInt32_HEXFMT "}", s->storedBlockCRC,
s->calculatedBlockCRC );
if (s->verbosity >= 2) VPrintf0 ( "]" );
if (s->calculatedBlockCRC != s->storedBlockCRC)
@@ -863,7 +969,7 @@ int BZ_API(BZ2_bzDecompress) ( bz_stream *strm )
Int32 r = BZ2_decompress ( s );
if (r == BZ_STREAM_END) {
if (s->verbosity >= 3)
- VPrintf2 ( "\n combined CRCs: stored = 0x%x, computed = 0x%x",
+ VPrintf2 ( "\n combined CRCs: stored = " UInt32_HEXFMT ", computed = " UInt32_HEXFMT,
s->storedCombinedCRC, s->calculatedCombinedCRC );
if (s->calculatedCombinedCRC != s->storedCombinedCRC)
return BZ_DATA_ERROR;
@@ -934,6 +1040,7 @@ static Bool myfeof ( FILE* f )
/*---------------------------------------------------*/
+#ifndef __ORCAC__
BZFILE* BZ_API(BZ2_bzWriteOpen)
( int* bzerror,
FILE* f,
@@ -978,15 +1085,21 @@ BZFILE* BZ_API(BZ2_bzWriteOpen)
bzf->initialisedOk = True;
return bzf;
}
+#endif
/*---------------------------------------------------*/
+#ifndef __ORCAC__
void BZ_API(BZ2_bzWrite)
( int* bzerror,
BZFILE* b,
- void* buf,
+ void* buf,
+#ifdef __ORCAC__
+ long len )
+#else
int len )
+#endif
{
Int32 n, n2, ret;
bzFile* bzf = (bzFile*)b;
@@ -1024,29 +1137,45 @@ void BZ_API(BZ2_bzWrite)
{ BZ_SETERR(BZ_OK); return; };
}
}
+#endif
/*---------------------------------------------------*/
+#ifndef __ORCAC__
void BZ_API(BZ2_bzWriteClose)
( int* bzerror,
BZFILE* b,
int abandon,
+#ifdef __ORCAC__
+ unsigned long* nbytes_in,
+ unsigned long* nbytes_out )
+#else
unsigned int* nbytes_in,
unsigned int* nbytes_out )
+#endif
{
BZ2_bzWriteClose64 ( bzerror, b, abandon,
nbytes_in, NULL, nbytes_out, NULL );
}
+#endif
+#ifndef __ORCAC__
void BZ_API(BZ2_bzWriteClose64)
( int* bzerror,
BZFILE* b,
int abandon,
+#ifdef __ORCAC__
+ unsigned long* nbytes_in_lo32,
+ unsigned long* nbytes_in_hi32,
+ unsigned long* nbytes_out_lo32,
+ unsigned long* nbytes_out_hi32 )
+#else
unsigned int* nbytes_in_lo32,
unsigned int* nbytes_in_hi32,
unsigned int* nbytes_out_lo32,
unsigned int* nbytes_out_hi32 )
+#endif
{
Int32 n, n2, ret;
bzFile* bzf = (bzFile*)b;
@@ -1102,6 +1231,7 @@ void BZ_API(BZ2_bzWriteClose64)
BZ2_bzCompressEnd ( &(bzf->strm) );
free ( bzf );
}
+#endif
/*---------------------------------------------------*/
@@ -1179,11 +1309,19 @@ void BZ_API(BZ2_bzReadClose) ( int *bzerror, BZFILE *b )
/*---------------------------------------------------*/
+#ifdef __ORCAC__
+long BZ_API(BZ2_bzRead)
+#else
int BZ_API(BZ2_bzRead)
+#endif
( int* bzerror,
BZFILE* b,
- void* buf,
+ void* buf,
+#ifdef __ORCAC__
+ long len )
+#else
int len )
+#endif
{
Int32 n, ret;
bzFile* bzf = (bzFile*)b;
@@ -1265,11 +1403,20 @@ void BZ_API(BZ2_bzReadGetUnused)
/*---------------------------------------------------*/
/*---------------------------------------------------*/
+#ifndef __ORCAC__
int BZ_API(BZ2_bzBuffToBuffCompress)
- ( char* dest,
+ ( char* dest,
+#ifdef __ORCAC__
+ unsigned long* destLen,
+#else
unsigned int* destLen,
+#endif
char* source,
+#ifdef __ORCAC__
+ unsigned long sourceLen,
+#else
unsigned int sourceLen,
+#endif
int blockSize100k,
int verbosity,
int workFactor )
@@ -1314,14 +1461,23 @@ int BZ_API(BZ2_bzBuffToBuffCompress)
BZ2_bzCompressEnd ( &strm );
return ret;
}
+#endif
/*---------------------------------------------------*/
int BZ_API(BZ2_bzBuffToBuffDecompress)
( char* dest,
+#ifdef __ORCAC__
+ unsigned long* destLen,
+#else
unsigned int* destLen,
+#endif
char* source,
+#ifdef __ORCAC__
+ unsigned long sourceLen,
+#else
unsigned int sourceLen,
+#endif
int small,
int verbosity )
{
@@ -1390,7 +1546,9 @@ const char * BZ_API(BZ2_bzlibVersion)(void)
return BZ_VERSION;
}
-
+/* This stuff is disabled because it may be broken under GNO due to
+ 16-bit ints. It has not been modified to use longs where needed. */
+#ifndef __ORCAC__
#ifndef BZ_NO_STDIO
/*---------------------------------------------------*/
@@ -1586,6 +1744,7 @@ const char * BZ_API(BZ2_bzerror) (BZFILE *b, int *errnum)
return bzerrorstrings[err*-1];
}
#endif
+#endif /* not defined __ORCAC__ */
/*-------------------------------------------------------------*/
diff --git a/bzlib.h b/bzlib.h
index 9ac43a1..ffd0cd1 100644
--- a/bzlib.h
+++ b/bzlib.h
@@ -85,6 +85,27 @@ extern "C" {
#define BZ_OUTBUFF_FULL (-8)
#define BZ_CONFIG_ERROR (-9)
+#ifdef __ORCAC__
+typedef
+ struct {
+ char *next_in;
+ unsigned long avail_in;
+ unsigned long total_in_lo32;
+ unsigned long total_in_hi32;
+
+ char *next_out;
+ unsigned long avail_out;
+ unsigned long total_out_lo32;
+ unsigned long total_out_hi32;
+
+ void *state;
+
+ void *(*bzalloc)(void *,long,long);
+ void (*bzfree)(void *,void *);
+ void *opaque;
+ }
+ bz_stream;
+#else
typedef
struct {
char *next_in;
@@ -104,6 +125,7 @@ typedef
void *opaque;
}
bz_stream;
+#endif
#ifndef BZ_IMPORT
@@ -195,12 +217,21 @@ BZ_EXTERN void BZ_API(BZ2_bzReadGetUnused) (
int* nUnused
);
+#ifdef __ORCAC__
+BZ_EXTERN long BZ_API(BZ2_bzRead) (
+ int* bzerror,
+ BZFILE* b,
+ void* buf,
+ long len
+ );
+#else
BZ_EXTERN int BZ_API(BZ2_bzRead) (
int* bzerror,
BZFILE* b,
void* buf,
int len
);
+#endif
BZ_EXTERN BZFILE* BZ_API(BZ2_bzWriteOpen) (
int* bzerror,
@@ -210,13 +241,31 @@ BZ_EXTERN BZFILE* BZ_API(BZ2_bzWriteOpen) (
int workFactor
);
+#ifdef __ORCAC__
+BZ_EXTERN void BZ_API(BZ2_bzWrite) (
+ int* bzerror,
+ BZFILE* b,
+ void* buf,
+ long len
+ );
+#else
BZ_EXTERN void BZ_API(BZ2_bzWrite) (
int* bzerror,
BZFILE* b,
void* buf,
int len
);
+#endif
+#ifdef __ORCAC__
+BZ_EXTERN void BZ_API(BZ2_bzWriteClose) (
+ int* bzerror,
+ BZFILE* b,
+ int abandon,
+ unsigned long* nbytes_in,
+ unsigned long* nbytes_out
+ );
+#else
BZ_EXTERN void BZ_API(BZ2_bzWriteClose) (
int* bzerror,
BZFILE* b,
@@ -224,7 +273,19 @@ BZ_EXTERN void BZ_API(BZ2_bzWriteClose) (
unsigned int* nbytes_in,
unsigned int* nbytes_out
);
+#endif
+#ifdef __ORCAC__
+BZ_EXTERN void BZ_API(BZ2_bzWriteClose64) (
+ int* bzerror,
+ BZFILE* b,
+ int abandon,
+ unsigned long* nbytes_in_lo32,
+ unsigned long* nbytes_in_hi32,
+ unsigned long* nbytes_out_lo32,
+ unsigned long* nbytes_out_hi32
+ );
+#else
BZ_EXTERN void BZ_API(BZ2_bzWriteClose64) (
int* bzerror,
BZFILE* b,
@@ -235,10 +296,31 @@ BZ_EXTERN void BZ_API(BZ2_bzWriteClose64) (
unsigned int* nbytes_out_hi32
);
#endif
+#endif
/*-- Utility functions --*/
+#ifdef __ORCAC__
+BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffCompress) (
+ char* dest,
+ unsigned long* destLen,
+ char* source,
+ unsigned long sourceLen,
+ int blockSize100k,
+ int verbosity,
+ int workFactor
+ );
+
+BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffDecompress) (
+ char* dest,
+ unsigned long* destLen,
+ char* source,
+ unsigned long sourceLen,
+ int small,
+ int verbosity
+ );
+#else
BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffCompress) (
char* dest,
unsigned int* destLen,
@@ -257,6 +339,7 @@ BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffDecompress) (
int small,
int verbosity
);
+#endif
/*--
@@ -273,6 +356,9 @@ BZ_EXTERN const char * BZ_API(BZ2_bzlibVersion) (
void
);
+/* This stuff is disabled because it may be broken under GNO due to
+ 16-bit ints. It has not been modified to use longs where needed. */
+#ifndef __ORCAC__
#ifndef BZ_NO_STDIO
BZ_EXTERN BZFILE * BZ_API(BZ2_bzopen) (
const char *path,
@@ -309,6 +395,7 @@ BZ_EXTERN const char * BZ_API(BZ2_bzerror) (
int *errnum
);
#endif
+#endif /* not defined __ORCAC__ */
#ifdef __cplusplus
}
diff --git a/bzlib_private.h b/bzlib_private.h
index ff973c3..7320529 100644
--- a/bzlib_private.h
+++ b/bzlib_private.h
@@ -4,6 +4,8 @@
/*--- bzlib_private.h ---*/
/*-------------------------------------------------------------*/
+/*-- Modified for use under GNO by Stephen Heumann --*/
+
/*--
This file is a part of bzip2 and/or libbzip2, a program and
library for lossless, block-sorting data compression.
@@ -76,13 +78,30 @@
/*-- General stuff. --*/
+#ifdef __GNO__
+#define BZ_VERSION "1.0.2gs1, 07-Jun-2003"
+#else
#define BZ_VERSION "1.0.2, 30-Dec-2001"
+#endif
typedef char Char;
typedef unsigned char Bool;
typedef unsigned char UChar;
-typedef int Int32;
-typedef unsigned int UInt32;
+#ifdef __ORCAC__
+ typedef long Int32;
+ typedef unsigned long UInt32;
+# define Int32_FMT "%ld"
+# define UInt32_HEX8FMT "0x%8lx"
+# define UInt32_HEXFMT "0x%lx"
+# define Int32_6FMT "%6ld"
+#else
+ typedef int Int32;
+ typedef unsigned int UInt32;
+# define Int32_FMT "%d"
+# define UInt32_HEX8FMT "0x%8x"
+# define UInt32_HEXFMT "0x%x"
+# define Int32_6FMT "%6d"
+#endif /* defined __ORCAC__ */
typedef short Int16;
typedef unsigned short UInt16;
@@ -162,7 +181,11 @@ extern void bz_internal_error ( int errcode );
/*-- Stuff for randomising repetitive blocks. --*/
+#ifdef __ORCAC__
+extern Int16 BZ2_rNums[512];
+#else
extern Int32 BZ2_rNums[512];
+#endif
#define BZ_RAND_DECLS \
Int32 rNToGo; \
diff --git a/bzmore b/bzmore
deleted file mode 100644
index d314043..0000000
--- a/bzmore
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/sh
-
-# Bzmore wrapped for bzip2,
-# adapted from zmore by Philippe Troin for Debian GNU/Linux.
-
-PATH="/usr/bin:$PATH"; export PATH
-
-prog=`echo $0 | sed 's|.*/||'`
-case "$prog" in
- *less) more=less ;;
- *) more=more ;;
-esac
-
-if test "`echo -n a`" = "-n a"; then
- # looks like a SysV system:
- n1=''; n2='\c'
-else
- n1='-n'; n2=''
-fi
-oldtty=`stty -g 2>/dev/null`
-if stty -cbreak 2>/dev/null; then
- cb='cbreak'; ncb='-cbreak'
-else
- # 'stty min 1' resets eof to ^a on both SunOS and SysV!
- cb='min 1 -icanon'; ncb='icanon eof ^d'
-fi
-if test $? -eq 0 -a -n "$oldtty"; then
- trap 'stty $oldtty 2>/dev/null; exit' 0 2 3 5 10 13 15
-else
- trap 'stty $ncb echo 2>/dev/null; exit' 0 2 3 5 10 13 15
-fi
-
-if test $# = 0; then
- if test -t 0; then
- echo usage: $prog files...
- else
- bzip2 -cdfq | eval $more
- fi
-else
- FIRST=1
- for FILE
- do
- if test $FIRST -eq 0; then
- echo $n1 "--More--(Next file: $FILE)$n2"
- stty $cb -echo 2>/dev/null
- ANS=`dd bs=1 count=1 2>/dev/null`
- stty $ncb echo 2>/dev/null
- echo " "
- if test "$ANS" = 'e' -o "$ANS" = 'q'; then
- exit
- fi
- fi
- if test "$ANS" != 's'; then
- echo "------> $FILE <------"
- bzip2 -cdfq "$FILE" | eval $more
- fi
- if test -t; then
- FIRST=0
- fi
- done
-fi
diff --git a/bzmore.1 b/bzmore.1
deleted file mode 100644
index b437d3b..0000000
--- a/bzmore.1
+++ /dev/null
@@ -1,152 +0,0 @@
-.\"Shamelessly copied from zmore.1 by Philippe Troin
-.\"for Debian GNU/Linux
-.TH BZMORE 1
-.SH NAME
-bzmore, bzless \- file perusal filter for crt viewing of bzip2 compressed text
-.SH SYNOPSIS
-.B bzmore
-[ name ... ]
-.br
-.B bzless
-[ name ... ]
-.SH NOTE
-In the following description,
-.I bzless
-and
-.I less
-can be used interchangeably with
-.I bzmore
-and
-.I more.
-.SH DESCRIPTION
-.I Bzmore
-is a filter which allows examination of compressed or plain text files
-one screenful at a time on a soft-copy terminal.
-.I bzmore
-works on files compressed with
-.I bzip2
-and also on uncompressed files.
-If a file does not exist,
-.I bzmore
-looks for a file of the same name with the addition of a .bz2 suffix.
-.PP
-.I Bzmore
-normally pauses after each screenful, printing --More--
-at the bottom of the screen.
-If the user then types a carriage return, one more line is displayed.
-If the user hits a space,
-another screenful is displayed. Other possibilities are enumerated later.
-.PP
-.I Bzmore
-looks in the file
-.I /etc/termcap
-to determine terminal characteristics,
-and to determine the default window size.
-On a terminal capable of displaying 24 lines,
-the default window size is 22 lines.
-Other sequences which may be typed when
-.I bzmore
-pauses, and their effects, are as follows (\fIi\fP is an optional integer
-argument, defaulting to 1) :
-.PP
-.IP \fIi\|\fP
-display
-.I i
-more lines, (or another screenful if no argument is given)
-.PP
-.IP ^D
-display 11 more lines (a ``scroll'').
-If
-.I i
-is given, then the scroll size is set to \fIi\|\fP.
-.PP
-.IP d
-same as ^D (control-D)
-.PP
-.IP \fIi\|\fPz
-same as typing a space except that \fIi\|\fP, if present, becomes the new
-window size. Note that the window size reverts back to the default at the
-end of the current file.
-.PP
-.IP \fIi\|\fPs
-skip \fIi\|\fP lines and print a screenful of lines
-.PP
-.IP \fIi\|\fPf
-skip \fIi\fP screenfuls and print a screenful of lines
-.PP
-.IP "q or Q"
-quit reading the current file; go on to the next (if any)
-.PP
-.IP "e or q"
-When the prompt --More--(Next file:
-.IR file )
-is printed, this command causes bzmore to exit.
-.PP
-.IP s
-When the prompt --More--(Next file:
-.IR file )
-is printed, this command causes bzmore to skip the next file and continue.
-.PP
-.IP =
-Display the current line number.
-.PP
-.IP \fIi\|\fP/expr
-search for the \fIi\|\fP-th occurrence of the regular expression \fIexpr.\fP
-If the pattern is not found,
-.I bzmore
-goes on to the next file (if any).
-Otherwise, a screenful is displayed, starting two lines before the place
-where the expression was found.
-The user's erase and kill characters may be used to edit the regular
-expression.
-Erasing back past the first column cancels the search command.
-.PP
-.IP \fIi\|\fPn
-search for the \fIi\|\fP-th occurrence of the last regular expression entered.
-.PP
-.IP !command
-invoke a shell with \fIcommand\|\fP.
-The character `!' in "command" are replaced with the
-previous shell command. The sequence "\\!" is replaced by "!".
-.PP
-.IP ":q or :Q"
-quit reading the current file; go on to the next (if any)
-(same as q or Q).
-.PP
-.IP .
-(dot) repeat the previous command.
-.PP
-The commands take effect immediately, i.e., it is not necessary to
-type a carriage return.
-Up to the time when the command character itself is given,
-the user may hit the line kill character to cancel the numerical
-argument being formed.
-In addition, the user may hit the erase character to redisplay the
---More-- message.
-.PP
-At any time when output is being sent to the terminal, the user can
-hit the quit key (normally control\-\\).
-.I Bzmore
-will stop sending output, and will display the usual --More--
-prompt.
-The user may then enter one of the above commands in the normal manner.
-Unfortunately, some output is lost when this is done, due to the
-fact that any characters waiting in the terminal's output queue
-are flushed when the quit signal occurs.
-.PP
-The terminal is set to
-.I noecho
-mode by this program so that the output can be continuous.
-What you type will thus not show on your terminal, except for the / and !
-commands.
-.PP
-If the standard output is not a teletype, then
-.I bzmore
-acts just like
-.I bzcat,
-except that a header is printed before each file.
-.SH FILES
-.DT
-/etc/termcap Terminal data base
-.SH "SEE ALSO"
-more(1), less(1), bzip2(1), bzdiff(1), bzgrep(1)
diff --git a/compress.c b/compress.c
deleted file mode 100644
index 56501c1..0000000
--- a/compress.c
+++ /dev/null
@@ -1,714 +0,0 @@
-
-/*-------------------------------------------------------------*/
-/*--- Compression machinery (not incl block sorting) ---*/
-/*--- compress.c ---*/
-/*-------------------------------------------------------------*/
-
-/*--
- This file is a part of bzip2 and/or libbzip2, a program and
- library for lossless, block-sorting data compression.
-
- Copyright (C) 1996-2002 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
- bzip2/libbzip2 version 1.0 of 21 March 2000
-
- This program is based on (at least) the work of:
- Mike Burrows
- David Wheeler
- Peter Fenwick
- Alistair Moffat
- Radford Neal
- Ian H. Witten
- Robert Sedgewick
- Jon L. Bentley
-
- For more information on these sources, see the manual.
---*/
-
-/*--
- CHANGES
- ~~~~~~~
- 0.9.0 -- original version.
-
- 0.9.0a/b -- no changes in this file.
-
- 0.9.0c
- * changed setting of nGroups in sendMTFValues() so as to
- do a bit better on small files
---*/
-
-#include "bzlib_private.h"
-
-
-/*---------------------------------------------------*/
-/*--- Bit stream I/O ---*/
-/*---------------------------------------------------*/
-
-/*---------------------------------------------------*/
-void BZ2_bsInitWrite ( EState* s )
-{
- s->bsLive = 0;
- s->bsBuff = 0;
-}
-
-
-/*---------------------------------------------------*/
-static
-void bsFinishWrite ( EState* s )
-{
- while (s->bsLive > 0) {
- s->zbits[s->numZ] = (UChar)(s->bsBuff >> 24);
- s->numZ++;
- s->bsBuff <<= 8;
- s->bsLive -= 8;
- }
-}
-
-
-/*---------------------------------------------------*/
-#define bsNEEDW(nz) \
-{ \
- while (s->bsLive >= 8) { \
- s->zbits[s->numZ] \
- = (UChar)(s->bsBuff >> 24); \
- s->numZ++; \
- s->bsBuff <<= 8; \
- s->bsLive -= 8; \
- } \
-}
-
-
-/*---------------------------------------------------*/
-static
-__inline__
-void bsW ( EState* s, Int32 n, UInt32 v )
-{
- bsNEEDW ( n );
- s->bsBuff |= (v << (32 - s->bsLive - n));
- s->bsLive += n;
-}
-
-
-/*---------------------------------------------------*/
-static
-void bsPutUInt32 ( EState* s, UInt32 u )
-{
- bsW ( s, 8, (u >> 24) & 0xffL );
- bsW ( s, 8, (u >> 16) & 0xffL );
- bsW ( s, 8, (u >> 8) & 0xffL );
- bsW ( s, 8, u & 0xffL );
-}
-
-
-/*---------------------------------------------------*/
-static
-void bsPutUChar ( EState* s, UChar c )
-{
- bsW( s, 8, (UInt32)c );
-}
-
-
-/*---------------------------------------------------*/
-/*--- The back end proper ---*/
-/*---------------------------------------------------*/
-
-/*---------------------------------------------------*/
-static
-void makeMaps_e ( EState* s )
-{
- Int32 i;
- s->nInUse = 0;
- for (i = 0; i < 256; i++)
- if (s->inUse[i]) {
- s->unseqToSeq[i] = s->nInUse;
- s->nInUse++;
- }
-}
-
-
-/*---------------------------------------------------*/
-static
-void generateMTFValues ( EState* s )
-{
- UChar yy[256];
- Int32 i, j;
- Int32 zPend;
- Int32 wr;
- Int32 EOB;
-
- /*
- After sorting (eg, here),
- s->arr1 [ 0 .. s->nblock-1 ] holds sorted order,
- and
- ((UChar*)s->arr2) [ 0 .. s->nblock-1 ]
- holds the original block data.
-
- The first thing to do is generate the MTF values,
- and put them in
- ((UInt16*)s->arr1) [ 0 .. s->nblock-1 ].
- Because there are strictly fewer or equal MTF values
- than block values, ptr values in this area are overwritten
- with MTF values only when they are no longer needed.
-
- The final compressed bitstream is generated into the
- area starting at
- (UChar*) (&((UChar*)s->arr2)[s->nblock])
-
- These storage aliases are set up in bzCompressInit(),
- except for the last one, which is arranged in
- compressBlock().
- */
- UInt32* ptr = s->ptr;
- UChar* block = s->block;
- UInt16* mtfv = s->mtfv;
-
- makeMaps_e ( s );
- EOB = s->nInUse+1;
-
- for (i = 0; i <= EOB; i++) s->mtfFreq[i] = 0;
-
- wr = 0;
- zPend = 0;
- for (i = 0; i < s->nInUse; i++) yy[i] = (UChar) i;
-
- for (i = 0; i < s->nblock; i++) {
- UChar ll_i;
- AssertD ( wr <= i, "generateMTFValues(1)" );
- j = ptr[i]-1; if (j < 0) j += s->nblock;
- ll_i = s->unseqToSeq[block[j]];
- AssertD ( ll_i < s->nInUse, "generateMTFValues(2a)" );
-
- if (yy[0] == ll_i) {
- zPend++;
- } else {
-
- if (zPend > 0) {
- zPend--;
- while (True) {
- if (zPend & 1) {
- mtfv[wr] = BZ_RUNB; wr++;
- s->mtfFreq[BZ_RUNB]++;
- } else {
- mtfv[wr] = BZ_RUNA; wr++;
- s->mtfFreq[BZ_RUNA]++;
- }
- if (zPend < 2) break;
- zPend = (zPend - 2) / 2;
- };
- zPend = 0;
- }
- {
- register UChar rtmp;
- register UChar* ryy_j;
- register UChar rll_i;
- rtmp = yy[1];
- yy[1] = yy[0];
- ryy_j = &(yy[1]);
- rll_i = ll_i;
- while ( rll_i != rtmp ) {
- register UChar rtmp2;
- ryy_j++;
- rtmp2 = rtmp;
- rtmp = *ryy_j;
- *ryy_j = rtmp2;
- };
- yy[0] = rtmp;
- j = ryy_j - &(yy[0]);
- mtfv[wr] = j+1; wr++; s->mtfFreq[j+1]++;
- }
-
- }
- }
-
- if (zPend > 0) {
- zPend--;
- while (True) {
- if (zPend & 1) {
- mtfv[wr] = BZ_RUNB; wr++;
- s->mtfFreq[BZ_RUNB]++;
- } else {
- mtfv[wr] = BZ_RUNA; wr++;
- s->mtfFreq[BZ_RUNA]++;
- }
- if (zPend < 2) break;
- zPend = (zPend - 2) / 2;
- };
- zPend = 0;
- }
-
- mtfv[wr] = EOB; wr++; s->mtfFreq[EOB]++;
-
- s->nMTF = wr;
-}
-
-
-/*---------------------------------------------------*/
-#define BZ_LESSER_ICOST 0
-#define BZ_GREATER_ICOST 15
-
-static
-void sendMTFValues ( EState* s )
-{
- Int32 v, t, i, j, gs, ge, totc, bt, bc, iter;
- Int32 nSelectors, alphaSize, minLen, maxLen, selCtr;
- Int32 nGroups, nBytes;
-
- /*--
- UChar len [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
- is a global since the decoder also needs it.
-
- Int32 code[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
- Int32 rfreq[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
- are also globals only used in this proc.
- Made global to keep stack frame size small.
- --*/
-
-
- UInt16 cost[BZ_N_GROUPS];
- Int32 fave[BZ_N_GROUPS];
-
- UInt16* mtfv = s->mtfv;
-
- if (s->verbosity >= 3)
- VPrintf3( " %d in block, %d after MTF & 1-2 coding, "
- "%d+2 syms in use\n",
- s->nblock, s->nMTF, s->nInUse );
-
- alphaSize = s->nInUse+2;
- for (t = 0; t < BZ_N_GROUPS; t++)
- for (v = 0; v < alphaSize; v++)
- s->len[t][v] = BZ_GREATER_ICOST;
-
- /*--- Decide how many coding tables to use ---*/
- AssertH ( s->nMTF > 0, 3001 );
- if (s->nMTF < 200) nGroups = 2; else
- if (s->nMTF < 600) nGroups = 3; else
- if (s->nMTF < 1200) nGroups = 4; else
- if (s->nMTF < 2400) nGroups = 5; else
- nGroups = 6;
-
- /*--- Generate an initial set of coding tables ---*/
- {
- Int32 nPart, remF, tFreq, aFreq;
-
- nPart = nGroups;
- remF = s->nMTF;
- gs = 0;
- while (nPart > 0) {
- tFreq = remF / nPart;
- ge = gs-1;
- aFreq = 0;
- while (aFreq < tFreq && ge < alphaSize-1) {
- ge++;
- aFreq += s->mtfFreq[ge];
- }
-
- if (ge > gs
- && nPart != nGroups && nPart != 1
- && ((nGroups-nPart) % 2 == 1)) {
- aFreq -= s->mtfFreq[ge];
- ge--;
- }
-
- if (s->verbosity >= 3)
- VPrintf5( " initial group %d, [%d .. %d], "
- "has %d syms (%4.1f%%)\n",
- nPart, gs, ge, aFreq,
- (100.0 * (float)aFreq) / (float)(s->nMTF) );
-
- for (v = 0; v < alphaSize; v++)
- if (v >= gs && v <= ge)
- s->len[nPart-1][v] = BZ_LESSER_ICOST; else
- s->len[nPart-1][v] = BZ_GREATER_ICOST;
-
- nPart--;
- gs = ge+1;
- remF -= aFreq;
- }
- }
-
- /*---
- Iterate up to BZ_N_ITERS times to improve the tables.
- ---*/
- for (iter = 0; iter < BZ_N_ITERS; iter++) {
-
- for (t = 0; t < nGroups; t++) fave[t] = 0;
-
- for (t = 0; t < nGroups; t++)
- for (v = 0; v < alphaSize; v++)
- s->rfreq[t][v] = 0;
-
- /*---
- Set up an auxiliary length table which is used to fast-track
- the common case (nGroups == 6).
- ---*/
- if (nGroups == 6) {
- for (v = 0; v < alphaSize; v++) {
- s->len_pack[v][0] = (s->len[1][v] << 16) | s->len[0][v];
- s->len_pack[v][1] = (s->len[3][v] << 16) | s->len[2][v];
- s->len_pack[v][2] = (s->len[5][v] << 16) | s->len[4][v];
- }
- }
-
- nSelectors = 0;
- totc = 0;
- gs = 0;
- while (True) {
-
- /*--- Set group start & end marks. --*/
- if (gs >= s->nMTF) break;
- ge = gs + BZ_G_SIZE - 1;
- if (ge >= s->nMTF) ge = s->nMTF-1;
-
- /*--
- Calculate the cost of this group as coded
- by each of the coding tables.
- --*/
- for (t = 0; t < nGroups; t++) cost[t] = 0;
-
- if (nGroups == 6 && 50 == ge-gs+1) {
- /*--- fast track the common case ---*/
- register UInt32 cost01, cost23, cost45;
- register UInt16 icv;
- cost01 = cost23 = cost45 = 0;
-
-# define BZ_ITER(nn) \
- icv = mtfv[gs+(nn)]; \
- cost01 += s->len_pack[icv][0]; \
- cost23 += s->len_pack[icv][1]; \
- cost45 += s->len_pack[icv][2]; \
-
- BZ_ITER(0); BZ_ITER(1); BZ_ITER(2); BZ_ITER(3); BZ_ITER(4);
- BZ_ITER(5); BZ_ITER(6); BZ_ITER(7); BZ_ITER(8); BZ_ITER(9);
- BZ_ITER(10); BZ_ITER(11); BZ_ITER(12); BZ_ITER(13); BZ_ITER(14);
- BZ_ITER(15); BZ_ITER(16); BZ_ITER(17); BZ_ITER(18); BZ_ITER(19);
- BZ_ITER(20); BZ_ITER(21); BZ_ITER(22); BZ_ITER(23); BZ_ITER(24);
- BZ_ITER(25); BZ_ITER(26); BZ_ITER(27); BZ_ITER(28); BZ_ITER(29);
- BZ_ITER(30); BZ_ITER(31); BZ_ITER(32); BZ_ITER(33); BZ_ITER(34);
- BZ_ITER(35); BZ_ITER(36); BZ_ITER(37); BZ_ITER(38); BZ_ITER(39);
- BZ_ITER(40); BZ_ITER(41); BZ_ITER(42); BZ_ITER(43); BZ_ITER(44);
- BZ_ITER(45); BZ_ITER(46); BZ_ITER(47); BZ_ITER(48); BZ_ITER(49);
-
-# undef BZ_ITER
-
- cost[0] = cost01 & 0xffff; cost[1] = cost01 >> 16;
- cost[2] = cost23 & 0xffff; cost[3] = cost23 >> 16;
- cost[4] = cost45 & 0xffff; cost[5] = cost45 >> 16;
-
- } else {
- /*--- slow version which correctly handles all situations ---*/
- for (i = gs; i <= ge; i++) {
- UInt16 icv = mtfv[i];
- for (t = 0; t < nGroups; t++) cost[t] += s->len[t][icv];
- }
- }
-
- /*--
- Find the coding table which is best for this group,
- and record its identity in the selector table.
- --*/
- bc = 999999999; bt = -1;
- for (t = 0; t < nGroups; t++)
- if (cost[t] < bc) { bc = cost[t]; bt = t; };
- totc += bc;
- fave[bt]++;
- s->selector[nSelectors] = bt;
- nSelectors++;
-
- /*--
- Increment the symbol frequencies for the selected table.
- --*/
- if (nGroups == 6 && 50 == ge-gs+1) {
- /*--- fast track the common case ---*/
-
-# define BZ_ITUR(nn) s->rfreq[bt][ mtfv[gs+(nn)] ]++
-
- BZ_ITUR(0); BZ_ITUR(1); BZ_ITUR(2); BZ_ITUR(3); BZ_ITUR(4);
- BZ_ITUR(5); BZ_ITUR(6); BZ_ITUR(7); BZ_ITUR(8); BZ_ITUR(9);
- BZ_ITUR(10); BZ_ITUR(11); BZ_ITUR(12); BZ_ITUR(13); BZ_ITUR(14);
- BZ_ITUR(15); BZ_ITUR(16); BZ_ITUR(17); BZ_ITUR(18); BZ_ITUR(19);
- BZ_ITUR(20); BZ_ITUR(21); BZ_ITUR(22); BZ_ITUR(23); BZ_ITUR(24);
- BZ_ITUR(25); BZ_ITUR(26); BZ_ITUR(27); BZ_ITUR(28); BZ_ITUR(29);
- BZ_ITUR(30); BZ_ITUR(31); BZ_ITUR(32); BZ_ITUR(33); BZ_ITUR(34);
- BZ_ITUR(35); BZ_ITUR(36); BZ_ITUR(37); BZ_ITUR(38); BZ_ITUR(39);
- BZ_ITUR(40); BZ_ITUR(41); BZ_ITUR(42); BZ_ITUR(43); BZ_ITUR(44);
- BZ_ITUR(45); BZ_ITUR(46); BZ_ITUR(47); BZ_ITUR(48); BZ_ITUR(49);
-
-# undef BZ_ITUR
-
- } else {
- /*--- slow version which correctly handles all situations ---*/
- for (i = gs; i <= ge; i++)
- s->rfreq[bt][ mtfv[i] ]++;
- }
-
- gs = ge+1;
- }
- if (s->verbosity >= 3) {
- VPrintf2 ( " pass %d: size is %d, grp uses are ",
- iter+1, totc/8 );
- for (t = 0; t < nGroups; t++)
- VPrintf1 ( "%d ", fave[t] );
- VPrintf0 ( "\n" );
- }
-
- /*--
- Recompute the tables based on the accumulated frequencies.
- --*/
- for (t = 0; t < nGroups; t++)
- BZ2_hbMakeCodeLengths ( &(s->len[t][0]), &(s->rfreq[t][0]),
- alphaSize, 20 );
- }
-
-
- AssertH( nGroups < 8, 3002 );
- AssertH( nSelectors < 32768 &&
- nSelectors <= (2 + (900000 / BZ_G_SIZE)),
- 3003 );
-
-
- /*--- Compute MTF values for the selectors. ---*/
- {
- UChar pos[BZ_N_GROUPS], ll_i, tmp2, tmp;
- for (i = 0; i < nGroups; i++) pos[i] = i;
- for (i = 0; i < nSelectors; i++) {
- ll_i = s->selector[i];
- j = 0;
- tmp = pos[j];
- while ( ll_i != tmp ) {
- j++;
- tmp2 = tmp;
- tmp = pos[j];
- pos[j] = tmp2;
- };
- pos[0] = tmp;
- s->selectorMtf[i] = j;
- }
- };
-
- /*--- Assign actual codes for the tables. --*/
- for (t = 0; t < nGroups; t++) {
- minLen = 32;
- maxLen = 0;
- for (i = 0; i < alphaSize; i++) {
- if (s->len[t][i] > maxLen) maxLen = s->len[t][i];
- if (s->len[t][i] < minLen) minLen = s->len[t][i];
- }
- AssertH ( !(maxLen > 20), 3004 );
- AssertH ( !(minLen < 1), 3005 );
- BZ2_hbAssignCodes ( &(s->code[t][0]), &(s->len[t][0]),
- minLen, maxLen, alphaSize );
- }
-
- /*--- Transmit the mapping table. ---*/
- {
- Bool inUse16[16];
- for (i = 0; i < 16; i++) {
- inUse16[i] = False;
- for (j = 0; j < 16; j++)
- if (s->inUse[i * 16 + j]) inUse16[i] = True;
- }
-
- nBytes = s->numZ;
- for (i = 0; i < 16; i++)
- if (inUse16[i]) bsW(s,1,1); else bsW(s,1,0);
-
- for (i = 0; i < 16; i++)
- if (inUse16[i])
- for (j = 0; j < 16; j++) {
- if (s->inUse[i * 16 + j]) bsW(s,1,1); else bsW(s,1,0);
- }
-
- if (s->verbosity >= 3)
- VPrintf1( " bytes: mapping %d, ", s->numZ-nBytes );
- }
-
- /*--- Now the selectors. ---*/
- nBytes = s->numZ;
- bsW ( s, 3, nGroups );
- bsW ( s, 15, nSelectors );
- for (i = 0; i < nSelectors; i++) {
- for (j = 0; j < s->selectorMtf[i]; j++) bsW(s,1,1);
- bsW(s,1,0);
- }
- if (s->verbosity >= 3)
- VPrintf1( "selectors %d, ", s->numZ-nBytes );
-
- /*--- Now the coding tables. ---*/
- nBytes = s->numZ;
-
- for (t = 0; t < nGroups; t++) {
- Int32 curr = s->len[t][0];
- bsW ( s, 5, curr );
- for (i = 0; i < alphaSize; i++) {
- while (curr < s->len[t][i]) { bsW(s,2,2); curr++; /* 10 */ };
- while (curr > s->len[t][i]) { bsW(s,2,3); curr--; /* 11 */ };
- bsW ( s, 1, 0 );
- }
- }
-
- if (s->verbosity >= 3)
- VPrintf1 ( "code lengths %d, ", s->numZ-nBytes );
-
- /*--- And finally, the block data proper ---*/
- nBytes = s->numZ;
- selCtr = 0;
- gs = 0;
- while (True) {
- if (gs >= s->nMTF) break;
- ge = gs + BZ_G_SIZE - 1;
- if (ge >= s->nMTF) ge = s->nMTF-1;
- AssertH ( s->selector[selCtr] < nGroups, 3006 );
-
- if (nGroups == 6 && 50 == ge-gs+1) {
- /*--- fast track the common case ---*/
- UInt16 mtfv_i;
- UChar* s_len_sel_selCtr
- = &(s->len[s->selector[selCtr]][0]);
- Int32* s_code_sel_selCtr
- = &(s->code[s->selector[selCtr]][0]);
-
-# define BZ_ITAH(nn) \
- mtfv_i = mtfv[gs+(nn)]; \
- bsW ( s, \
- s_len_sel_selCtr[mtfv_i], \
- s_code_sel_selCtr[mtfv_i] )
-
- BZ_ITAH(0); BZ_ITAH(1); BZ_ITAH(2); BZ_ITAH(3); BZ_ITAH(4);
- BZ_ITAH(5); BZ_ITAH(6); BZ_ITAH(7); BZ_ITAH(8); BZ_ITAH(9);
- BZ_ITAH(10); BZ_ITAH(11); BZ_ITAH(12); BZ_ITAH(13); BZ_ITAH(14);
- BZ_ITAH(15); BZ_ITAH(16); BZ_ITAH(17); BZ_ITAH(18); BZ_ITAH(19);
- BZ_ITAH(20); BZ_ITAH(21); BZ_ITAH(22); BZ_ITAH(23); BZ_ITAH(24);
- BZ_ITAH(25); BZ_ITAH(26); BZ_ITAH(27); BZ_ITAH(28); BZ_ITAH(29);
- BZ_ITAH(30); BZ_ITAH(31); BZ_ITAH(32); BZ_ITAH(33); BZ_ITAH(34);
- BZ_ITAH(35); BZ_ITAH(36); BZ_ITAH(37); BZ_ITAH(38); BZ_ITAH(39);
- BZ_ITAH(40); BZ_ITAH(41); BZ_ITAH(42); BZ_ITAH(43); BZ_ITAH(44);
- BZ_ITAH(45); BZ_ITAH(46); BZ_ITAH(47); BZ_ITAH(48); BZ_ITAH(49);
-
-# undef BZ_ITAH
-
- } else {
- /*--- slow version which correctly handles all situations ---*/
- for (i = gs; i <= ge; i++) {
- bsW ( s,
- s->len [s->selector[selCtr]] [mtfv[i]],
- s->code [s->selector[selCtr]] [mtfv[i]] );
- }
- }
-
-
- gs = ge+1;
- selCtr++;
- }
- AssertH( selCtr == nSelectors, 3007 );
-
- if (s->verbosity >= 3)
- VPrintf1( "codes %d\n", s->numZ-nBytes );
-}
-
-
-/*---------------------------------------------------*/
-void BZ2_compressBlock ( EState* s, Bool is_last_block )
-{
- if (s->nblock > 0) {
-
- BZ_FINALISE_CRC ( s->blockCRC );
- s->combinedCRC = (s->combinedCRC << 1) | (s->combinedCRC >> 31);
- s->combinedCRC ^= s->blockCRC;
- if (s->blockNo > 1) s->numZ = 0;
-
- if (s->verbosity >= 2)
- VPrintf4( " block %d: crc = 0x%8x, "
- "combined CRC = 0x%8x, size = %d\n",
- s->blockNo, s->blockCRC, s->combinedCRC, s->nblock );
-
- BZ2_blockSort ( s );
- }
-
- s->zbits = (UChar*) (&((UChar*)s->arr2)[s->nblock]);
-
- /*-- If this is the first block, create the stream header. --*/
- if (s->blockNo == 1) {
- BZ2_bsInitWrite ( s );
- bsPutUChar ( s, BZ_HDR_B );
- bsPutUChar ( s, BZ_HDR_Z );
- bsPutUChar ( s, BZ_HDR_h );
- bsPutUChar ( s, (UChar)(BZ_HDR_0 + s->blockSize100k) );
- }
-
- if (s->nblock > 0) {
-
- bsPutUChar ( s, 0x31 ); bsPutUChar ( s, 0x41 );
- bsPutUChar ( s, 0x59 ); bsPutUChar ( s, 0x26 );
- bsPutUChar ( s, 0x53 ); bsPutUChar ( s, 0x59 );
-
- /*-- Now the block's CRC, so it is in a known place. --*/
- bsPutUInt32 ( s, s->blockCRC );
-
- /*--
- Now a single bit indicating (non-)randomisation.
- As of version 0.9.5, we use a better sorting algorithm
- which makes randomisation unnecessary. So always set
- the randomised bit to 'no'. Of course, the decoder
- still needs to be able to handle randomised blocks
- so as to maintain backwards compatibility with
- older versions of bzip2.
- --*/
- bsW(s,1,0);
-
- bsW ( s, 24, s->origPtr );
- generateMTFValues ( s );
- sendMTFValues ( s );
- }
-
-
- /*-- If this is the last block, add the stream trailer. --*/
- if (is_last_block) {
-
- bsPutUChar ( s, 0x17 ); bsPutUChar ( s, 0x72 );
- bsPutUChar ( s, 0x45 ); bsPutUChar ( s, 0x38 );
- bsPutUChar ( s, 0x50 ); bsPutUChar ( s, 0x90 );
- bsPutUInt32 ( s, s->combinedCRC );
- if (s->verbosity >= 2)
- VPrintf1( " final combined CRC = 0x%x\n ", s->combinedCRC );
- bsFinishWrite ( s );
- }
-}
-
-
-/*-------------------------------------------------------------*/
-/*--- end compress.c ---*/
-/*-------------------------------------------------------------*/
diff --git a/decompress.c b/decompress.c
index e921347..66b5ef8 100644
--- a/decompress.c
+++ b/decompress.c
@@ -4,6 +4,11 @@
/*--- decompress.c ---*/
/*-------------------------------------------------------------*/
+/*-- Modified for use under GNO by Stephen Heumann --*/
+#ifdef __ORCAC__
+segment "decompress", dynamic;
+#endif
+
/*--
This file is a part of bzip2 and/or libbzip2, a program and
library for lossless, block-sorting data compression.
@@ -80,6 +85,36 @@ void makeMaps_d ( DState* s )
#define RETURN(rrr) \
{ retVal = rrr; goto save_state_and_return; };
+#ifdef __ORCAC__
+void getBitsOrcaHack(DState *s) {
+ s->bsBuff \
+ = (s->bsBuff << 8) | \
+ ((UInt32) \
+ (*((UChar*)(s->strm->next_in)))); \
+ s->bsLive += 8; \
+ s->strm->next_in++; \
+ s->strm->avail_in--; \
+ s->strm->total_in_lo32++; \
+ if (s->strm->total_in_lo32 == 0) \
+ s->strm->total_in_hi32++; \
+ }
+
+#define GET_BITS(lll,vvv,nnn) \
+ case lll: s->state = lll; \
+ while (True) { \
+ if (s->bsLive >= nnn) { \
+ UInt32 v; \
+ v = (s->bsBuff >> \
+ (s->bsLive-nnn)) & ((1 << nnn)-1); \
+ s->bsLive -= nnn; \
+ vvv = v; \
+ break; \
+ } \
+ if (s->strm->avail_in == 0) RETURN(BZ_OK); \
+ getBitsOrcaHack(s); \
+ }
+
+#else
#define GET_BITS(lll,vvv,nnn) \
case lll: s->state = lll; \
while (True) { \
@@ -103,6 +138,7 @@ void makeMaps_d ( DState* s )
if (s->strm->total_in_lo32 == 0) \
s->strm->total_in_hi32++; \
}
+#endif
#define GET_UCHAR(lll,uuu) \
GET_BITS(lll,uuu,8)
@@ -141,7 +177,6 @@ void makeMaps_d ( DState* s )
lval = gPerm[zvec - gBase[zn]]; \
}
-
/*---------------------------------------------------*/
Int32 BZ2_decompress ( DState* s )
{
@@ -276,7 +311,7 @@ Int32 BZ2_decompress ( DState* s )
s->currBlockNo++;
if (s->verbosity >= 2)
- VPrintf1 ( "\n [%d: huff+mtf ", s->currBlockNo );
+ VPrintf1 ( "\n [" Int32_FMT ": huff+mtf ", s->currBlockNo );
s->storedBlockCRC = 0;
GET_UCHAR(BZ_X_BCRC_1, uc);
@@ -341,8 +376,13 @@ Int32 BZ2_decompress ( DState* s )
/*--- Undo the MTF values for the selectors. ---*/
{
+#ifdef __ORCAC__
+ UChar pos[BZ_N_GROUPS] = { 0, 1, 2, 3, 4, 5 };
+ UChar tmp, v;
+#else
UChar pos[BZ_N_GROUPS], tmp, v;
for (v = 0; v < nGroups; v++) pos[v] = v;
+#endif
for (i = 0; i < nSelectors; i++) {
v = s->selectorMtf[i];
@@ -435,14 +475,22 @@ Int32 BZ2_decompress ( DState* s )
if (s->smallDecompress)
while (es > 0) {
if (nblock >= nblockMAX) RETURN(BZ_DATA_ERROR);
+#ifdef __ORCAC__
+ *((UInt16 *)(s->ll16)+nblock) = (UInt16)uc;
+#else
s->ll16[nblock] = (UInt16)uc;
+#endif
nblock++;
es--;
}
else
while (es > 0) {
if (nblock >= nblockMAX) RETURN(BZ_DATA_ERROR);
+#ifdef __ORCAC__
+ *((UInt32 *)(s->tt)+nblock) = (UInt32)uc;
+#else
s->tt[nblock] = (UInt32)uc;
+#endif
nblock++;
es--;
};
@@ -509,8 +557,13 @@ Int32 BZ2_decompress ( DState* s )
s->unzftab[s->seqToUnseq[uc]]++;
if (s->smallDecompress)
+#ifdef __ORCAC__
+ *((UInt16 *)(s->ll16)+nblock) = (UInt16)(s->seqToUnseq[uc]); else
+ *((UInt32 *)(s->tt)+nblock) = (UInt32)(s->seqToUnseq[uc]);
+#else
s->ll16[nblock] = (UInt16)(s->seqToUnseq[uc]); else
s->tt[nblock] = (UInt32)(s->seqToUnseq[uc]);
+#endif
nblock++;
GET_MTF_VAL(BZ_X_MTF_5, BZ_X_MTF_6, nextSym);
@@ -542,7 +595,11 @@ Int32 BZ2_decompress ( DState* s )
/*-- compute the T vector --*/
for (i = 0; i < nblock; i++) {
+#ifdef __ORCAC__
+ uc = (UChar) *((UInt16 *)(s->ll16)+i);
+#else
uc = (UChar)(s->ll16[i]);
+#endif
SET_LL(i, s->cftabCopy[uc]);
s->cftabCopy[uc]++;
}
@@ -572,12 +629,21 @@ Int32 BZ2_decompress ( DState* s )
/*-- compute the T^(-1) vector --*/
for (i = 0; i < nblock; i++) {
+#ifdef __ORCAC__
+ uc = (UChar)((*((UInt32 *)(s->tt)+i)) & 0xff);
+ *((UInt32 *)(s->tt)+(s->cftab[uc])) |= (i << 8);
+#else
uc = (UChar)(s->tt[i] & 0xff);
s->tt[s->cftab[uc]] |= (i << 8);
+#endif
s->cftab[uc]++;
}
+#ifdef __ORCAC__
+ s->tPos = (*((UInt32 *)(s->tt)+(s->origPtr))) >> 8;
+#else
s->tPos = s->tt[s->origPtr] >> 8;
+#endif
s->nblock_used = 0;
if (s->blockRandomised) {
BZ_RAND_INIT_MASK;
diff --git a/dlltest.c b/dlltest.c
deleted file mode 100644
index 2d7dcca..0000000
--- a/dlltest.c
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- minibz2
- libbz2.dll test program.
- by Yoshioka Tsuneo(QWF00133@nifty.ne.jp/tsuneo-y@is.aist-nara.ac.jp)
- This file is Public Domain.
- welcome any email to me.
-
- usage: minibz2 [-d] [-{1,2,..9}] [[srcfilename] destfilename]
-*/
-
-#define BZ_IMPORT
-#include
-#include
-#include "bzlib.h"
-#ifdef _WIN32
-#include
-#endif
-
-
-#ifdef _WIN32
-
-#define BZ2_LIBNAME "libbz2-1.0.2.DLL"
-
-#include
-static int BZ2DLLLoaded = 0;
-static HINSTANCE BZ2DLLhLib;
-int BZ2DLLLoadLibrary(void)
-{
- HINSTANCE hLib;
-
- if(BZ2DLLLoaded==1){return 0;}
- hLib=LoadLibrary(BZ2_LIBNAME);
- if(hLib == NULL){
- fprintf(stderr,"Can't load %s\n",BZ2_LIBNAME);
- return -1;
- }
- BZ2_bzlibVersion=GetProcAddress(hLib,"BZ2_bzlibVersion");
- BZ2_bzopen=GetProcAddress(hLib,"BZ2_bzopen");
- BZ2_bzdopen=GetProcAddress(hLib,"BZ2_bzdopen");
- BZ2_bzread=GetProcAddress(hLib,"BZ2_bzread");
- BZ2_bzwrite=GetProcAddress(hLib,"BZ2_bzwrite");
- BZ2_bzflush=GetProcAddress(hLib,"BZ2_bzflush");
- BZ2_bzclose=GetProcAddress(hLib,"BZ2_bzclose");
- BZ2_bzerror=GetProcAddress(hLib,"BZ2_bzerror");
-
- if (!BZ2_bzlibVersion || !BZ2_bzopen || !BZ2_bzdopen
- || !BZ2_bzread || !BZ2_bzwrite || !BZ2_bzflush
- || !BZ2_bzclose || !BZ2_bzerror) {
- fprintf(stderr,"GetProcAddress failed.\n");
- return -1;
- }
- BZ2DLLLoaded=1;
- BZ2DLLhLib=hLib;
- return 0;
-
-}
-int BZ2DLLFreeLibrary(void)
-{
- if(BZ2DLLLoaded==0){return 0;}
- FreeLibrary(BZ2DLLhLib);
- BZ2DLLLoaded=0;
-}
-#endif /* WIN32 */
-
-void usage(void)
-{
- puts("usage: minibz2 [-d] [-{1,2,..9}] [[srcfilename] destfilename]");
-}
-
-int main(int argc,char *argv[])
-{
- int decompress = 0;
- int level = 9;
- char *fn_r = NULL;
- char *fn_w = NULL;
-
-#ifdef _WIN32
- if(BZ2DLLLoadLibrary()<0){
- fprintf(stderr,"Loading of %s failed. Giving up.\n", BZ2_LIBNAME);
- exit(1);
- }
- printf("Loading of %s succeeded. Library version is %s.\n",
- BZ2_LIBNAME, BZ2_bzlibVersion() );
-#endif
- while(++argv,--argc){
- if(**argv =='-' || **argv=='/'){
- char *p;
-
- for(p=*argv+1;*p;p++){
- if(*p=='d'){
- decompress = 1;
- }else if('1'<=*p && *p<='9'){
- level = *p - '0';
- }else{
- usage();
- exit(1);
- }
- }
- }else{
- break;
- }
- }
- if(argc>=1){
- fn_r = *argv;
- argc--;argv++;
- }else{
- fn_r = NULL;
- }
- if(argc>=1){
- fn_w = *argv;
- argc--;argv++;
- }else{
- fn_w = NULL;
- }
- {
- int len;
- char buff[0x1000];
- char mode[10];
-
- if(decompress){
- BZFILE *BZ2fp_r = NULL;
- FILE *fp_w = NULL;
-
- if(fn_w){
- if((fp_w = fopen(fn_w,"wb"))==NULL){
- printf("can't open [%s]\n",fn_w);
- perror("reason:");
- exit(1);
- }
- }else{
- fp_w = stdout;
- }
- if((fn_r == NULL && (BZ2fp_r = BZ2_bzdopen(fileno(stdin),"rb"))==NULL)
- || (fn_r != NULL && (BZ2fp_r = BZ2_bzopen(fn_r,"rb"))==NULL)){
- printf("can't bz2openstream\n");
- exit(1);
- }
- while((len=BZ2_bzread(BZ2fp_r,buff,0x1000))>0){
- fwrite(buff,1,len,fp_w);
- }
- BZ2_bzclose(BZ2fp_r);
- if(fp_w != stdout) fclose(fp_w);
- }else{
- BZFILE *BZ2fp_w = NULL;
- FILE *fp_r = NULL;
-
- if(fn_r){
- if((fp_r = fopen(fn_r,"rb"))==NULL){
- printf("can't open [%s]\n",fn_r);
- perror("reason:");
- exit(1);
- }
- }else{
- fp_r = stdin;
- }
- mode[0]='w';
- mode[1] = '0' + level;
- mode[2] = '\0';
-
- if((fn_w == NULL && (BZ2fp_w = BZ2_bzdopen(fileno(stdout),mode))==NULL)
- || (fn_w !=NULL && (BZ2fp_w = BZ2_bzopen(fn_w,mode))==NULL)){
- printf("can't bz2openstream\n");
- exit(1);
- }
- while((len=fread(buff,1,0x1000,fp_r))>0){
- BZ2_bzwrite(BZ2fp_w,buff,len);
- }
- BZ2_bzclose(BZ2fp_w);
- if(fp_r!=stdin)fclose(fp_r);
- }
- }
-#ifdef _WIN32
- BZ2DLLFreeLibrary();
-#endif
- return 0;
-}
diff --git a/dlltest.dsp b/dlltest.dsp
deleted file mode 100644
index 4b1615e..0000000
--- a/dlltest.dsp
+++ /dev/null
@@ -1,93 +0,0 @@
-# Microsoft Developer Studio Project File - Name="dlltest" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** •ÒW‚µ‚È‚¢‚Å‚‚¾‚³‚¢ **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=dlltest - Win32 Debug
-!MESSAGE ‚±‚ê‚Í—LŒø‚ÈÒ²¸Ì§²Ù‚Å‚Í‚ ‚è‚Ü‚¹‚ñB ‚±‚ÌÌßÛ¼Þª¸Ä‚ðËÞÙÄÞ‚·‚邽‚ß‚É‚Í NMAKE ‚ðŽg—p‚µ‚Ä‚‚¾‚³‚¢B
-!MESSAGE [Ò²¸Ì§²Ù‚Ì´¸½Îß°Ä] ºÏÝÄÞ‚ðŽg—p‚µ‚ÄŽÀs‚µ‚Ä‚‚¾‚³‚¢
-!MESSAGE
-!MESSAGE NMAKE /f "dlltest.mak".
-!MESSAGE
-!MESSAGE NMAKE ‚ÌŽÀsŽž‚É\¬‚ðŽw’è‚Å‚«‚Ü‚·
-!MESSAGE ºÏÝÄÞ ×²Ýã‚ÅϸۂÌÝ’è‚ð’è‹`‚µ‚Ü‚·B—á:
-!MESSAGE
-!MESSAGE NMAKE /f "dlltest.mak" CFG="dlltest - Win32 Debug"
-!MESSAGE
-!MESSAGE ‘I‘ð‰Â”\‚ÈËÞÙÄÞ Ó°ÄÞ:
-!MESSAGE
-!MESSAGE "dlltest - Win32 Release" ("Win32 (x86) Console Application" —p)
-!MESSAGE "dlltest - Win32 Debug" ("Win32 (x86) Console Application" —p)
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "dlltest - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x411 /d "NDEBUG"
-# ADD RSC /l 0x411 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"minibz2.exe"
-
-!ELSEIF "$(CFG)" == "dlltest - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "dlltest_"
-# PROP BASE Intermediate_Dir "dlltest_"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "dlltest_"
-# PROP Intermediate_Dir "dlltest_"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x411 /d "_DEBUG"
-# ADD RSC /l 0x411 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"minibz2.exe" /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "dlltest - Win32 Release"
-# Name "dlltest - Win32 Debug"
-# Begin Source File
-
-SOURCE=.\bzlib.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\dlltest.c
-# End Source File
-# End Target
-# End Project
diff --git a/huffman.c b/huffman.c
index 293095c..e45c5f6 100644
--- a/huffman.c
+++ b/huffman.c
@@ -4,6 +4,11 @@
/*--- huffman.c ---*/
/*-------------------------------------------------------------*/
+/*-- Modified for use under GNO by Stephen Heumann --*/
+#ifdef __ORCAC__
+segment "bzip2";
+#endif
+
/*--
This file is a part of bzip2 and/or libbzip2, a program and
library for lossless, block-sorting data compression.
@@ -112,9 +117,15 @@ void BZ2_hbMakeCodeLengths ( UChar *len,
Int32 nNodes, nHeap, n1, n2, i, j, k;
Bool tooLong;
+#ifdef __ORCAC__
+ static Int32 heap [ BZ_MAX_ALPHA_SIZE + 2 ];
+ static Int32 weight [ BZ_MAX_ALPHA_SIZE * 2 ];
+ static Int32 parent [ BZ_MAX_ALPHA_SIZE * 2 ];
+#else
Int32 heap [ BZ_MAX_ALPHA_SIZE + 2 ];
Int32 weight [ BZ_MAX_ALPHA_SIZE * 2 ];
Int32 parent [ BZ_MAX_ALPHA_SIZE * 2 ];
+#endif
for (i = 0; i < alphaSize; i++)
weight[i+1] = (freq[i] == 0 ? 1 : freq[i]) << 8;
diff --git a/libbz2.def b/libbz2.def
deleted file mode 100644
index 2dc0dd8..0000000
--- a/libbz2.def
+++ /dev/null
@@ -1,27 +0,0 @@
-LIBRARY LIBBZ2
-DESCRIPTION "libbzip2: library for data compression"
-EXPORTS
- BZ2_bzCompressInit
- BZ2_bzCompress
- BZ2_bzCompressEnd
- BZ2_bzDecompressInit
- BZ2_bzDecompress
- BZ2_bzDecompressEnd
- BZ2_bzReadOpen
- BZ2_bzReadClose
- BZ2_bzReadGetUnused
- BZ2_bzRead
- BZ2_bzWriteOpen
- BZ2_bzWrite
- BZ2_bzWriteClose
- BZ2_bzWriteClose64
- BZ2_bzBuffToBuffCompress
- BZ2_bzBuffToBuffDecompress
- BZ2_bzlibVersion
- BZ2_bzopen
- BZ2_bzdopen
- BZ2_bzread
- BZ2_bzwrite
- BZ2_bzflush
- BZ2_bzclose
- BZ2_bzerror
diff --git a/libbz2.dsp b/libbz2.dsp
deleted file mode 100644
index a21a20f..0000000
--- a/libbz2.dsp
+++ /dev/null
@@ -1,130 +0,0 @@
-# Microsoft Developer Studio Project File - Name="libbz2" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** •ÒW‚µ‚È‚¢‚Å‚‚¾‚³‚¢ **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=libbz2 - Win32 Debug
-!MESSAGE ‚±‚ê‚Í—LŒø‚ÈÒ²¸Ì§²Ù‚Å‚Í‚ ‚è‚Ü‚¹‚ñB ‚±‚ÌÌßÛ¼Þª¸Ä‚ðËÞÙÄÞ‚·‚邽‚ß‚É‚Í NMAKE ‚ðŽg—p‚µ‚Ä‚‚¾‚³‚¢B
-!MESSAGE [Ò²¸Ì§²Ù‚Ì´¸½Îß°Ä] ºÏÝÄÞ‚ðŽg—p‚µ‚ÄŽÀs‚µ‚Ä‚‚¾‚³‚¢
-!MESSAGE
-!MESSAGE NMAKE /f "libbz2.mak".
-!MESSAGE
-!MESSAGE NMAKE ‚ÌŽÀsŽž‚É\¬‚ðŽw’è‚Å‚«‚Ü‚·
-!MESSAGE ºÏÝÄÞ ×²Ýã‚ÅϸۂÌÝ’è‚ð’è‹`‚µ‚Ü‚·B—á:
-!MESSAGE
-!MESSAGE NMAKE /f "libbz2.mak" CFG="libbz2 - Win32 Debug"
-!MESSAGE
-!MESSAGE ‘I‘ð‰Â”\‚ÈËÞÙÄÞ Ó°ÄÞ:
-!MESSAGE
-!MESSAGE "libbz2 - Win32 Release" ("Win32 (x86) Dynamic-Link Library" —p)
-!MESSAGE "libbz2 - Win32 Debug" ("Win32 (x86) Dynamic-Link Library" —p)
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "libbz2 - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
-# ADD BASE RSC /l 0x411 /d "NDEBUG"
-# ADD RSC /l 0x411 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 /out:"libbz2.dll"
-
-!ELSEIF "$(CFG)" == "libbz2 - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
-# ADD BASE RSC /l 0x411 /d "_DEBUG"
-# ADD RSC /l 0x411 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"libbz2.dll" /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "libbz2 - Win32 Release"
-# Name "libbz2 - Win32 Debug"
-# Begin Source File
-
-SOURCE=.\blocksort.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\bzlib.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\bzlib.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\bzlib_private.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\compress.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\crctable.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\decompress.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\huffman.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\libbz2.def
-# End Source File
-# Begin Source File
-
-SOURCE=.\randtable.c
-# End Source File
-# End Target
-# End Project
diff --git a/makefile.msc b/makefile.msc
deleted file mode 100644
index 799a18a..0000000
--- a/makefile.msc
+++ /dev/null
@@ -1,63 +0,0 @@
-# Makefile for Microsoft Visual C++ 6.0
-# usage: nmake -f makefile.msc
-# K.M. Syring (syring@gsf.de)
-# Fixed up by JRS for bzip2-0.9.5d release.
-
-CC=cl
-CFLAGS= -DWIN32 -MD -Ox -D_FILE_OFFSET_BITS=64 -nologo
-
-OBJS= blocksort.obj \
- huffman.obj \
- crctable.obj \
- randtable.obj \
- compress.obj \
- decompress.obj \
- bzlib.obj
-
-all: lib bzip2 test
-
-bzip2: lib
- $(CC) $(CFLAGS) -o bzip2 bzip2.c libbz2.lib setargv.obj
- $(CC) $(CFLAGS) -o bzip2recover bzip2recover.c
-
-lib: $(OBJS)
- lib /out:libbz2.lib $(OBJS)
-
-test: bzip2
- type 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
- @echo All six of the fc's should find no differences.
- @echo If fc finds an error on sample3.bz2, this could be
- @echo because WinZip's 'TAR file smart CR/LF conversion'
- @echo is too clever for its own good. Disable this option.
- @echo The correct size for sample3.ref is 120,244. If it
- @echo is 150,251, WinZip has messed it up.
- fc sample1.bz2 sample1.rb2
- fc sample2.bz2 sample2.rb2
- fc sample3.bz2 sample3.rb2
- fc sample1.tst sample1.ref
- fc sample2.tst sample2.ref
- fc sample3.tst sample3.ref
-
-
-
-clean:
- del *.obj
- del libbz2.lib
- del bzip2.exe
- del bzip2recover.exe
- del sample1.rb2
- del sample2.rb2
- del sample3.rb2
- del sample1.tst
- del sample2.tst
- del sample3.tst
-
-.c.obj:
- $(CC) $(CFLAGS) -c $*.c -o $*.obj
-
diff --git a/manual.html b/manual.html
deleted file mode 100644
index 3218979..0000000
--- a/manual.html
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
-
-Untitled Document: Untitled Document
-
-
-
-
-
-
-
-
-
-
-
-
-
-Untitled Document
-
-The following text is the License for this software. You should
-find it identical to that contained in the file LICENSE in the
-source distribution.
-
-
-@bf{------------------ START OF THE LICENSE ------------------}
-
-
-This program, bzip2
,
-and associated library libbzip2
, are
-Copyright (C) 1996-2002 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:
-
--
- Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-
- 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.
-
-
- Altered source versions must be plainly marked as such, and must
- not be misrepresented as being the original software.
-
-
- 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
-
-
-bzip2
/libbzip2
version 1.0.2 of 30 December 2001.
-
-
-@bf{------------------ END OF THE LICENSE ------------------}
-
-
-Web sites:
-
-
-http://sources.redhat.com/bzip2
-
-
-http://www.cacheprof.org
-
-
-PATENTS: To the best of my knowledge, bzip2
does not use any patented
-algorithms. However, I do not have the resources available to carry out
-a full patent search. Therefore I cannot give any guarantee of the
-above statement.
-
-
-
-
-
-This document was generated
-by Julian Seward on January, 5 2002
-using texi2html
-
-
-
diff --git a/manual.pdf b/manual.pdf
deleted file mode 100644
index 9be5d6d5ae2f1e8c7838209c65101f77679570c9..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 298267
zcmbTdbCf7ew!T@mZQHhO+qP}nw(Y7@w#`#EPT4l+`?~wy{>}7SbMMSwnHdq8D_6$O
zz4r6Q8>9*%Vzi8OOi-j_m+?hVYy=Dh_C{7vJUsL=rgr8o76j~nw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