PACK(1V)

NAME
pack, unpack, pcat - compress and uncompress files

SYNOPSIS
/usr/5bin/pack [ - ] [ -f ] file...
/usr/5bin/unpack file...
/usr/5bin/pcat file...

DESCRIPTION
Pack is a utility for compressing files. When it is possible to effect a space saving, each file is replaced by a packed file called file.z with identical access permissions, last-access and modified times as file.

A file will not be packed if: it is already packed; it has hard links; it is a directory; it cannot be opened; it is empty; no disk saving will result; a file called name.z cannot be opened (or already exists) or an I/O error occurs during packing.

The exit status of pack is the number of files that were not packed.

Unpack uncompresses files created with pack. Each file is sought, with `.z' appended to its name if necessary, is unpacked and replaced with the expanded version. The new file has the `.z' suffix removed, and has the same access permissions and last-access and modification dates as the packed file.

Unpack will fail to expand a file if: the packed file cannot be opened; the file does not appear to be packed; the output file cannot be created or already exists.

The exit status of unpack is the number of files it failed to unpack.

Pcat unpacks one or more files, concatenates the result, and writes it to standard output. The packed files are not deleted or replaced. As with unpack, a `.z' suffix is appended to the filenames if not already present.

Pcat may fail to unpack a file if it cannot be opened or its contents do not appear to be packed. Its exit status is the number of files it failed to expand.

OPTIONS
Pack accepts two options:

-   Display compression statistics for the names following. Subsequent occurences between filenames toggles statistics on and off.

-f  Force packing even if no space saving will result.

PACKING METHOD
The packing algorithm used is Huffman encoding. The space saving obtained depends very heavily on the nature of the original data: English text is typically compressed by 25 to 40 percent, while object code files may show as little as a 10 percent reduction.

SEE ALSO
compress(1), uncompress(1), zcat(1)

BUGS
Packed files may not unpack correctly on other systems.