head	1.4;
access;
symbols
	RELENG_8_4:1.4.0.2
	RELENG_9_1_0_RELEASE:1.3.40.1.4.2
	RELENG_9_1:1.3.40.1.0.4
	RELENG_9_1_BP:1.3.40.1
	RELENG_8_3_0_RELEASE:1.3.34.1.8.1
	RELENG_8_3:1.3.34.1.0.8
	RELENG_8_3_BP:1.3.34.1
	RELENG_9_0_0_RELEASE:1.3.40.1.2.1
	RELENG_9_0:1.3.40.1.0.2
	RELENG_9_0_BP:1.3.40.1
	RELENG_9:1.3.0.40
	RELENG_9_BP:1.3
	RELENG_7_4_0_RELEASE:1.3.38.1
	RELENG_8_2_0_RELEASE:1.3.34.1.6.1
	RELENG_7_4:1.3.0.38
	RELENG_7_4_BP:1.3
	RELENG_8_2:1.3.34.1.0.6
	RELENG_8_2_BP:1.3.34.1
	RELENG_8_1_0_RELEASE:1.3.34.1.4.1
	RELENG_8_1:1.3.34.1.0.4
	RELENG_8_1_BP:1.3.34.1
	RELENG_7_3_0_RELEASE:1.3.36.1
	RELENG_7_3:1.3.0.36
	RELENG_7_3_BP:1.3
	RELENG_8_0_0_RELEASE:1.3.34.1.2.1
	RELENG_8_0:1.3.34.1.0.2
	RELENG_8_0_BP:1.3.34.1
	RELENG_8:1.3.0.34
	RELENG_8_BP:1.3
	RELENG_7_2_0_RELEASE:1.3.32.1
	RELENG_7_2:1.3.0.32
	RELENG_7_2_BP:1.3
	RELENG_7_1_0_RELEASE:1.3.30.1
	RELENG_6_4_0_RELEASE:1.3.28.1
	RELENG_7_1:1.3.0.30
	RELENG_7_1_BP:1.3
	RELENG_6_4:1.3.0.28
	RELENG_6_4_BP:1.3
	RELENG_7_0_0_RELEASE:1.3
	RELENG_6_3_0_RELEASE:1.3
	RELENG_7_0:1.3.0.26
	RELENG_7_0_BP:1.3
	RELENG_6_3:1.3.0.24
	RELENG_6_3_BP:1.3
	RELENG_7:1.3.0.22
	RELENG_7_BP:1.3
	RELENG_6_2_0_RELEASE:1.3
	RELENG_6_2:1.3.0.20
	RELENG_6_2_BP:1.3
	RELENG_5_5_0_RELEASE:1.3
	RELENG_5_5:1.3.0.18
	RELENG_5_5_BP:1.3
	RELENG_6_1_0_RELEASE:1.3
	RELENG_6_1:1.3.0.16
	RELENG_6_1_BP:1.3
	RELENG_6_0_0_RELEASE:1.3
	RELENG_6_0:1.3.0.14
	RELENG_6_0_BP:1.3
	RELENG_6:1.3.0.12
	RELENG_6_BP:1.3
	RELENG_5_4_0_RELEASE:1.3
	RELENG_5_4:1.3.0.10
	RELENG_5_4_BP:1.3
	RELENG_4_11_0_RELEASE:1.1.1.1
	RELENG_4_11:1.1.1.1.0.32
	RELENG_4_11_BP:1.1.1.1
	RELENG_5_3_0_RELEASE:1.3
	RELENG_5_3:1.3.0.8
	RELENG_5_3_BP:1.3
	RELENG_5:1.3.0.6
	RELENG_5_BP:1.3
	RELENG_4_10_0_RELEASE:1.1.1.1
	RELENG_4_10:1.1.1.1.0.30
	RELENG_4_10_BP:1.1.1.1
	RELENG_5_2_1_RELEASE:1.3
	RELENG_5_2_0_RELEASE:1.3
	RELENG_5_2:1.3.0.4
	RELENG_5_2_BP:1.3
	RELENG_4_9_0_RELEASE:1.1.1.1
	RELENG_4_9:1.1.1.1.0.28
	RELENG_4_9_BP:1.1.1.1
	RELENG_5_1_0_RELEASE:1.3
	RELENG_5_1:1.3.0.2
	RELENG_5_1_BP:1.3
	RELENG_4_8_0_RELEASE:1.1.1.1
	RELENG_4_8:1.1.1.1.0.26
	RELENG_4_8_BP:1.1.1.1
	RELENG_5_0_0_RELEASE:1.2
	RELENG_5_0:1.2.0.2
	RELENG_5_0_BP:1.2
	RELENG_4_7_0_RELEASE:1.1.1.1
	RELENG_4_7:1.1.1.1.0.24
	RELENG_4_7_BP:1.1.1.1
	RELENG_4_6_2_RELEASE:1.1.1.1
	RELENG_4_6_1_RELEASE:1.1.1.1
	RELENG_4_6_0_RELEASE:1.1.1.1
	RELENG_4_6:1.1.1.1.0.22
	RELENG_4_6_BP:1.1.1.1
	RELENG_4_5_0_RELEASE:1.1.1.1
	RELENG_4_5:1.1.1.1.0.20
	RELENG_4_5_BP:1.1.1.1
	RELENG_4_4_0_RELEASE:1.1.1.1
	RELENG_4_4:1.1.1.1.0.18
	RELENG_4_4_BP:1.1.1.1
	RELENG_4_3_0_RELEASE:1.1.1.1
	RELENG_4_3:1.1.1.1.0.16
	RELENG_4_3_BP:1.1.1.1
	RELENG_4_2_0_RELEASE:1.1.1.1
	RELENG_4_1_1_RELEASE:1.1.1.1
	PRE_SMPNG:1.1.1.1
	RELENG_4_1_0_RELEASE:1.1.1.1
	RELENG_3_5_0_RELEASE:1.1.1.1
	RELENG_4_0_0_RELEASE:1.1.1.1
	RELENG_4:1.1.1.1.0.14
	RELENG_4_BP:1.1.1.1
	RELENG_3_4_0_RELEASE:1.1.1.1
	RELENG_3_3_0_RELEASE:1.1.1.1
	RELENG_3_2_PAO:1.1.1.1.0.12
	RELENG_3_2_PAO_BP:1.1.1.1
	RELENG_3_2_0_RELEASE:1.1.1.1
	RELENG_3_1_0_RELEASE:1.1.1.1
	RELENG_3:1.1.1.1.0.10
	RELENG_3_BP:1.1.1.1
	RELENG_2_2_8_RELEASE:1.1.1.1
	RELENG_3_0_0_RELEASE:1.1.1.1
	RELENG_2_2_7_RELEASE:1.1.1.1
	RELENG_2_2_6_RELEASE:1.1.1.1
	RELENG_2_2_5_RELEASE:1.1.1.1
	RELENG_2_2_2_RELEASE:1.1.1.1
	RELENG_2_2_1_RELEASE:1.1.1.1
	RELENG_2_2_0_RELEASE:1.1.1.1
	RELENG_2_1_7_RELEASE:1.1.1.1
	RELENG_2_1_6_1_RELEASE:1.1.1.1
	RELENG_2_1_6_RELEASE:1.1.1.1
	RELENG_2_2:1.1.1.1.0.8
	RELENG_2_2_BP:1.1.1.1
	RELENG_2_1_5_RELEASE:1.1.1.1
	RELENG_2_1_0_RELEASE:1.1.1.1
	RELENG_2_1_0:1.1.1.1.0.6
	RELENG_2_1_0_BP:1.1.1.1
	RELENG_2_0_5_RELEASE:1.1.1.1
	RELENG_2_0_5:1.1.1.1.0.4
	RELENG_2_0_5_BP:1.1.1.1
	RELENG_2_0_5_ALPHA:1.1.1.1
	RELEASE_2_0:1.1.1.1
	BETA_2_0:1.1.1.1
	ALPHA_2_0:1.1.1.1.0.2
	bsd_44_lite:1.1.1.1
	CSRG:1.1.1;
locks; strict;
comment	@# @;


1.4
date	2012.11.17.01.54.17;	author svnexp;	state Exp;
branches
	1.4.2.1;
next	1.3;

1.3
date	2002.12.30.21.18.11;	author schweikh;	state Exp;
branches
	1.3.12.1
	1.3.22.1
	1.3.28.1
	1.3.30.1
	1.3.32.1
	1.3.34.1
	1.3.36.1
	1.3.38.1
	1.3.40.1;
next	1.2;

1.2
date	2002.10.16.12.42.15;	author charnier;	state Exp;
branches;
next	1.1;

1.1
date	94.05.27.12.30.58;	author rgrimes;	state Exp;
branches
	1.1.1.1;
next	;

1.4.2.1
date	2012.11.17.01.54.17;	author svnexp;	state dead;
branches;
next	1.4.2.2;

1.4.2.2
date	2013.03.28.13.06.01;	author svnexp;	state Exp;
branches;
next	;

1.3.12.1
date	2012.11.17.07.45.37;	author svnexp;	state Exp;
branches;
next	;

1.3.22.1
date	2012.11.17.08.08.23;	author svnexp;	state Exp;
branches;
next	;

1.3.28.1
date	2008.10.02.02.57.24;	author kensmith;	state Exp;
branches;
next	;

1.3.30.1
date	2008.11.25.02.59.29;	author kensmith;	state Exp;
branches;
next	;

1.3.32.1
date	2009.04.15.03.14.26;	author kensmith;	state Exp;
branches;
next	;

1.3.34.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.3.34.1.2.1
	1.3.34.1.4.1
	1.3.34.1.6.1
	1.3.34.1.8.1;
next	1.3.34.2;

1.3.34.2
date	2012.11.17.10.37.16;	author svnexp;	state Exp;
branches;
next	;

1.3.34.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.3.34.1.4.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.3.34.1.6.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.3.34.1.8.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.3.34.1.8.2;

1.3.34.1.8.2
date	2012.11.17.08.25.49;	author svnexp;	state Exp;
branches;
next	;

1.3.36.1
date	2010.02.10.00.26.20;	author kensmith;	state Exp;
branches;
next	;

1.3.38.1
date	2010.12.21.17.10.29;	author kensmith;	state Exp;
branches;
next	1.3.38.2;

1.3.38.2
date	2012.11.17.08.17.41;	author svnexp;	state Exp;
branches;
next	;

1.3.40.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.3.40.1.2.1
	1.3.40.1.4.1;
next	1.3.40.2;

1.3.40.2
date	2012.11.17.11.37.38;	author svnexp;	state Exp;
branches;
next	;

1.3.40.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.3.40.1.2.2;

1.3.40.1.2.2
date	2012.11.17.08.37.34;	author svnexp;	state Exp;
branches;
next	;

1.3.40.1.4.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.3.40.1.4.2;

1.3.40.1.4.2
date	2012.11.17.08.48.25;	author svnexp;	state Exp;
branches;
next	;

1.1.1.1
date	94.05.27.12.30.59;	author rgrimes;	state Exp;
branches;
next	;


desc
@@


1.4
log
@Switching exporter and resync
@
text
@
	@@(#)README	8.1 (Berkeley) 6/9/93
  $FreeBSD: head/usr.bin/compress/doc/README 108470 2002-12-30 21:18:15Z schweikh $

Compress version 4.0 improvements over 3.0:
	o compress() speedup (10-50%) by changing division hash to xor
	o decompress() speedup (5-10%)
	o Memory requirements reduced (3-30%)
	o Stack requirements reduced to less than 4kb
	o Removed 'Big+Fast' compress code (FBITS) because of compress speedup
    	o Portability mods for Z8000 and PC/XT (but not zeus 3.2)
	o Default to 'quiet' mode
	o Unification of 'force' flags
	o Manual page overhaul
	o Portability enhancement for M_XENIX
	o Removed text on #else and #endif
	o Added "-V" switch to print version and options
	o Added #defines for SIGNED_COMPARE_SLOW
	o Added Makefile and "usermem" program
	o Removed all floating point computations
	o New programs: [deleted]

The "usermem" script attempts to determine the maximum process size.  Some
editing of the script may be necessary (see the comments).  [It should work
fine on 4.3 BSD.] If you can't get it to work at all, just create file
"USERMEM" containing the maximum process size in decimal.

The following preprocessor symbols control the compilation of "compress.c":

	o USERMEM		Maximum process memory on the system
	o SACREDMEM		Amount to reserve for other processes
	o SIGNED_COMPARE_SLOW	Unsigned compare instructions are faster
	o NO_UCHAR		Don't use "unsigned char" types
	o BITS			Overrules default set by USERMEM-SACREDMEM
	o vax			Generate inline assembler
	o interdata		Defines SIGNED_COMPARE_SLOW
	o M_XENIX		Makes arrays < 65536 bytes each
	o pdp11			BITS=12, NO_UCHAR
	o z8000			BITS=12
	o pcxt			BITS=12
	o BSD4_2		Allow long filenames ( > 14 characters) &
				Call setlinebuf(stderr)

The difference "usermem-sacredmem" determines the maximum BITS that can be
specified with the "-b" flag.

memory: at least		BITS
------  -- -----                ----
     433,484			 16
     229,600			 15
     127,536			 14
      73,464			 13
           0			 12

The default is BITS=16.

The maximum bits can be overruled by specifying "-DBITS=bits" at
compilation time.

WARNING: files compressed on a large machine with more bits than allowed by 
a version of compress on a smaller machine cannot be decompressed!  Use the
"-b12" flag to generate a file on a large machine that can be uncompressed 
on a 16-bit machine.

The output of compress 4.0 is fully compatible with that of compress 3.0.
In other words, the output of compress 4.0 may be fed into uncompress 3.0 or
the output of compress 3.0 may be fed into uncompress 4.0.

The output of compress 4.0 not compatible with that of
compress 2.0.  However, compress 4.0 still accepts the output of
compress 2.0.  To generate output that is compatible with compress
2.0, use the undocumented "-C" flag.

	-from mod.sources, submitted by vax135!petsd!joe (Joe Orost), 8/1/85
--------------------------------

Enclosed is compress version 3.0 with the following changes:

1.	"Block" compression is performed.  After the BITS run out, the
	compression ratio is checked every so often.  If it is decreasing,
	the table is cleared and a new set of substrings are generated.

	This makes the output of compress 3.0 not compatible with that of
	compress 2.0.  However, compress 3.0 still accepts the output of
	compress 2.0.  To generate output that is compatible with compress
	2.0, use the undocumented "-C" flag.

2.	A quiet "-q" flag has been added for use by the news system.

3.	The character chaining has been deleted and the program now uses
	hashing.  This improves the speed of the program, especially
	during decompression.  Other speed improvements have been made,
	such as using putc() instead of fwrite().

4.	A large table is used on large machines when a relatively small
	number of bits is specified.  This saves much time when compressing
	for a 16-bit machine on a 32-bit virtual machine.  Note that the
	speed improvement only occurs when the input file is > 30000
	characters, and the -b BITS is less than or equal to the cutoff
	described below.

Most of these changes were made by James A. Woods (ames!jaw).  Thank you
James!

To compile compress:

	cc -O -DUSERMEM=usermem -o compress compress.c

Where "usermem" is the amount of physical user memory available (in bytes).  
If any physical memory is to be reserved for other processes, put in 
"-DSACREDMEM sacredmem", where "sacredmem" is the amount to be reserved.

The difference "usermem-sacredmem" determines the maximum BITS that can be
specified, and the cutoff bits where the large+fast table is used.

memory: at least		BITS		cutoff
------  -- -----                ----            ------
   4,718,592 			 16		  13
   2,621,440 			 16		  12
   1,572,864			 16		  11
   1,048,576			 16		  10
     631,808			 16               --
     329,728			 15               --
     178,176			 14		  --
      99,328			 13		  --
           0			 12		  --

The default memory size is 750,000 which gives a maximum BITS=16 and no
large+fast table.

The maximum bits can be overruled by specifying "-DBITS=bits" at
compilation time.

If your machine doesn't support unsigned characters, define "NO_UCHAR" 
when compiling.

If your machine has "int" as 16-bits, define "SHORT_INT" when compiling.

After compilation, move "compress" to a standard executable location, such 
as /usr/local.  Then:
	cd /usr/local
	ln compress uncompress
	ln compress zcat

On machines that have a fixed stack size (such as Perkin-Elmer), set the
stack to at least 12kb.  ("setstack compress 12" on Perkin-Elmer).

Next, install the manual (compress.l).
	cp compress.l /usr/man/manl
	cd /usr/man/manl
	ln compress.l uncompress.l
	ln compress.l zcat.l

		- or -

	cp compress.l /usr/man/man1/compress.1
	cd /usr/man/man1
	ln compress.1 uncompress.1
	ln compress.1 zcat.1

					regards,
					petsd!joe

Here is a note from the net:

>From hplabs!pesnta!amd!turtlevax!ken Sat Jan  5 03:35:20 1985
Path: ames!hplabs!pesnta!amd!turtlevax!ken
From: ken@@turtlevax.UUCP (Ken Turkowski)
Newsgroups: net.sources
Subject: Re: Compress release 3.0 : sample Makefile
Organization: CADLINC, Inc. @@ Menlo Park, CA

In the compress 3.0 source recently posted to mod.sources, there is a
#define variable which can be set for optimum performance on a machine
with a large amount of memory.  A program (usermem) to calculate the
usable amount of physical user memory is enclosed, as well as a sample
4.2BSD Vax Makefile for compress.

Here is the README file from the previous version of compress (2.0):

>Enclosed is compress.c version 2.0 with the following bugs fixed:
>
>1.	The packed files produced by compress are different on different
>	machines and dependent on the vax sysgen option.
>		The bug was in the different byte/bit ordering on the
>		various machines.  This has been fixed.
>
>		This version is NOT compatible with the original vax posting
>		unless the '-DCOMPATIBLE' option is specified to the C
>		compiler.  The original posting has a bug which I fixed, 
>		causing incompatible files.  I recommend you NOT to use this
>		option unless you already have a lot of packed files from
>		the original posting by Thomas.
>2.	The exit status is not well defined (on some machines) causing the
>	scripts to fail.
>		The exit status is now 0,1 or 2 and is documented in
>		compress.l.
>3.	The function getopt() is not available in all C libraries.
>		The function getopt() is no longer referenced by the
>		program.
>4.	Error status is not being checked on the fwrite() and fflush() calls.
>		Fixed.
>
>The following enhancements have been made:
>
>1.	Added facilities of "compact" into the compress program.  "Pack",
>	"Unpack", and "Pcat" are no longer required (no longer supplied).
>2.	Installed work around for C compiler bug with "-O".
>3.	Added a magic number header (\037\235).  Put the bits specified
>	in the file.
>4.	Added "-f" flag to force overwrite of output file.
>5.	Added "-c" flag and "zcat" program.  'ln compress zcat' after you
>	compile.
>6.	The 'uncompress' script has been deleted; simply 
>	'ln compress uncompress' after you compile and it will work.
>7.	Removed extra bit masking for machines that support unsigned
>	characters.  If your machine doesn't support unsigned characters,
>	define "NO_UCHAR" when compiling.
>
>Compile "compress.c" with "-O -o compress" flags.  Move "compress" to a
>standard executable location, such as /usr/local.  Then:
>	cd /usr/local
>	ln compress uncompress
>	ln compress zcat
>
>On machines that have a fixed stack size (such as Perkin-Elmer), set the
>stack to at least 12kb.  ("setstack compress 12" on Perkin-Elmer).
>
>Next, install the manual (compress.l).
>	cp compress.l /usr/man/manl		- or -
>	cp compress.l /usr/man/man1/compress.1
>
>Here is the README that I sent with my first posting:
>
>>Enclosed is a modified version of compress.c, along with scripts to make it
>>run identically to pack(1), unpack(1), and pcat(1).  Here is what I
>>(petsd!joe) and a colleague (petsd!peora!srd) did:
>>
>>1. Removed VAX dependencies.
>>2. Changed the struct to separate arrays; saves mucho memory.
>>3. Did comparisons in unsigned, where possible.  (Faster on Perkin-Elmer.)
>>4. Sorted the character next chain and changed the search to stop
>>prematurely.  This saves a lot on the execution time when compressing.
>>
>>This version is totally compatible with the original version.  Even though
>>lint(1) -p has no complaints about compress.c, it won't run on a 16-bit
>>machine, due to the size of the arrays.
>>
>>Here is the README file from the original author:
>> 
>>>Well, with all this discussion about file compression (for news batching
>>>in particular) going around, I decided to implement the text compression
>>>algorithm described in the June Computer magazine.  The author claimed
>>>blinding speed and good compression ratios.  It's certainly faster than
>>>compact (but, then, what wouldn't be), but it's also the same speed as
>>>pack, and gets better compression than both of them.  On 350K bytes of
>>>Unix-wizards, compact took about 8 minutes of CPU, pack took about 80
>>>seconds, and compress (herein) also took 80 seconds.  But, compact and
>>>pack got about 30% compression, whereas compress got over 50%.  So, I
>>>decided I had something, and that others might be interested, too.
>>>
>>>As is probably true of compact and pack (although I haven't checked),
>>>the byte order within a word is probably relevant here, but as long as
>>>you stay on a single machine type, you should be ok.  (Can anybody
>>>elucidate on this?)  There are a couple of asm's in the code (extv and
>>>insv instructions), so anyone porting it to another machine will have to
>>>deal with this anyway (and could probably make it compatible with Vax
>>>byte order at the same time).  Anyway, I've linted the code (both with
>>>and without -p), so it should run elsewhere.  Note the longs in the
>>>code, you can take these out if you reduce BITS to <= 15.
>>>
>>>Have fun, and as always, if you make good enhancements, or bug fixes,
>>>I'd like to see them.
>>>
>>>=Spencer (thomas@@utah-20, {harpo,hplabs,arizona}!utah-cs!thomas)
>>
>>					regards,
>>					joe
>>
>>--
>>Full-Name:  Joseph M. Orost
>>UUCP:       ..!{decvax,ucbvax,ihnp4}!vax135!petsd!joe
>>US Mail:    MS 313; Perkin-Elmer; 106 Apple St; Tinton Falls, NJ 07724
>>Phone:      (201) 870-5844
@


1.4.2.1
log
@file README was added on branch RELENG_8_4 on 2013-03-28 13:06:01 +0000
@
text
@d1 284
@


1.4.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 284

	@@(#)README	8.1 (Berkeley) 6/9/93
  $FreeBSD: releng/8.4/usr.bin/compress/doc/README 108470 2002-12-30 21:18:15Z schweikh $

Compress version 4.0 improvements over 3.0:
	o compress() speedup (10-50%) by changing division hash to xor
	o decompress() speedup (5-10%)
	o Memory requirements reduced (3-30%)
	o Stack requirements reduced to less than 4kb
	o Removed 'Big+Fast' compress code (FBITS) because of compress speedup
    	o Portability mods for Z8000 and PC/XT (but not zeus 3.2)
	o Default to 'quiet' mode
	o Unification of 'force' flags
	o Manual page overhaul
	o Portability enhancement for M_XENIX
	o Removed text on #else and #endif
	o Added "-V" switch to print version and options
	o Added #defines for SIGNED_COMPARE_SLOW
	o Added Makefile and "usermem" program
	o Removed all floating point computations
	o New programs: [deleted]

The "usermem" script attempts to determine the maximum process size.  Some
editing of the script may be necessary (see the comments).  [It should work
fine on 4.3 BSD.] If you can't get it to work at all, just create file
"USERMEM" containing the maximum process size in decimal.

The following preprocessor symbols control the compilation of "compress.c":

	o USERMEM		Maximum process memory on the system
	o SACREDMEM		Amount to reserve for other processes
	o SIGNED_COMPARE_SLOW	Unsigned compare instructions are faster
	o NO_UCHAR		Don't use "unsigned char" types
	o BITS			Overrules default set by USERMEM-SACREDMEM
	o vax			Generate inline assembler
	o interdata		Defines SIGNED_COMPARE_SLOW
	o M_XENIX		Makes arrays < 65536 bytes each
	o pdp11			BITS=12, NO_UCHAR
	o z8000			BITS=12
	o pcxt			BITS=12
	o BSD4_2		Allow long filenames ( > 14 characters) &
				Call setlinebuf(stderr)

The difference "usermem-sacredmem" determines the maximum BITS that can be
specified with the "-b" flag.

memory: at least		BITS
------  -- -----                ----
     433,484			 16
     229,600			 15
     127,536			 14
      73,464			 13
           0			 12

The default is BITS=16.

The maximum bits can be overruled by specifying "-DBITS=bits" at
compilation time.

WARNING: files compressed on a large machine with more bits than allowed by 
a version of compress on a smaller machine cannot be decompressed!  Use the
"-b12" flag to generate a file on a large machine that can be uncompressed 
on a 16-bit machine.

The output of compress 4.0 is fully compatible with that of compress 3.0.
In other words, the output of compress 4.0 may be fed into uncompress 3.0 or
the output of compress 3.0 may be fed into uncompress 4.0.

The output of compress 4.0 not compatible with that of
compress 2.0.  However, compress 4.0 still accepts the output of
compress 2.0.  To generate output that is compatible with compress
2.0, use the undocumented "-C" flag.

	-from mod.sources, submitted by vax135!petsd!joe (Joe Orost), 8/1/85
--------------------------------

Enclosed is compress version 3.0 with the following changes:

1.	"Block" compression is performed.  After the BITS run out, the
	compression ratio is checked every so often.  If it is decreasing,
	the table is cleared and a new set of substrings are generated.

	This makes the output of compress 3.0 not compatible with that of
	compress 2.0.  However, compress 3.0 still accepts the output of
	compress 2.0.  To generate output that is compatible with compress
	2.0, use the undocumented "-C" flag.

2.	A quiet "-q" flag has been added for use by the news system.

3.	The character chaining has been deleted and the program now uses
	hashing.  This improves the speed of the program, especially
	during decompression.  Other speed improvements have been made,
	such as using putc() instead of fwrite().

4.	A large table is used on large machines when a relatively small
	number of bits is specified.  This saves much time when compressing
	for a 16-bit machine on a 32-bit virtual machine.  Note that the
	speed improvement only occurs when the input file is > 30000
	characters, and the -b BITS is less than or equal to the cutoff
	described below.

Most of these changes were made by James A. Woods (ames!jaw).  Thank you
James!

To compile compress:

	cc -O -DUSERMEM=usermem -o compress compress.c

Where "usermem" is the amount of physical user memory available (in bytes).  
If any physical memory is to be reserved for other processes, put in 
"-DSACREDMEM sacredmem", where "sacredmem" is the amount to be reserved.

The difference "usermem-sacredmem" determines the maximum BITS that can be
specified, and the cutoff bits where the large+fast table is used.

memory: at least		BITS		cutoff
------  -- -----                ----            ------
   4,718,592 			 16		  13
   2,621,440 			 16		  12
   1,572,864			 16		  11
   1,048,576			 16		  10
     631,808			 16               --
     329,728			 15               --
     178,176			 14		  --
      99,328			 13		  --
           0			 12		  --

The default memory size is 750,000 which gives a maximum BITS=16 and no
large+fast table.

The maximum bits can be overruled by specifying "-DBITS=bits" at
compilation time.

If your machine doesn't support unsigned characters, define "NO_UCHAR" 
when compiling.

If your machine has "int" as 16-bits, define "SHORT_INT" when compiling.

After compilation, move "compress" to a standard executable location, such 
as /usr/local.  Then:
	cd /usr/local
	ln compress uncompress
	ln compress zcat

On machines that have a fixed stack size (such as Perkin-Elmer), set the
stack to at least 12kb.  ("setstack compress 12" on Perkin-Elmer).

Next, install the manual (compress.l).
	cp compress.l /usr/man/manl
	cd /usr/man/manl
	ln compress.l uncompress.l
	ln compress.l zcat.l

		- or -

	cp compress.l /usr/man/man1/compress.1
	cd /usr/man/man1
	ln compress.1 uncompress.1
	ln compress.1 zcat.1

					regards,
					petsd!joe

Here is a note from the net:

>From hplabs!pesnta!amd!turtlevax!ken Sat Jan  5 03:35:20 1985
Path: ames!hplabs!pesnta!amd!turtlevax!ken
From: ken@@turtlevax.UUCP (Ken Turkowski)
Newsgroups: net.sources
Subject: Re: Compress release 3.0 : sample Makefile
Organization: CADLINC, Inc. @@ Menlo Park, CA

In the compress 3.0 source recently posted to mod.sources, there is a
#define variable which can be set for optimum performance on a machine
with a large amount of memory.  A program (usermem) to calculate the
usable amount of physical user memory is enclosed, as well as a sample
4.2BSD Vax Makefile for compress.

Here is the README file from the previous version of compress (2.0):

>Enclosed is compress.c version 2.0 with the following bugs fixed:
>
>1.	The packed files produced by compress are different on different
>	machines and dependent on the vax sysgen option.
>		The bug was in the different byte/bit ordering on the
>		various machines.  This has been fixed.
>
>		This version is NOT compatible with the original vax posting
>		unless the '-DCOMPATIBLE' option is specified to the C
>		compiler.  The original posting has a bug which I fixed, 
>		causing incompatible files.  I recommend you NOT to use this
>		option unless you already have a lot of packed files from
>		the original posting by Thomas.
>2.	The exit status is not well defined (on some machines) causing the
>	scripts to fail.
>		The exit status is now 0,1 or 2 and is documented in
>		compress.l.
>3.	The function getopt() is not available in all C libraries.
>		The function getopt() is no longer referenced by the
>		program.
>4.	Error status is not being checked on the fwrite() and fflush() calls.
>		Fixed.
>
>The following enhancements have been made:
>
>1.	Added facilities of "compact" into the compress program.  "Pack",
>	"Unpack", and "Pcat" are no longer required (no longer supplied).
>2.	Installed work around for C compiler bug with "-O".
>3.	Added a magic number header (\037\235).  Put the bits specified
>	in the file.
>4.	Added "-f" flag to force overwrite of output file.
>5.	Added "-c" flag and "zcat" program.  'ln compress zcat' after you
>	compile.
>6.	The 'uncompress' script has been deleted; simply 
>	'ln compress uncompress' after you compile and it will work.
>7.	Removed extra bit masking for machines that support unsigned
>	characters.  If your machine doesn't support unsigned characters,
>	define "NO_UCHAR" when compiling.
>
>Compile "compress.c" with "-O -o compress" flags.  Move "compress" to a
>standard executable location, such as /usr/local.  Then:
>	cd /usr/local
>	ln compress uncompress
>	ln compress zcat
>
>On machines that have a fixed stack size (such as Perkin-Elmer), set the
>stack to at least 12kb.  ("setstack compress 12" on Perkin-Elmer).
>
>Next, install the manual (compress.l).
>	cp compress.l /usr/man/manl		- or -
>	cp compress.l /usr/man/man1/compress.1
>
>Here is the README that I sent with my first posting:
>
>>Enclosed is a modified version of compress.c, along with scripts to make it
>>run identically to pack(1), unpack(1), and pcat(1).  Here is what I
>>(petsd!joe) and a colleague (petsd!peora!srd) did:
>>
>>1. Removed VAX dependencies.
>>2. Changed the struct to separate arrays; saves mucho memory.
>>3. Did comparisons in unsigned, where possible.  (Faster on Perkin-Elmer.)
>>4. Sorted the character next chain and changed the search to stop
>>prematurely.  This saves a lot on the execution time when compressing.
>>
>>This version is totally compatible with the original version.  Even though
>>lint(1) -p has no complaints about compress.c, it won't run on a 16-bit
>>machine, due to the size of the arrays.
>>
>>Here is the README file from the original author:
>> 
>>>Well, with all this discussion about file compression (for news batching
>>>in particular) going around, I decided to implement the text compression
>>>algorithm described in the June Computer magazine.  The author claimed
>>>blinding speed and good compression ratios.  It's certainly faster than
>>>compact (but, then, what wouldn't be), but it's also the same speed as
>>>pack, and gets better compression than both of them.  On 350K bytes of
>>>Unix-wizards, compact took about 8 minutes of CPU, pack took about 80
>>>seconds, and compress (herein) also took 80 seconds.  But, compact and
>>>pack got about 30% compression, whereas compress got over 50%.  So, I
>>>decided I had something, and that others might be interested, too.
>>>
>>>As is probably true of compact and pack (although I haven't checked),
>>>the byte order within a word is probably relevant here, but as long as
>>>you stay on a single machine type, you should be ok.  (Can anybody
>>>elucidate on this?)  There are a couple of asm's in the code (extv and
>>>insv instructions), so anyone porting it to another machine will have to
>>>deal with this anyway (and could probably make it compatible with Vax
>>>byte order at the same time).  Anyway, I've linted the code (both with
>>>and without -p), so it should run elsewhere.  Note the longs in the
>>>code, you can take these out if you reduce BITS to <= 15.
>>>
>>>Have fun, and as always, if you make good enhancements, or bug fixes,
>>>I'd like to see them.
>>>
>>>=Spencer (thomas@@utah-20, {harpo,hplabs,arizona}!utah-cs!thomas)
>>
>>					regards,
>>					joe
>>
>>--
>>Full-Name:  Joseph M. Orost
>>UUCP:       ..!{decvax,ucbvax,ihnp4}!vax135!petsd!joe
>>US Mail:    MS 313; Perkin-Elmer; 106 Apple St; Tinton Falls, NJ 07724
>>Phone:      (201) 870-5844
@


1.3
log
@Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/
Add FreeBSD Id tag where missing.
@
text
@d3 1
a3 1
  $FreeBSD$
@


1.3.22.1
log
@Switch importer
@
text
@d3 1
a3 1
  $FreeBSD: stable/7/usr.bin/compress/doc/README 108470 2002-12-30 21:18:15Z schweikh $
@


1.3.12.1
log
@Switch importer
@
text
@d3 1
a3 1
  $FreeBSD: stable/6/usr.bin/compress/doc/README 108470 2002-12-30 21:18:15Z schweikh $
@


1.3.40.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.3.40.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d3 1
a3 1
  $FreeBSD: stable/9/usr.bin/compress/doc/README 108470 2002-12-30 21:18:15Z schweikh $
@


1.3.40.1.4.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.3.40.1.4.2
log
@Switch importer
@
text
@d3 1
a3 1
  $FreeBSD: releng/9.1/usr.bin/compress/doc/README 108470 2002-12-30 21:18:15Z schweikh $
@


1.3.40.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.3.40.1.2.2
log
@Switch importer
@
text
@d3 1
a3 1
  $FreeBSD: releng/9.0/usr.bin/compress/doc/README 108470 2002-12-30 21:18:15Z schweikh $
@


1.3.38.1
log
@SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)
@
text
@@


1.3.38.2
log
@Switch importer
@
text
@d3 1
a3 1
  $FreeBSD: releng/7.4/usr.bin/compress/doc/README 108470 2002-12-30 21:18:15Z schweikh $
@


1.3.36.1
log
@SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)
@
text
@@


1.3.34.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.3.34.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d3 1
a3 1
  $FreeBSD: stable/8/usr.bin/compress/doc/README 108470 2002-12-30 21:18:15Z schweikh $
@


1.3.34.1.8.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.3.34.1.8.2
log
@Switch importer
@
text
@d3 1
a3 1
  $FreeBSD: releng/8.3/usr.bin/compress/doc/README 108470 2002-12-30 21:18:15Z schweikh $
@


1.3.34.1.6.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.3.34.1.4.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.3.34.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.3.32.1
log
@SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)
@
text
@@


1.3.30.1
log
@SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)
@
text
@@


1.3.28.1
log
@SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)
@
text
@@


1.2
log
@Spelling.
@
text
@d236 1
a236 1
>>run identically to pack(1), unpack(1), an pcat(1).  Here is what I
@


1.1
log
@Initial revision
@
text
@d3 1
d25 1
a25 1
fine on 4.3 bsd.] If you can't get it to work at all, just create file
d31 1
a31 1
	o SACREDMEM		Amount to reserve for other proceses
d57 1
a57 1
The maximum bits can be overrulled by specifying "-DBITS=bits" at
d176 2
a177 2
useable amount of physical user memory is enclosed, as well as a sample
4.2bsd Vax Makefile for compress.
d193 1
a193 1
>		the original posting by thomas.
d257 1
a257 1
>>>unix-wizards, compact took about 8 minutes of CPU, pack took about 80
@


1.1.1.1
log
@BSD 4.4 Lite Usr.bin Sources
@
text
@@
