From Atari Wiki
Jump to navigation Jump to search

GZIP(1)                  USER COMMANDS                    GZIP(1)

     gzip, gunzip, zcat - compress or expand files

     gzip [ -cdfhLrtvV19 ] [ name ... ]
     gunzip [ -cfhLrtvV ] [ name ... ]
     zcat [ -hLV ] [ name ... ]

     Gzip reduces the size of the named  files  using  Lempel-Ziv
     coding  (LZ77).  Whenever possible, each file is replaced by
     one with the extension .z, while keeping the same  ownership
     modes,  access  and  modification  times.   If  no files are
     specified, the standard input is compressed to the  standard
     output.  If the new file name is too long, gzip truncates it
     and keeps the original file name  in  the  compressed  file.
     Gzip  will  only attempt to compress regular files.  In par-
     ticular, it will ignore symbolic links.

     Compressed files can be  restored  to  their  original  form
     using gzip -d or gunzip or zcat.

     gunzip takes a  list  of  files  on  its  command  line  and
     replaces  each  file whose name ends with .z or .Z and which
     begins with the correct magic number  with  an  uncompressed
     file  without  the  original  extension.   gunzip is able to
     extract files compressed with old versions of compress  (3.0
     and  above)  and  pkzip  files which contain a single member
     compressed with the  deflation  algorithm.   gunzip  chooses
     automatically  the appropriate extraction algorithm, depend-
     ing on the compression method.  The uncompressed  file  will
     have  the  mode,  ownership and timestamps of the compressed

     zcat is identical to gunzip -c. zcat uncompresses  either  a
     list  of files on the command line or its standard input and
     writes the uncompressed data on standard output.  zcat  will
     uncompress  files that have the correct magic number whether
     they have a .z suffix or not.

     Gzip uses the Lempel-Ziv algorithm used in zip and PKZIP.

     The amount of compression obtained depends on  the  size  of
     the  input and the distribution of common substrings.  Typi-
     cally, text such as source code or  English  is  reduced  by
     60-70%.   Compression  is  generally  much  better than that
     achieved by LZW (as used in compress),  Huffman  coding  (as
     used in pack), or adaptive Huffman coding (compact).

     Multiple compressed files can be concatenated. In this case,
     gunzip  will  extract  all members at once. If one member is
     damaged,  other  members  might  still  be  recovered  after

Sun Release 4.1        Last change: local                       1

GZIP(1)                  USER COMMANDS                    GZIP(1)

     removal  of  the  damaged  member. Better compression can be
     usually  obtained  if  all  members  are  decompressed  then
     recompressed in a single step.

     -c --stdout
          Write output on standard output;  keep  original  files
          unchanged.   If there are several input files, the out-
          put consists of a sequence of independently  compressed
          members.  To obtain better compression, concatenate all
          input files before compressing them.

     -d --decompress

     -f --force
          Force compression even if the file has  multiple  links
          or  the corresponding .z file already exists.  If -f is
          not given, and when not running in the background, gzip
          prompts to verify whether an existing .z file should be

     -h --help
          Display a help screen.

     -L --license
          Display the gzip license.

     -r --recurse
          Travel the directory structure recursively. If  any  of
          the file names specified on the command line are direc-
          tories,  gzip  will  descend  into  the  directory  and
          compress  all  the  files it finds there (or decompress
          them in the case of gunzip ).

     -t --test
          Test. Check the compressed file integrity.

     -v --verbose
          Verbose. Display the name and percentage reduction  for
          each file compressed.

     -V --version
          Version. Display the  version  number  and  compilation

     -# --fast --best
          Regulate the speed of compression using  the  specified
          digit  #,  where  -1  or  --fast  indicates the fastest
          compression method (less compression) and -9 or  --best
          indicates   the  slowest  compression  method  (optimal
          compression).  The default compression level is -5.

Sun Release 4.1        Last change: local                       2

GZIP(1)                  USER COMMANDS                    GZIP(1)

     pack(1), compact(1), compress(1), zip(1)

     Exit status is normally 0; if an error occurs,  exit  status
     is 1.

     Usage: gzip [-cdfhLrtvV19] [file ...]
             Invalid options were specified on the command line.
     file: not in gzip format
             The  file  specified  to   gunzip   has   not   been
     file: compressed with xx bits, can only handle yy bits
             File was compressed (using LZW) by  a  program  that
             could  deal  with more bits than the decompress code
             on this machine.  Recompress  the  file  with  gzip,
             which compresses better and uses less memory.
     file: already has .z suffix -- no change
             The  file  is  assumed  to  be  already  compressed.
             Rename the file and try again.
     file already exists; do you wish to overwrite (y or n)?
             Respond "y" if  you  want  the  output  file  to  be
             replaced; "n" if not.
     gunzip: corrupt input
             A SIGSEGV violation was detected which usually means
             that the input file has been corrupted.
             Percentage  of  the  input  saved  by   compression.
             (Relevant only for -v.)
     -- not a regular file or directory: ignored
             When the input file is not a regular file or  direc-
             tory,  (e.g.  a  symbolic link, socket, FIFO, device
             file), it is left unaltered.
     -- has xx other links: unchanged
             The input file has links; it is left unchanged.  See
             ln(1) for more information. Use the -f flag to force
             compression of multiply-linked files.

     The .z extension is already used by pack(1).

Sun Release 4.1        Last change: local                       3

Back to Packer/Depacker