revision.log revision 81586
1169689Skan/* $FreeBSD: head/usr.bin/compress/doc/revision.log 81586 2001-08-13 14:06:34Z ru $ */
2169689Skan
3169689Skan/*
4169689Skan * $Header: compress.c,v 4.0 85/07/30 12:50:00 joe Release $
5169689Skan * $Log:	compress.c,v $
6169689Skan * Revision 4.0  85/07/30  12:50:00  joe
7169689Skan * Removed ferror() calls in output routine on every output except first.
8169689Skan * Prepared for release to the world.
9169689Skan * 
10169689Skan * Revision 3.6  85/07/04  01:22:21  joe
11169689Skan * Remove much wasted storage by overlaying hash table with the tables
12169689Skan * used by decompress: tab_suffix[1<<BITS], stack[8000].  Updated USERMEM
13169689Skan * computations.  Fixed dump_tab() DEBUG routine.
14169689Skan *
15169689Skan * Revision 3.5  85/06/30  20:47:21  jaw
16169689Skan * Change hash function to use exclusive-or.  Rip out hash cache.  These
17169689Skan * speedups render the megamemory version defunct, for now.  Make decoder
18169689Skan * stack global.  Parts of the RCS trunks 2.7, 2.6, and 2.1 no longer apply.
19169689Skan *
20169689Skan * Revision 3.4  85/06/27  12:00:00  ken
21169689Skan * Get rid of all floating-point calculations by doing all compression ratio
22169689Skan * calculations in fixed point.
23169689Skan *
24169689Skan * Revision 3.3  85/06/24  21:53:24  joe
25169689Skan * Incorporate portability suggestion for M_XENIX.  Got rid of text on #else
26169689Skan * and #endif lines.  Cleaned up #ifdefs for vax and interdata.
27169689Skan *
28169689Skan * Revision 3.2  85/06/06  21:53:24  jaw
29169689Skan * Incorporate portability suggestions for Z8000, IBM PC/XT from mailing list.
30169689Skan * Default to "quiet" output (no compression statistics).
31169689Skan *
32169689Skan * Revision 3.1  85/05/12  18:56:13  jaw
33169689Skan * Integrate decompress() stack speedups (from early pointer mods by McKie).
34169689Skan * Repair multi-file USERMEM gaffe.  Unify 'force' flags to mimic semantics
35169689Skan * of SVR2 'pack'.  Streamline block-compress table clear logic.  Increase 
36169689Skan * output byte count by magic number size.
37169689Skan * 
38169689Skan * Revision 3.0   84/11/27  11:50:00  petsd!joe
39169689Skan * Set HSIZE depending on BITS.  Set BITS depending on USERMEM.  Unrolled
40169689Skan * loops in clear routines.  Added "-C" flag for 2.0 compatibility.  Used
41169689Skan * unsigned compares on Perkin-Elmer.  Fixed foreground check.
42169689Skan *
43169689Skan * Revision 2.7   84/11/16  19:35:39  ames!jaw
44169689Skan * Cache common hash codes based on input statistics; this improves
45169689Skan * performance for low-density raster images.  Pass on #ifdef bundle
46169689Skan * from Turkowski.
47169689Skan *
48169689Skan * Revision 2.6   84/11/05  19:18:21  ames!jaw
49169689Skan * Vary size of hash tables to reduce time for small files.
50169689Skan * Tune PDP-11 hash function.
51169689Skan *
52169689Skan * Revision 2.5   84/10/30  20:15:14  ames!jaw
53169689Skan * Junk chaining; replace with the simpler (and, on the VAX, faster)
54169689Skan * double hashing, discussed within.  Make block compression standard.
55169689Skan *
56169689Skan * Revision 2.4   84/10/16  11:11:11  ames!jaw
57169689Skan * Introduce adaptive reset for block compression, to boost the rate
58169689Skan * another several percent.  (See mailing list notes.)
59169689Skan *
60169689Skan * Revision 2.3   84/09/22  22:00:00  petsd!joe
61169689Skan * Implemented "-B" block compress.  Implemented REVERSE sorting of tab_next.
62169689Skan * Bug fix for last bits.  Changed fwrite to putchar loop everywhere.
63169689Skan *
64169689Skan * Revision 2.2   84/09/18  14:12:21  ames!jaw
65169689Skan * Fold in news changes, small machine typedef from thomas,
66169689Skan * #ifdef interdata from joe.
67169689Skan *
68169689Skan * Revision 2.1   84/09/10  12:34:56  ames!jaw
69169689Skan * Configured fast table lookup for 32-bit machines.
70169689Skan * This cuts user time in half for b <= FBITS, and is useful for news batching
71169689Skan * from VAX to PDP sites.  Also sped up decompress() [fwrite->putc] and
72169689Skan * added signal catcher [plus beef in writeerr()] to delete effluvia.
73169689Skan *
74169689Skan * Revision 2.0   84/08/28  22:00:00  petsd!joe
75169689Skan * Add check for foreground before prompting user.  Insert maxbits into
76169689Skan * compressed file.  Force file being uncompressed to end with ".Z".
77169689Skan * Added "-c" flag and "zcat".  Prepared for release.
78169689Skan *
79169689Skan * Revision 1.10  84/08/24  18:28:00  turtlevax!ken
80169689Skan * Will only compress regular files (no directories), added a magic number
81169689Skan * header (plus an undocumented -n flag to handle old files without headers),
82169689Skan * added -f flag to force overwriting of possibly existing destination file,
83169689Skan * otherwise the user is prompted for a response.  Will tack on a .Z to a
84169689Skan * filename if it doesn't have one when decompressing.  Will only replace
85169689Skan * file if it was compressed.
86169689Skan *
87169689Skan * Revision 1.9  84/08/16  17:28:00  turtlevax!ken
88169689Skan * Removed scanargs(), getopt(), added .Z extension and unlimited number of
89169689Skan * filenames to compress.  Flags may be clustered (-Ddvb12) or separated
90169689Skan * (-D -d -v -b 12), or combination thereof.  Modes and other status is
91169689Skan * copied with copystat().  -O bug for 4.2 seems to have disappeared with
92169689Skan * 1.8.
93169689Skan *
94169689Skan * Revision 1.8  84/08/09  23:15:00  joe
95169689Skan * Made it compatible with vax version, installed jim's fixes/enhancements
96169689Skan *
97169689Skan * Revision 1.6  84/08/01  22:08:00  joe
98169689Skan * Sped up algorithm significantly by sorting the compress chain.
99169689Skan *
100169689Skan * Revision 1.5  84/07/13  13:11:00  srd
101169689Skan * Added C version of vax asm routines.  Changed structure to arrays to
102169689Skan * save much memory.  Do unsigned compares where possible (faster on
103169689Skan * Perkin-Elmer)
104169689Skan *
105169689Skan * Revision 1.4  84/07/05  03:11:11  thomas
106169689Skan * Clean up the code a little and lint it.  (Lint complains about all
107169689Skan * the regs used in the asm, but I'm not going to "fix" this.)
108169689Skan *
109169689Skan * Revision 1.3  84/07/05  02:06:54  thomas
110169689Skan * Minor fixes.
111169689Skan *
112169689Skan * Revision 1.2  84/07/05  00:27:27  thomas
113 * Add variable bit length output.
114 *
115 */
116
117static char rcs_ident[] =
118	"$Header: compress.c,v 4.0 85/07/30 12:50:00 joe Release $";
119