1 LZCOMPRESS

  LZCOMPRESS  is   an  interim  package   for  the   compression   and
  decompression  of files  on  the VAX (to  make large  files  small),
  consisting of two programs :

       LZCOMP   o The compressor
       LZDCMP   o The decompressor
2 LZCOMP

  LZCOMP implements the Lempel-Ziv  file compression algorithm. (Files
  are compressed by LZCOMP are decompressed by LZDCMP.) It operates by
  finding common  substrings and  replaces them  with  a variable-size
  code. This is deterministic, and can be done with a single pass over
  the file.  Thus, the decompression  procedure needs no  input table,
  but can track the way the table was built.

3 Syntax

  The syntax of  the LZCOMP command is `UNIX'  rather then VAX/VMS, so
  instead  of  providing  qualifiers, you  provide  options.  This  is
  because the  program originates in the UNIX domain, and has not been
  converted to use  VAX/VMS qualifiers. Options are preceeded by a `-'
  character.

  The syntax of the LZCOMP command is :

                LZCOMP [-options] [infile [outfile]]
3 Options

  Options are  case insensitive  (unlike UNIX).  The following options
  are recognized :


    -B      Specifies that the input file is binary
    -Mn     Specifies maximum number of bits to be used in compression tables
    -V      Enables debugging level
    -X      Specifies compatibility mode

3 -B

  If the  -B option  is  given then the  input file  is "binary",  not
  "human  readable text". This  is necessary on DEC operating systems,
  such  as VAX/VMS  and RSX-11M, that treat  these files  differently.
  (Note that binary support  is rudamentary and  probably insufficient
  as yet.) (On  VMS version 5, this is ignored unless the -X option is
  specified or the input file is record-oriented.)
3 -M

  If the -M option  is given then the value specified is used to write
  the  specified number   of bits in   the code  --  necessary for big
  machines   making  files  for   little  machines. For   example,  if
  compressing a  file on  VMS which is  to be read  on a  PDP-11,  you
  should select -M 12.
3 -V

  -V [n]  Verbose if specified. If a value is specified, it will
  enable debugging code (if compiled in).
3 -X

  -X [n]  "Export" -- write  a file  format that can  be read by other
  operating  systems.  Only  the  bytes in the  file are  copied; file
  attributes are  not  preserved.  If specified, the  value determines
  the level  of compatiblity. If  not specified, or specified  with an
  explicit value  of zero,  and LZCOMP is running on Vax/VMS version 5
  under VAXC  and the input  file is a   disk or  magtape file (block-
  oriented),   a  VMS-private   output  format   is   used   which  is
  incompatible  with the UNIX  compress utility, but  which  preserves
  VMS file attributes. -X may take on the following values:

          0  Choose VMS private format. See VMS-restrictions

          1  Compatible with Unix  compress version  3.0: this  is the
             default if -X is given without a value.

          2  As above, but supress "block compression"

          3  Supress block  compression and do  not  output a compress
             header block. This is for compatiblity with a quite early
             version  of  UNIX  compress  (and  requires  conditional-
             compilation to use).

  Note that the -B (binary) option is ignored unless the input file is
  "record-oriented", such as a terminal or mailbox.

3 Parameters

  The two parameters are the  input and output filenames respectively.
  Redirection is  supported,  however, the  output must be a disk/tape
  file.

  The  file   format   is  almost  identical   to  the   current  UNIX
  implementation of  compress (V5.0).  Files written  by UNIX compress
  should be  readable by  LZDCMP. Files written  by  LZCOMP  in export
  (-X)  format will be readable by  UNIX compress (except  that LZCOMP
  outputs two "clear" codes to mark EOF.

2 VMS-restrictions

  VMS Private mode stores the  true name and attributes  of the  input
  file  into  the  compressed  file and LZDCMP restores the attributes
  (and filename  if  requested). The  following  restrictions apply --
  they may be lifted in the future :

         All files must be stored on disk.

         The LZCOMP output file must be specified directly.

         For all usage on VMS, the compressed file must  be
         written to, and read from disk.
2 LZDCMP

  LZDCMP decompresses files compressed by LZCOMP.
3 Syntax
  
                LZDCMP [-options] [infile [outfile]]
3 Parameters
  The two  parameters are the input  and output files.  If  you do not
  specify  an  output  file,  then  the file  is  decompressed  to the
  terminal. Which will  result in a `nasty mess' if the original input
  was a binaary file! Unless you are using `VMS private mode', in this
  case the file  is decompressed to  the original name  when an output
  file is not specified.

3 Options

  Options are  case insensitive  (unlike UNIX).  The following options
  are recognized :


    -B      Specifies that the output file is binary
    -Mn     Specifies number of bits to be used in LZ compression tables
    -V      Enables debugging level
    -X3     Read a file compressed by an old UNIX compress.
3 -B

  If the -B option  is given  then the  output file  is "binary",  not
  text (Ignored in VMS private mode).
3 -X3

  Specify  the -X3  option to  read files  compressed by  an  old UNIX
  version that doesn't generate header records.
3 -V

  -V [n]  Verbose if specified. If a value is specified, it will
  enable debugging code (if compiled in).
2 Info

  It is  recomended that  you use the  extension .LZC  for  the output
  files from the compressor (LZCOMP). They are then easily identified.

  I know some people `worry' about  compressing their files like this.
  If you are one of these people, then the following is for you!

  As this is a port of the UNIX compress program there should be few
  problems with the compression/decompression algorithm. If you wish
  to test that a file can be decompressed correctly, you can :

     o Decompress the compressed file to a temporary file, and use the
       DCL DIFFERENCE command to compare it with the original.
2 Archivers

  I  hope to get  the source to a  decent `archiver', as available for
  the  IBM  PC  etc.  Usage  of this  would supperceed  usage  of  the
  LZCOMP/LZDCMP package.

  I now have  the source code to an archiver, but it will require some
  work before  it can be generally  used on the  VAX. It is called ZOO
  and is the same as the ZOO archiver on the IBM PC. It can be used to
  read and write IBM PC ZOO archives.
2 Examples

  1) Compress a FORTRAN source file :

    $ LZC MYPROG.FOR MYRPOG.LZC

  2) Recover MYPROG.FOR from the compressed file

    $ LZD MYPROG.LZC MYPROG.FOR

  3) Decompress the above file to the terminal :

    $ LZD MYPROG.LZC

  4) Compress a group of files :

    $ BACKUP *.FOR TEMP.BCK/SAVE
    $ LZC TEMP.BCK MYPROGS.LZC
    $ DELETE TEMP.BCK;

  5) Recover the files from example 4 :

    $ LZD MYPROGS.LZC TEMP.BCK
    $ BACKUP TEMP.BCK/SAVE []
    $ DELETE TEMP.BCK;
    $ DELETE MYPROGS.LZC;
