GZIP(1)                                                   GZIP(1)

     NAME
          gzip, gunzip, bzip2, bunzip2, zip, unzip, - compress and
          expand data

     SYNOPSIS
          gzip [-cvD[1-9]] [file ...]

          gunzip [-ctTvD] [file ...]

          bzip2 [-cvD[1-9]] [file ...]

          bunzip2 [-cvD] [file ...]

          zip [-vD[1-9]] [-f zipfile] file [...]

          unzip [-cistTvD] [-f zipfile] [file ...]

     DESCRIPTION
          Gzip encodes files with a hybrid Lempel-Ziv 1977 and Huffman
          compression algorithm known as deflate.  Most of the time,
          the resulting file is smaller, and will never be much big-
          ger.  Output files are named by taking the last path element
          of each file argument and appending .gz; if the resulting
          name ends with .tar.gz, it is converted to .tgz instead.
          Gunzip reverses the process.  Its output files are named by
          taking the last path element of each file argument, convert-
          ing .tgz to .tar.gz, and stripping any .gz; the resulting
          name must be different from the original name.

          Bzip2 and bunzip2 are similar in interface to gzip and
          gunzip, but use a modified Burrows-Wheeler block sorting
          compression algorithm.  The default suffix for output files
          is .bz2, with .tar.bz2 becoming .tbz.  Bunzip2 recognizes
          the extension .tbz2 as a synonym for .tbz.

          Zip encodes the named files and places the results into the
          archive zipfile, or the standard output if no file is given.
          Unzip extracts files from an archive created by zip. If no
          files are named as arguments, all of files in the archive
          are extracted.  A directory's name implies all recursively
          contained files and subdirectories.

          None of these programs removes the original files.  If the
          process fails, the faulty output files are removed.

          The options are:

          -c        Write to standard output rather than creating an
                    output file.

     Page 1                       Plan 9            (printed 12/29/24)

     GZIP(1)                                                   GZIP(1)

          -i        Convert all archive file names to lower case.

          -s        Streaming mode.  Looks at the file data adjacent
                    to each compressed file rather than seeking in the
                    central file directory.  This is the mode used by
                    unzip if no zipfile is specified.  If -s is given,
                    -T is ignored.

          -t        List matching files in the archive rather than
                    extracting them.

          -T        Set the output time to that specified in the
                    archive.

          -1 .. -9  Sets the compression level.  -1 is tuned for
                    speed, -9 for minimal output size.  The best com-
                    promise is -6, the default.

          -v        Produce more descriptive output.  With -t, adds
                    the uncompressed size in bytes and the modifica-
                    tion time to the output.  Without -t, prints the
                    names of files on standard error as they are com-
                    pressed or decompressed.

          -D        Produce debugging output.

     SOURCE
          /sys/src/cmd/gzip
          /sys/src/cmd/bzip2

     SEE ALSO
          tar(1), compress(1)

     BUGS
          Unzip can only extract files which are uncompressed or com-
          pressed with the deflate compression scheme.  Recent zip
          files fall into this category.

     Page 2                       Plan 9            (printed 12/29/24)