pcat filename...
unpack filename...
Packed files can be restored to their original form using unpack or pcat.
The amount of compression obtained depends on the size of the input file and the frequency distribution of its characters.
Because a decoding tree forms the first part of each .z file, it is usually not worthwhile to pack files smaller than three blocks unless the distribution of characters is very skewed. This may occur with printer plots or pictures.
Typically, large text-files are reduced to 60-75% of their original size. Load modules, which use a larger character set and have a more uniform distribution of characters, show little compression. Their packed versions come in at about 90% of the original size.
No packing will occur if:
the file appears to be already packed
the file name has more than 12 characters
the file has links
the file is a directory
the file cannot be opened
no disk storage blocks will be saved by packing
a file called name.z already exists
the .z file cannot be created
an I/O error occurred during processing
The last segment of the filename must contain no more than 12 characters to allow space for the appended .z extension. Directories cannot be packed.
pcat does for packed files what cat.1v does for ordinary files, except that pcat cannot be used as a filter. The specified files are unpacked and written to the standard output. To view a packed file named name.z use:
pcat filename.z
or just:
pcat filename
To make an unpacked copy without destroying the packed version, use
pcat filename> newname
Failure may occur if:
the filename (exclusive of the .z) has more than 12 characters;
the file cannot be opened;
the file does not appear to be the output of pack.
unpack expands files created by pack. For each file filename specified in the command, a search is made for a file called filename.z (or just filename, if filename ends in .z). If this file appears to be a packed, it is replaced by its expanded version. The new file has the .z suffix stripped from its name, and has the same access modes, access and modification dates, and owner as those of the packed file. Failure may occur for the same reasons that it may in pcat, as well as for the following:
pcat returns the number of files it was unable to unpack.
unpack returns the number of files it was unable to unpack.
Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97