unpack

decode Huffman packed files

Command


SYNOPSIS

unpack file ...


DESCRIPTION

unpack uncompresses argument files compressed by pack, using a Huffman minimal redundancy code. By default, unpack looks for file with a .z extension. It places the decompressed output in a file with the same name, but without the .z extension. The times of last access and last modification are preserved.

Packed files can be identified by file. Packed text files can be viewed without being unpacked in place using pcat.

unpack doesn't unpack a file if: the input file cannot be opened; a file already exists with same name as the output file; the output file can't be created; if the input file doesn't appear to have been created by pack.


FILES

pk$*

temporary copy of input file. (You may see this in the current directory if unpack is interrupted.)

Note:

This is now located in the same directory as the file being unpacked; in previous releases of MKS Toolkit it was stored in the directory indicated by TMPDIR. The new approach eliminates some size problems when TMPDIR is on a RAM disk and substantially improves performance in most cases.


DIAGNOSTICS

Possible exit status values are:
0

Successful completion.

n

Indicates that n files could not be unpacked properly. For example, if three out of six files could not be unpacked properly, the exit status is 3.

Possible reasons for failure include:

— unknown command line option
— error creating a name for a temporary file
— error opening an input file or a temporary file
— error writing to a temporary file
— inability to rename a temporary file
— inability to restore the modification time on a packed file
— input file was not packed
— a packed file is corrupt

Messages

file: Not a packed file

The file was not processed by pack. In this case, the file is not changed.

Other messages about inaccessibility of files and so on, are self-explanatory.


PORTABILITY

x/OPEN Portability Guide 4.0.


SEE ALSO

Commands:
file, pack, pcat

Miscellaneous:
envvar


Updated MKS Toolkit [3khat16.ico]HP3000 [3khat16.ico]3kMail [archive16.gif]