# uncompress

## PROLOG



           This manual page is part of the POSIX Programmer's Manual.  The
           Linux implementation of this interface may differ (consult the
           corresponding Linux manual page for details of Linux behavior), or
           the interface may not be implemented on Linux.
    


## NAME



           uncompress — expand compressed data
    


## SYNOPSIS



           uncompress **[** -cfv**] [**_file_...**]**
    


## DESCRIPTION



           The _uncompress_ utility shall restore files to their original state
           after they have been compressed using the _compress_ utility. If no
           files are specified, the standard input shall be uncompressed to
           the standard output. If the invoking process has appropriate
           privileges, the ownership, modes, access time, and modification
           time of the original file shall be preserved.
    
           This utility shall support the uncompressing of any files produced
           by the _compress_ utility on the same implementation. For files
           produced by _compress_ on other systems, _uncompress_ supports 9 to
           14-bit compression (see compress(1p), **-b**); it is implementation-
           defined whether values of **-b** greater than 14 are supported.
    


## OPTIONS



           The _uncompress_ utility shall conform to the Base Definitions
           volume of POSIX.1‐2017, _Section 12.2_ , _Utility Syntax Guidelines_ ,
           except that Guideline 1 does apply since the utility name has ten
           letters.
    
           The following options shall be supported:
    
           **-c** Write to standard output; no files are changed.
    
           **-f** Do not prompt for overwriting files. Except when run in
                     the background, if **-f** is not given the user shall be
                     prompted as to whether an existing file should be
                     overwritten. If the standard input is not a terminal and
                     **-f** is not given, _uncompress_ shall write a diagnostic
                     message to standard error and exit with a status greater
                     than zero.
    
           **-v** Write messages to standard error concerning the
                     expansion of each file.
    


## OPERANDS



           The following operand shall be supported:
    
           _file_      A pathname of a file. If _file_ already has the **.Z** suffix
                     specified, it shall be used as the input file and the
                     output file shall be named **file** with the **.Z** suffix
                     removed. Otherwise, _file_ shall be used as the name of
                     the output file and **file** with the **.Z** suffix appended
                     shall be used as the input file.
    


## STDIN



           The standard input shall be used only if no _file_ operands are
           specified, or if a _file_ operand is **'-'**.
    


## INPUT FILES



           Input files shall be in the format produced by the _compress_
           utility.
    


## ENVIRONMENT VARIABLES



           The following environment variables shall affect the execution of
           _uncompress_ :
    
           _LANG_      Provide a default value for the internationalization
                     variables that are unset or null. (See the Base
                     Definitions volume of POSIX.1‐2017, _Section 8.2_ ,
                     _Internationalization Variables_ for the precedence of
                     internationalization variables used to determine the
                     values of locale categories.)
    
           _LC_ALL_    If set to a non-empty string value, override the values
                     of all the other internationalization variables.
    
           _LC_CTYPE_  Determine the locale for the interpretation of sequences
                     of bytes of text data as characters (for example,
                     single-byte as opposed to multi-byte characters in
                     arguments).
    
           _LC_MESSAGES_
                     Determine the locale that should be used to affect the
                     format and contents of diagnostic messages written to
                     standard error.
    
           _NLSPATH_   Determine the location of message catalogs for the
                     processing of _LC_MESSAGES_.
    


## ASYNCHRONOUS EVENTS



           Default.
    


## STDOUT



           When there are no _file_ operands or the **-c** option is specified, the
           uncompressed output is written to standard output.
    


## STDERR



           Prompts shall be written to the standard error output under the
           conditions specified in the DESCRIPTION and OPTIONS sections. The
           prompts shall contain the _file_ pathname, but their format is
           otherwise unspecified. Otherwise, the standard error output shall
           be used only for diagnostic messages.
    


## OUTPUT FILES



           Output files are the same as the respective input files to
           _compress_.
    


## EXTENDED DESCRIPTION



           None.
    


## EXIT STATUS



           The following exit values shall be returned:
    
            0    Successful completion.
    
           >0    An error occurred.
    


## CONSEQUENCES OF ERRORS



           The input file remains unmodified.
    
           _The following sections are informative._
    


## APPLICATION USAGE



           The limit of 14 on the _compress_ **-b** _bits_ argument is to achieve
           portability to all systems (within the restrictions imposed by the
           lack of an explicit published file format). Some implementations
           based on 16-bit architectures cannot support 15 or 16-bit
           uncompression.
    


## EXAMPLES



           None.
    


## RATIONALE



           None.
    


## FUTURE DIRECTIONS



           None.
    


* * *