uncompress

undo compression of a file

Command


SYNOPSIS

uncompress [-cDfVv] [file]


DESCRIPTION

uncompress expands compressed data written by the compression programs compress. Data is read from file or the standard input. The name of the file to be uncompressed usually ends with .Z or with .gz. If file doesn't have either of these extensions, uncompress first looks for file.Z and, if this file does not exist, then it looks for file.gz. uncompress places the uncompressed output in a file with the same name but without the extension. If this file already exists, uncompress asks if you want to overwrite it, unless you specify the -f option. If file.Z nor file.gz are not found, then file (with no extension) is used.

For LZW-compressed files, the number of bits of compression is encoded in the compressed data, so the uncompress command automatically uses the correct number of bits. This includes the 9-14 bit compression range specified by XPG.

Options

-c

writes uncompressed output to the standard output (like zcat).

-D

must be used to uncompress a sorted dictionary file compressed using the -D option of compress.

-f

forces the file to be uncompressed, even if a file with the same base name already exists.

-V

prints the version number information for uncompress.

-v

displays the name of each file when it is uncompressed.


DIAGNOSTICS

Possible exit status values are:
0

Successful completion.

1

Failure due to any of the following:

— unknown command line option
— inability to obtain information about an argument file
— file has more than one link
— file is not a regular file
— file is not in compressed format
— file was compressed using more than 16 bits
— there is no space for decompress tables
— a compressed file is corrupt


PORTABILITY

x/OPEN Portability Guide 4.0.

uncompress is found on many UNIX systems. That version allows uncompression in place as well as to the standard output.

The support for .gz files and the -D option is an extension to the traditional implementations of uncompress; the -D and -V options are extensions to XPG.


SEE ALSO

Commands:
cpio, pack, unpack, zcat


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