------------------------------------------------------------------------

         Setting Compression Method and Level
         ------------------------------------

------------------------------------------------------------------------

      Set global compression method: -Z/--compression-method

   -Z mthd                      Set global compression method (mthd).

      mthd: { store | deflate | bzip2 | lzma | ppmd }

------------------------------------------------------------------------

      Set global compression level or
      set compression level by method:  -<L> (-0, -1, ..., -9)
                                        --store --compress-<L>

   -<L> (-0, -1, ..., -9)       Set global compression level (L).

   -<L>=mthd_list               Set compression level for methods in the
                                (colon- or semi-colon-separated) list.

      The notation "-<L>" means -0, -1, -2, ..., -9.
      mthd in mthd_list: { deflate | bzip2 | lzma | ppmd }

   Examples

   -7                           Set global compression level to 7.

   -4=deflate                   Set Deflate compression level to 4.

   -8=bzip2:lzma:ppmd           Set bzip2, LZMA, and PPMd compression
                                levels to 8.

   -0                           Set global compression level to 0.
                                (Use Store method).

------------------------------------------------------------------------

      Set compression method (and level) by file name suffix: -n
                                                              --suffixes

   -n sufx_list                 Set compression method (and level, if
   -n mthd=sufx_list            specified) for file name suffixes in the
   -n mthd-lvl=sufx_list        (colon- or semi-colon-separated) list.
                                Default mthd = Store.  (Method Store
                                implies level zero, no no level may be
                                specified for method Store.  Level 0
                                implies method Store, so level 0 may not
                                be specified with any method.) 
                                Specifying only ":" (or ";") as the
                                suffix list clears that suffix list.
                                Multiple "-n" options are allowed.

      mthd: { [store] | deflate | bzip2 | lzma | ppmd }
      lvl: [ 1 | 2 | 3 | ... | 9 ]

   Examples

   -n .gz:.tgz:.zip             Set method to Store (level 0) for file
                                names ending with ".gz", ".tgz", or ".zip".
                                (This replaces the default Store suffix
                                list.)

   -n store=.gz:.tgz:.zip       Same as above.

   -n :                         Clears the Store suffix list. 
                                (Compression will be done on all files.)

   -n store=:                   Same as above.

   -n lzma=.exe:.obj:.olb       Set method to LZMA for file names ending
                                with ".exe", ".obj", or ".olb".  (Use
                                level set by -<L>=lzma, or the global
                                -<L> level, or the default level.)

   -n ppmd-5=.c:.h:.txt         Set method to PPMd level 5 for file
                                names ending with ".c", ".h", or ".txt".

------------------------------------------------------------------------

   If options conflict, then the last option processed wins.

------------------------------------------------------------------------

      Rules used to determine compression method and level for a file

   0. Assume defaults: Method = Deflate, level = 6.

   1. If a global -<L> (-1/-9) compression level was specified, then
tentatively choose the specified level.  If a -Z/--compression-method
global compression method was specified, then tentatively choose the
specified method.  (Specifying "-0" is equivalent to "-Zstore".)

   2. If a file name matches a -n/--suffixes suffix list, then use the
method for that suffix list.  If a level was specified with that method,
then use that level.  Suffix lists are searched in the order: Store,
Deflate, then the (optional) other methods alphabetically, so,
currently: Store, Deflate, Bzip2, LZMA, PPMd (as enabled).  By default,
the Store suffix list is ".Z:.zip:.zoo:.arc:.lzh:.arj".

   3. If the compression level has not yet been determined, and a
-L/--store/--compress-<L> level was specified for the chosen method,
then use the level for that method.


   Examples

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

   (no options)                 For files matching suffixes in
                                ".Z:.zip:.zoo:.arc:.lzh:.arj":
                                Method = Store.  For other files:
                                Method = Deflate, level = 6.

ALP $ zipx -v fred0.zip *.*
  adding: dummy.arc         (in=39790) (out=39790) (stored 0%)
  adding: fileio.bin         (in=140731) (out=39762) (deflated-6 72%)
  adding: fileio.obj         (in=140731) (out=39762) (deflated-6 72%)
  adding: ziperr.h        (in=5143) (out=1903) (deflated-6 63%)
  adding: zipfile.tgz        (in=52981) (out=52991) (deflated-6 0%)
total bytes=379376, compressed=174208 -> 54% savings

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

   -Z bzip2                     For files matching suffixes in
                                ".Z:.zip:.zoo:.arc:.lzh:.arj":
                                Method = Store.  For other files:
                                Method = Bzip2, level = 6.

ALP $ zipx -v fred1.zip -Z bzip2 *.*
  adding: dummy.arc         (in=39790) (out=39790) (stored 0%)
  adding: fileio.bin         (in=140731) (out=37187) (bzipped-6 74%)
  adding: fileio.obj         (in=140731) (out=37187) (bzipped-6 74%)
  adding: ziperr.h        (in=5143) (out=1938) (bzipped-6 62%)
  adding: zipfile.tgz        (in=52981) (out=53553) (bzipped-6 -1%)
total bytes=379376, compressed=169655 -> 55% savings

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

   -8                           For files matching suffixes in
                                ".Z:.zip:.zoo:.arc:.lzh:.arj":
                                Method = Store.  For other files:
                                Method = Deflate, level = 8.

ALP $ zipx -v fred2.zip -8 *.*
  adding: dummy.arc         (in=39790) (out=39790) (stored 0%)
  adding: fileio.bin         (in=140731) (out=39137) (deflated-8 72%)
  adding: fileio.obj         (in=140731) (out=39137) (deflated-8 72%)
  adding: ziperr.h        (in=5143) (out=1899) (deflated-8 63%)
  adding: zipfile.tgz        (in=52981) (out=52991) (deflated-8 0%)
total bytes=379376, compressed=172954 -> 54% savings

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

   -Z bzip2 -8                  For files matching suffixes in
                                ".Z:.zip:.zoo:.arc:.lzh:.arj":
                                Method = Store.  For other files:
                                Method = Bzip2, level = 8.

ALP $ zipx -v fred3.zip -Z bzip2 -8 *.*
  adding: dummy.arc         (in=39790) (out=39790) (stored 0%)
  adding: fileio.bin         (in=140731) (out=37187) (bzipped-8 74%)
  adding: fileio.obj         (in=140731) (out=37187) (bzipped-8 74%)
  adding: ziperr.h        (in=5143) (out=1938) (bzipped-8 62%)
  adding: zipfile.tgz        (in=52981) (out=53553) (bzipped-8 -1%)
total bytes=379376, compressed=169655 -> 55% savings

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

   -Z bzip2                    For files matching suffixes in
   -n .gz:.tgz:.Z              ".gz:.tgz:.Z": Method = Store.  For other
                               files: Method = Bzip2, level = 6.

ALP $ zipx -v fred4.zip -Z bzip2 -n .gz:.tgz:.Z *.*
  adding: dummy.arc        (in=39790) (out=39774) (bzipped-6 0%)
  adding: fileio.bin         (in=140731) (out=37187) (bzipped-6 74%)
  adding: fileio.obj         (in=140731) (out=37187) (bzipped-6 74%)
  adding: ziperr.h        (in=5143) (out=1938) (bzipped-6 62%)
  adding: zipfile.tgz         (in=52981) (out=52981) (stored 0%)
total bytes=379376, compressed=169067 -> 55% savings

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

   -n lzma=.exe:.obj:.olb       For files matching suffixes in
                                ".Z:.zip:.zoo:.arc:.lzh:.arj":
                                Method = Store.  For files matching
                                suffixes in ".exe:.obj:.olb": Method =
                                LZMA, level = 6.  For other files:
                                Method = Deflate, level = 6.

ALP $ zipx -v fred5.zip -n lzma=.exe:.obj:.olb *.*
  adding: dummy.arc         (in=39790) (out=39790) (stored 0%)
  adding: fileio.bin         (in=140731) (out=39762) (deflated-6 72%)
  adding: fileio.obj         (in=140731) (out=30208) (LZMAed-6 79%)
  adding: ziperr.h        (in=5143) (out=1903) (deflated-6 63%)
  adding: zipfile.tgz        (in=52981) (out=52991) (deflated-6 0%)
total bytes=379376, compressed=164654 -> 57% savings

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

   -Z bzip2 -8                  For files matching suffixes in
   -n lzma=.exe:.obj:.olb       ".Z:.zip:.zoo:.arc:.lzh:.arj":
                                Method = Store.  For files matching
                                suffixes in ".exe:.obj:.olb":  Method =
                                LZMA, level = 8.  For other files:
                                Method = Bzip2, level = 8.

ALP $ zipx -v fred6.zip -Z bzip2 -8 -n lzma=.exe:.obj:.olb *.*
  adding: dummy.arc         (in=39790) (out=39790) (stored 0%)
  adding: fileio.bin         (in=140731) (out=37187) (bzipped-8 74%)
  adding: fileio.obj         (in=140731) (out=30155) (LZMAed-8 79%)
  adding: ziperr.h        (in=5143) (out=1938) (bzipped-8 62%)
  adding: zipfile.tgz        (in=52981) (out=53553) (bzipped-8 -1%)
total bytes=379376, compressed=162623 -> 57% savings

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

   -Z bzip2 -8                  For files matching suffixes in
   -n lzma-6=.exe:.obj:.olb     ".Z:.zip:.zoo:.arc:.lzh:.arj":
                                Method = Store.  For files matching
                                suffixes in ".exe:.obj:.olb":  Method =
                                LZMA, level = 6.  For other files:
                                Method = Bzip2, level = 8.

ALP $ zipx -v fred7.zip -Z bzip2 -8 -n lzma-6=.exe:.obj:.olb *.*
  adding: dummy.arc         (in=39790) (out=39790) (stored 0%)
  adding: fileio.bin         (in=140731) (out=37187) (bzipped-8 74%)
  adding: fileio.obj         (in=140731) (out=30208) (LZMAed-6 79%)
  adding: ziperr.h        (in=5143) (out=1938) (bzipped-8 62%)
  adding: zipfile.tgz        (in=52981) (out=53553) (bzipped-8 -1%)
total bytes=379376, compressed=162676 -> 57% savings

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

   -8                           For files matching suffixes in
   -n lzma-6=.exe:.obj:.olb     ".Z:.zip:.zoo:.arc:.lzh:.arj":
   -n ppmd-7=.c:.h:.txt         Method = Store.  For files matching
                                suffixes in ".exe:.obj:.olb":  Method =
                                LZMA, level = 6.  For files matching
                                suffixes in ".c:.h:.txt":  Method =
                                PPMd, level = 7.  For other files:
                                Method = Deflate, level = 8.

ALP $ zipx -v fred8.zip -8 -n lzma-6=.exe:.obj:.olb -
 -n ppmd-7=.c:.h:.txt *.*
  adding: dummy.arc         (in=39790) (out=39790) (stored 0%)
  adding: fileio.bin         (in=140731) (out=39137) (deflated-8 72%)
  adding: fileio.obj         (in=140731) (out=30208) (LZMAed-6 79%)
  adding: ziperr.h        (in=5143) (out=1656) (PPMded-7 68%)
  adding: zipfile.tgz        (in=52981) (out=52991) (deflated-8 0%)
total bytes=379376, compressed=163782 -> 57% savings

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

   -Z bzip2 -8=defl:bzip2       For files matching suffixes in
   -n defl=.bin                 ".Z:.zip:.zoo:.arc:.lzh:.arj":
   -n lzma-6=.exe:.obj:.olb     Method = Store.  For files matching
   -n ppmd-7=.c:.h:.txt         suffixes in ".bin": Method = Deflate,
                                level = 8.  For files matching suffixes
                                in ".exe:.obj:.olb":  Method = LZMA,
                                level = 6.  For files matching suffixes
                                in ".c:.h:.txt":  Method = PPMd,
                                level = 7.  For other files:
                                Method = Bzip2, level = 8.  

ALP $ zipx -v fred9.zip -Z bzip2 -8=defl:bzip2 -n defl=.bin -
 -n lzma-6=.exe:.obj:.olb -n ppmd-7=.c:.h:.txt *.*
  adding: dummy.arc         (in=39790) (out=39790) (stored 0%)
  adding: fileio.bin         (in=140731) (out=39137) (deflated-8 72%)
  adding: fileio.obj         (in=140731) (out=30208) (LZMAed-6 79%)
  adding: ziperr.h        (in=5143) (out=1656) (PPMded-7 68%)
  adding: zipfile.tgz        (in=52981) (out=53553) (bzipped-8 -1%)
total bytes=379376, compressed=164344 -> 57% savings

------------------------------------------------------------------------
