Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ccat(1) — HP-UX 7.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

compress(1)

pack(1)

acl(5)

COMPACT(1)

NAME

compact, uncompact, ccat − compact and uncompact files, and cat them

SYNOPSIS

compact [ name ...  ]
uncompact [ name ...  ]
ccat [ file ...  ]

DESCRIPTION

Compact compresses the named files using an adaptive Huffman code.  If no file names are given, the standard input is compacted to the standard output.  Compact operates as an on-line algorithm.  Each time a byte is read, it is encoded immediately according to the current prefix code.  This code is an optimal Huffman code for the set of frequencies seen so far.  It is unnecessary to attach a decoding tree in front of the compressed file since the encoder and the decoder start in the same state and stay synchronized.  Furthermore, compact and uncompact can operate as filters.  In particular, ... | compact | uncompact | ... 
operates as a (very slow) no-op.

When an argument file is given, it is compacted and the resulting file is placed in file.C; file is unlinked.  The first two bytes of the compacted file code the fact that the file is compacted.  This code is used to prohibit recompaction. 

The amount of compression to be expected depends on the type of file being compressed.  Typical values of compression are: Text (38%), Pascal Source (43%), C Source (36%) and Binary (19%).  These values are the percentages of file bytes reduced. 

Uncompact restores the original file from a file compressed by compact.  If no file names are given, the standard input is uncompacted to the standard output. 

Ccat cats the original file from a file compressed by compact, without uncompressing the file. 

Access Control Lists (ACLs)

On systems that implement access control lists, when a new file is created with the effective user and group ID of the caller, the original file’s ACL is copied to the new file after being altered to reflect any change in ownership (see acl(5)).

WARNINGS

The last segment of the file name must contain fewer than thirteen characters to allow space for the appended .C. 

DEPENDENCIES

RFA and NFS
Access control list entries of networked files are summarized (as returned in st_mode by stat(2)), but not copied to the new file.

FILES

∗.Ccompacted file created by compact, removed by uncompact

SEE ALSO

compress(1), pack(1), acl(5). 
Gallager, Robert G., “Variations on a Theme of Huffman,” I.E.E.E.  Transactions on Information Theory, vol. IT-24, no. 6, November 1978, pp. 668 - 674. 

AUTHOR

Colin L. Mc Master

Hewlett-Packard Company  —  HP-UX Release 7.0: Sept 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026