home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / pascal / lzw4p12.zip / LZW4P.DOC < prev    next >
Text File  |  1993-02-28  |  32KB  |  962 lines

  1.  
  2.  
  3.                           LZW Data Compression Library
  4.  
  5.                                 For Turbo Pascal
  6.  
  7.  
  8.                                     (LZW4P)
  9.  
  10.  
  11.  
  12.                                  USERS MANUAL
  13.  
  14.  
  15.  
  16.  
  17.  
  18.                                    Version 1.2
  19.  
  20.                                   March 1, 1993
  21.  
  22.  
  23.  
  24.  
  25.                         This software is provided as-is.
  26.                  There are no warranties, expressed or implied.
  27.  
  28.  
  29.  
  30.  
  31.                               Copyright (C) 1993
  32.                               All rights reserved
  33.  
  34.  
  35.  
  36.                               MarshallSoft Computing, Inc.
  37.                               Post Office Box 4543
  38.                               Huntsville AL 35815
  39.  
  40.                               205-881-4630  Voice / FAX
  41.                               205-880-9748  Support BBS
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.         LZW4P Users Manual                                     Page 1
  61.                               C O N T E N T S
  62.  
  63.  
  64.  
  65.  
  66.  
  67.          Chapter                                                   Page
  68.  
  69.          1.0 Introduction..............................................3
  70.              1.1 Distribution Files....................................3
  71.              1.2 Compiling the Library.................................4
  72.              1.3 User Support..........................................4
  73.              1.4 Installation..........................................5
  74.          2.0 The LZW Algorithm.........................................6
  75.              2.1 LZW Compression.......................................6
  76.              2.2 LZW Expansion.........................................7
  77.              2.3 LZW Implementation....................................7
  78.          3.0 Example Programs..........................................8
  79.              3.1 COMPRESS..............................................8
  80.              3.2 EXPAND................................................8
  81.              3.3 TEST_LZW..............................................9
  82.              3.4 MK_ARC................................................9
  83.              3.5 UN_ARC................................................9
  84.              3.6 SEE_ARC...............................................9
  85.          4.0 Reader & Writer Functions................................10
  86.          5.0 Library Functions........................................11
  87.              5.1 InitLZW..............................................11
  88.              5.2 TermLZW..............................................11
  89.              5.3 Compress.............................................12
  90.              5.4 Expand...............................................12
  91.          6.0 Error Codes..............................................13
  92.              6.1 EXPANSION_ERROR......................................13
  93.              6.2 CANNOT_ALLOCATE......................................13
  94.              6.3 INTERNAL_ERROR.......................................13
  95.              6.4 NOT_READY............................................13
  96.          7.0 Legal Issues.............................................14
  97.              7.1 Registration.........................................14
  98.              7.2 License..............................................15
  99.              7.3 Warranty.............................................15
  100.          8.0 Revision History.........................................16
  101.          9.0 Other MarshallSoft Computing Products for Pascal.........16
  102.              9.1 The Personal Communications Library for Pascal.......16
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.         LZW4P Users Manual                                     Page 2
  121.          1.0 Introduction
  122.  
  123.  
  124.          LZW4P  consists  of a variable code size implementation of the LZW
  125.          (Lempel-Ziv-Welch) algorithm  for  compressing  and  decompressing
  126.          data.   LZW does particularly well on text files, achieving better
  127.          than a 50 % compression ratio for many files.
  128.  
  129.          The  LZW  algorithm  is  considered  to be one of the best general
  130.          purpose algorithms available today.  The  new  high  speed  modems
  131.          that  employ  on-the-fly  data  compression (such as MNP 5.0 & the
  132.          V.42 bis international standard) use the LZW  algorithm,  as  well
  133.          as such well known utility programs such as PKZIP.
  134.  
  135.          The  LZW4P  library  is  designed  to be used in a wide variety of
  136.          situations. Some of the possible uses include:
  137.  
  138.          1) Compression and expanding files on disk.
  139.          2) Compressing files "on the fly" before  sending  over  a  modem,
  140.             and then expanding on the receiving end.
  141.          3) Compression of data files used by your application program such
  142.             as help files, graphics screens, etc. The compressed data files
  143.             are then expanded as they are loaded by the application.
  144.  
  145.  
  146.          1.1 Distribution Files
  147.  
  148.          The distribution files are as follows:
  149.  
  150.  
  151.           1) LZW4P.DOC    -- This documentation file.
  152.           2) LZW4P.INV    -- Invoice file.
  153.           3) COMPRESS.PAS -- Data compression example program.
  154.           4) EXPAND.PAS   -- Data expansion example program.
  155.           5) LZW4P.PAS    -- Library unit interface.
  156.           6) TEST_LZW.PAS -- LZW test driver program.
  157.           7) MK_ARC.PAS   -- File archiving program.
  158.           8) UN_ARC.PAS   -- File un-archiving program.
  159.           9) RW_IO.PAS    -- Reader/Writer I/O source file.
  160.          10) DIR_IO.PAS   -- Directory I/O source file.
  161.          11) LZW_ERR.PAS  -- Displays text error messages.
  162.          12) MEMORY.PAS   -- Memory allocation functions.
  163.          13) HEX_IO.PAS   -- Procedure to read & write hexidecimal.
  164.          14) LZW4PLIB.OBJ -- Library object file.
  165.  
  166.          Registered users also receive:
  167.  
  168.           1) LZW4PLIB.ASM -- Library source file.
  169.           2) MAKETPU.BAT  -- Makes library object from source.
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.         LZW4P Users Manual                                     Page 3
  181.          1.2 Compiling the Library
  182.  
  183.  
  184.          If you are not running Turbo Pascal 6.0, you may need to recompile
  185.          the library unit as follows:
  186.  
  187.                TPC LZW4P
  188.  
  189.          The registered user can recompile the source code (source code  is
  190.          provided  in  the  registered  version  only)  for  the library as
  191.          follows:
  192.  
  193.                MAKETPU
  194.  
  195.          or
  196.  
  197.                MASM LZW4PLIB.ASM,LZW4PLIB.OBJ /DPASCAL_MODEL;
  198.                TPC LZW4P
  199.  
  200.  
  201.          1.3 User Support
  202.  
  203.          We  want you to be successful in developing your application using
  204.          our libraries! We depend on our customers to let us know what they
  205.          need in a library.  This means we are committed to  providing  the
  206.          best  libraries  that  we  can.   If  you  have any suggestions or
  207.          comments, please write to us or give us a call.
  208.  
  209.          If you are having a problem using LZW4P or any of  our  libraries,
  210.          call  (205)  881-4630  between  5  PM  and 9 PM CST Monday through
  211.          Friday.  You can call at other times and leave a message, and call
  212.          back later during our regular business hours for a reply. You  can
  213.          also FAX us at this same number at any time.
  214.  
  215.          You  may  also  call  our  24  hour  BBS at any time. The BBS will
  216.          contain the latest shareware version of LZW4P, messages, and other
  217.          related files. All files are in  standard  ZIP  format.   You  can
  218.          leave a message on the BBS, and we will usually have a reply ready
  219.          for  you  within  24  hours.   The  dedicated  telephone number is
  220.          205-880-9748.  Set your modem for 1200 to 9600 baud, 8 data  bits,
  221.          no parity, one stop bit.
  222.  
  223.          The  MarshallSoft  Computing,  Inc.   newsletter  "Comm  Talk"  is
  224.          published quarterly.  It discusses various communications problems
  225.          and solutions using PCL (the communications library)  as  well  as
  226.          related  information  such as data compression issues.  Registered
  227.          users receive a one year  complimentary  subscription  when  first
  228.          registering  and  for  each update purchased.  Additional one year
  229.          subscriptions are $15 plus $5 for overseas  postage  (postpaid  in
  230.          US).
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.         LZW4P Users Manual                                     Page 4
  241.          1.4 Installation
  242.  
  243.  
  244.          (1) Make a backup  copy  of  your  distribution  disk.   Put  your
  245.          original distribution disk in a safe place.
  246.  
  247.          (2)  Create  a  work  directory  on  your work disk (normally your
  248.          harddisk). For example, to create a work directory named LZW4P, we
  249.          first log onto the work disk and then type:
  250.  
  251.                                MKDIR LZW4P
  252.  
  253.          (3)  Copy  all the files from your backup copy of the distribution
  254.          disk to your work directory.  For example, to  copy  from  the  A:
  255.          drive to your work directory, we type:
  256.  
  257.                               CD LZW4P
  258.                               COPY A:*.*
  259.  
  260.          (4) The library unit LZW4P.TPU is compiled with Turbo Pascal  6.0.
  261.          If  you  are  using  another  version  (4.0  or above), you should
  262.          recompile the library unit as follows:
  263.  
  264.                TPC LZW4P
  265.  
  266.          (5) Compile COMPRESS.PAS, EXPAND.PAS,  TEST_LZW.PAS,  MK_ARC,  and
  267.          UN_ARC.  For example, to make TEST_LZW.EXE:
  268.  
  269.                TPC TEST_LZW
  270.  
  271.          You  may  want  to run TEST_LZW on some of your files as a test of
  272.          the library functions.
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.         LZW4P Users Manual                                     Page 5
  301.          2.0 The LZW Algorithm
  302.  
  303.  
  304.          The following discussion of the LZW algorithm is meant to  provide
  305.          a  high  level  overview  of  LZW.  For those interested in a more
  306.          detailed explanation, several good books  are  available  on  data
  307.          compression.
  308.  
  309.          The original research papers on what is now called LZW compression
  310.          are:
  311.  
  312.              J. ZIV and A. Lempel,
  313.              "A Universal Algorithm for Sequential Data Compression",
  314.              IEEE Transactions on Information Theory, May 1977.
  315.  
  316.              Terry Welch,
  317.              "A Technique for High-Performance Data Compression",
  318.               Computer, June 1984.
  319.  
  320.  
  321.          2.1 LZW Compression
  322.  
  323.  
  324.          The LZW compressor reads  8-bit  bytes  from  a  data  source  and
  325.          outputs  N-bit codes each of which identifies a previously defined
  326.          string.  The value of N starts at 9. Thus,  codes  0  through  255
  327.          ($ff)  correspond with the standard character set, while codes 256
  328.          ($100) through 511 ($1ff) correspond to  a  byte-byte  pair  or  a
  329.          code-byte pair in the code table. After code 511 is output, 10 bit
  330.          codes  are used. This is repeated until the maximum number of bits
  331.          per code is reached (14 in the LZW4P library).
  332.  
  333.          The LZW compressor builds a code table as it compresses data.  The
  334.          code table consists of previously encountered strings.
  335.  
  336.          The basic LZW compression algorithm is as follows:
  337.  
  338.              STRING = get first input byte
  339.              while there is more input data
  340.                {BYTE = get next input byte
  341.                 if STRING+BYTE is in code table
  342.                    STRING=STRING+BYTE
  343.                 else
  344.                   {output code for STRING
  345.                    add STRING+BYTE to code table
  346.                    STRING = BYTE
  347.                   }
  348.               }
  349.              output the code for STRING
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.         LZW4P Users Manual                                     Page 6
  361.          2.2 LZW Expansion
  362.  
  363.  
  364.          The LZW expansion routine reads the N-bit codes previously created
  365.          by  the  LZW  compressor  and  reconstructs  the  code  table  (as
  366.          previously constructed by the compressor) as it is outputing 8-bit
  367.          bytes.   A  code corresponds to a single byte (the first 256 codes
  368.          from $00 through $ff), or a byte-byte pair in the code table, or a
  369.          code-byte pair in the code table. In the later case, the code part
  370.          of the code-byte pair refers to another defined code pair  in  the
  371.          table.   As  each code is read in, it is located in the code table
  372.          and the corresponding 8-bit bytes are  output.   This  means  that
  373.          codes must be defined before they are needed for expansion. Unlike
  374.          older  dictionary  based  compression schemes, the code dictionary
  375.          produced by the compressor routine does not have to be provided to
  376.          the expansion routine.
  377.  
  378.          The basic LZW de-compression algorithm is as follows:
  379.  
  380.              OLDCODE = input first code
  381.              output OLDCODE
  382.              while there is more input data
  383.                {NEWCODE = get next input code
  384.                 STRING = translation of NEWCODE
  385.                 output STRING
  386.                 BYTE = 1st byte of STRING
  387.                 add OLDCODE+BYTE to the code table
  388.                 OLDCODE = NEWCODE
  389.                }
  390.  
  391.          2.3 Implementation
  392.  
  393.  
  394.          The LZW4P library is written in assembly language.  Any  Microsoft
  395.          or  compatible assembler will assemble it. The decision to program
  396.          LZW4P in assembler was made in order to get the  absolute  maximum
  397.          performance  possible.   Although Turbo Pascal is very good, it is
  398.          still bigger and slower than hand optimized assembler.
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.         LZW4P Users Manual                                     Page 7
  421.          3.0 Example Programs
  422.  
  423.  
  424.          Five example programs are provided.  Each example  program  should
  425.          be  compiled  and  tested.   These  example  programs are meant to
  426.          demonstrate various ways in which the LZW compression library  can
  427.          be used.
  428.  
  429.  
  430.          3.1 COMPRESS
  431.  
  432.  
  433.          The  program  COMPRESS  is  provided  as  both  a  standalone  LZW
  434.          compression  program,  and  as  an example of how to use the LZW4P
  435.          library to compress a file. In order to run COMPRESS, type
  436.  
  437.              COMPRESS <infile> <outfile>
  438.  
  439.          For example, to compress LZW4P.DOC to LZW4P.LZW, type
  440.  
  441.              COMPRESS LZW4P.DOC LZW4P.LZW
  442.  
  443.  
  444.          3.2 EXPAND
  445.  
  446.  
  447.          The   program   EXPAND  is  provided  as  both  a  standalone  LZW
  448.          de-compression program, and as an example of how to use the  LZW4P
  449.          library to de-compress a file. In order to run EXPAND, type
  450.  
  451.              EXPAND <infile> <outfile>
  452.  
  453.          For example, to de-compress LZW4P.LZW to LZW4P.DOC, type
  454.  
  455.              COMPRESS LZW4P.LZW LZW4P.DOC
  456.  
  457.          Of course, you can only decompress a file that has been compressed
  458.          with COMPRESS.
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.         LZW4P Users Manual                                     Page 8
  481.          3.3 TEST_LZW
  482.  
  483.  
  484.          The  program  TEST_LZW is used to compress, expand, and verify one
  485.          or more files. It's purpose is for you to test the  LZW4P  library
  486.          on  your  own files.  Your files are never modified.  However, you
  487.          can NOT specify a file named "XXX.XXX" or  "YYY.YYY"  since  these
  488.          files  are  work  files  used by COMPRESS and EXPAND.  Compression
  489.          ratios ( compressed_size / original_size ) are  printed  for  each
  490.          file  compressed.   For  example,  to test all files ending with a
  491.          *.PAS extension:
  492.  
  493.              TEST_LZW *.PAS
  494.  
  495.          After compiling TEST_LZW, run it  against  a  large  directory  of
  496.          files as a test of the library.
  497.  
  498.  
  499.          3.4 MK_ARC
  500.  
  501.  
  502.          The program MK_ARC is used to create an archive file. For example,
  503.          to create an archive named  PASCAL.ARF  consisting  of  all  files
  504.          ending with the extension '.PAS', type:
  505.  
  506.              MK_ARC *.PAS PASCAL.ARF
  507.  
  508.  
  509.          3.5 UN_ARC
  510.  
  511.  
  512.          The  program  UN_ARC  is  used to un-archive the files archived by
  513.          MK_ARC. For example, to un-archive PASCAL.ARF, type:
  514.  
  515.              UN_ARC PASCAL.ARF
  516.  
  517.          Note  that  the  UN_ARC  program  can be modified to provide for a
  518.          customized product installation program.
  519.  
  520.  
  521.          3.6 SEE_ARC
  522.  
  523.  
  524.          The program SEE_ARC is used to list the files in any archive  file
  525.          created with MK_ARC. For example, to see the files in PASCAL.ARF:
  526.  
  527.              SEE_ARC PASCAL.ARF
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.         LZW4P Users Manual                                     Page 9
  541.          4.0 Reader & Writer Functions
  542.  
  543.  
  544.          Both  the  compression and expansion routines in the LZW4P library
  545.          use Reader and Writer functions supplied by  the  library  caller.
  546.          The  user  may replace the supplied Reader and Writer functions as
  547.          long as the following guidelines are followed.
  548.  
  549.          The Reader function always returns the next input  byte  from  the
  550.          input  stream.  The Reader function is not limited to reading from
  551.          disk.  It may read from any data source as long as it returns a -1
  552.          when there is no more data to be read.
  553.  
  554.          Similiarly, the Writer function writes the next output byte to the
  555.          output stream. The writer function may write to any data sink.
  556.  
  557.          The Reader and Writer functions are provided as a  means  to  give
  558.          the caller complete control over the source and destination of the
  559.          data stream during compression and expansion. For example, instead
  560.          of  disk I/O, the Reader and Writer functions could be reading and
  561.          writing to a serial port.
  562.  
  563.          The Pascal procedures BlockRead and BlockWrite are used to  buffer
  564.          disk  I/O  for  the  Reader  and  Writer functions. The Reader and
  565.          Writer functions are defined as follows:
  566.  
  567.              type String12 = String[12];
  568.  
  569.              function ReaderOpen(Filename : String12) : Integer;
  570.              function Reader : Integer;
  571.              function ReaderClose : Integer;
  572.              function ReaderCount : LongInt;
  573.  
  574.              function WriterOpen(Filename : String12) : Integer;
  575.              function Writer(TheByte : Byte) : Integer;
  576.              function WriterClose : Integer;
  577.  
  578.          Note that the Reader returns a -1 for an end  of  data  condition.
  579.          Data is returned as an integer with the high byte set to 0.  Thus,
  580.          the  only  integers  can  can  be  returned  by  the Reader are -1
  581.          ($ffff) and 0 ($0000) to 255 ($00ff).
  582.  
  583.          If  you  remove  data from a character buffer, be sure to zero out
  584.          the high order byte (AND with $00ff) unless you are  returning  a
  585.          -1  (EOF).
  586.  
  587.          See RW_IO.PAS for the Reader / Writer code.
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.         LZW4P Users Manual                                     Page 10
  601.          5.0 Library Functions
  602.  
  603.  
  604.          5.1 InitLZW
  605.  
  606.  
  607.          Function:     Initialize library
  608.  
  609.          Prototype:    function InitLZW(AllocP : Pointer) : Integer;
  610.  
  611.          Description:  The  InitLZW  function  is  used to initialize the
  612.                        library. The single argument is the function name of
  613.                        a user supplied memory allocation function. See  the
  614.                        MEMORY.PAS function.
  615.  
  616.          Returns:      -2 : (CANNOT_ALLOCATE) -- if unable to allocate.
  617.                         0 : (AOK) -- no error.
  618.  
  619.          Example:      (* initialize LZW4P *)
  620.                        var AllocMemoryP : Pointer;
  621.                        ...
  622.                        AllocMemoryP := @AllocMemory;
  623.                        Code := InitLZW(AllocMemoryP);
  624.  
  625.  
  626.          5.2 TermLZW
  627.  
  628.  
  629.          Function:     Terminate library
  630.  
  631.          Prototype:    function TermLZW(FreeP : Pointer) : Integer;
  632.  
  633.  
  634.          Description:  The  TermLZW  function  is  used  to  terminate  the
  635.                        library after all processing is  done.   The  single
  636.                        argument  is  the  function  name of a user supplied
  637.                        memory de-allocation function.  This is primarily  a
  638.                        way   to   free memory allocated by InitLZW. See the
  639.                        MEMORY.PAS function.
  640.  
  641.          Returns:      0 : (AOK) -- no error.
  642.  
  643.          Example:      (* terminate LZW4P *)
  644.                        var FreeMemoryP : Pointer;
  645.                        ...
  646.                        FreeMemoryP := @FreeMemory;
  647.                        Code := TermLZW(FreeMemoryP);
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.         LZW4P Users Manual                                     Page 11
  661.          5.3 Compress
  662.  
  663.  
  664.          Function:     Compresses a data set.
  665.  
  666.          Prototype:    function Compress(ReaderP,WriterP:Pointer) :Integer;
  667.  
  668.          Description:  The  Compress  function  is used to compress  a data
  669.                        set.  The Reader function always  returns  the  next
  670.                        input  byte.  The  Writer function consumes the next
  671.                        output byte. Refer to the section  on  Reader/Writer
  672.                        I/O.
  673.  
  674.          Returns:      -4 : (NOT_READY) -- Didn't call InitLZW first.
  675.                         0 : (AOK) -- No error.
  676.  
  677.          Example:      (* compress a file *)
  678.                        Var ReaderP : Pointer;
  679.                            WriterP : Pointer;
  680.                        ...
  681.                        ReaderP := @Reader;
  682.                        WriterP := @Writer;
  683.                        Code := Compress(ReaderP,WriterP);
  684.  
  685.  
  686.          5.4 Expand
  687.  
  688.  
  689.          Function:     Expands a file.
  690.  
  691.          Prototype:    function Expand(ReaderP,WriterP:Pointer) :Integer;
  692.  
  693.          Description:  The  Expand  function is used to de-compress  a file
  694.                        previously compressed with  the  Compress  function.
  695.                        The  Reader  function  always returns the next input
  696.                        byte.  The Writer function consumes the next  output
  697.                        byte.  Refer  to  the  section on Reader/Writer I/O.
  698.  
  699.          Returns:      -1 : (EXPANSION_ERROR)  -- File not compressed by
  700.                              the compress function.
  701.                         0 : (AOK) -- No error.
  702.  
  703.          Example:      (*  de-compress a file *)
  704.                        Var ReaderP : Pointer;
  705.                            WriterP : Pointer;
  706.                        ...
  707.                        ReaderP := @Reader;
  708.                        WriterP := @Writer;
  709.                        Code := Expand(ReaderP,WriterP);
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.         LZW4P Users Manual                                     Page 12
  721.          6.0 Error Codes
  722.  
  723.  
  724.          Be  sure and check the return codes from each LZW4P function call.
  725.          There are only 4 error codes returned by the LZW4P  library  other
  726.          than  0  (no  error). All error codes are negative numbers.  Their
  727.          numerical values are in the LZW4P.PAS file.
  728.  
  729.          Each error code is returned by a library function as follows:
  730.  
  731.          ****************************************************************
  732.          *    Error Name    *  IntLZW  *  TermLZW * Compress *  Expand  *
  733.          ****************************************************************
  734.          * EXPANSION_ERROR  *    No    *    No    *    No    *    Yes   *
  735.          * CANNOT_ALLOCATE  *    Yes   *    No    *    No    *    No    *
  736.          * INTERNAL_ERROR   *    Yes   *    No    *    No    *    No    *
  737.          * NOT_READY        *    No    *    No    *    Yes   *    Yes   *
  738.          ****************************************************************
  739.  
  740.  
  741.          6.1 EXPANSION_ERROR
  742.  
  743.  
  744.          An  EXPANSION_ERROR  error  is returned only by the Expand library
  745.          function. It is caused by attempting to expand a file that was not
  746.          compressed by the Compress function.  Note, however,  that  Expand
  747.          may  expand  a  file  that  was not compressed by Compress without
  748.          returning an EXPANSION error.
  749.  
  750.  
  751.          6.2 CANNOT_ALLOCATE
  752.  
  753.  
  754.          A CANNOT_ALLOCATE error is returned only by  the  InitLZW  library
  755.          function.   It is caused when the Alloc function passed to InitLZW
  756.          returns  a  NULL  pointer,  indicating  that  it  cannot  allocate
  757.          sufficient memory.
  758.  
  759.  
  760.          6.3 INTERNAL_ERROR
  761.  
  762.  
  763.          An  INTERNAL_ERROR  error  is returned only by the InitLZW library
  764.          function and only in the  shareware  version.   It  is  caused  by
  765.          modification  of  the  Shareware screen. You should never get this
  766.          error.
  767.  
  768.  
  769.          6.4 NOT_READY
  770.  
  771.  
  772.          A NOT_READY error is  returned  by  the  Compress  and  Expand
  773.          library  functions. It is caused by calling Compress or Expand
  774.          without first calling InitLZW.
  775.  
  776.  
  777.  
  778.  
  779.  
  780.         LZW4P Users Manual                                     Page 13
  781.          7.0 Legal Issues
  782.  
  783.  
  784.          7.1 Registration
  785.  
  786.  
  787.          The  shareware  version  of  LZW4P  is  provided  so  that you may
  788.          personally determine the usefulness of the product  for  yourself.
  789.          If you can use the LZW4P Data Compression Library, please register
  790.          your  use  with  us.   Send  $35  plus $3 S&H ($6 outside of North
  791.          America) in US funds to:
  792.  
  793.                   MarshallSoft Computing, Inc.
  794.                   Post Office Box  4543
  795.                   Huntsville AL 35815
  796.  
  797.          We accept  American  Express  (account  number,  expiration  date,
  798.          exact  name  on  your  card,  and  AmEx billing address required),
  799.          checks in US dollars drawn on a US  bank,  purchase  orders  (POs)
  800.          from   recognized  US  schools  and  companies  listed  in  Dun  &
  801.          Bradstreet, and COD (street address  and  phone  number  required)
  802.          within  the  USA (plus a $3 COD charge).  Print the file PCL4C.INV
  803.          if an invoice is needed. The registered package  is  mailed  first
  804.          class US Mail (packet air mail overseas).
  805.  
  806.  
  807.          Print  the file LZW4P.INV if an invoice is needed.  The registered
  808.          package is mailed first class US Mail (packet air mail overseas).
  809.  
  810.          The registered package includes:
  811.  
  812.          o  No shareware screen.
  813.          o  Assembler source code for the library.
  814.          o  Laser printed Users Manual.
  815.          o  Telephone / FAX / BBS  support for one year.
  816.          o  One year subscription (quarterly) to MSC newsletter.
  817.             (requires extra $5 postage if overseas)
  818.          o  All updates (with printed manuals) are $15  plus  $3  S&H
  819.             ($6 outside of North America).
  820.  
  821.          LZW4P.ASM is the source code for the library. The source  code  is
  822.          copyrighted  by MarshallSoft Computing, Inc. The user is granted a
  823.          license to use the LZW4P object code in his own application  only.
  824.          LZW4P.ASM  is  not  shareware and may not be sold or given away to
  825.          anyone.
  826.  
  827.          The registered user will receive the latest version  of  LZW4P  by
  828.          return  mail.  A 5.25" diskette is provided unless a 3.5" diskette
  829.          is requested.
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.         LZW4P Users Manual                                     Page 14
  841.          7.2 License
  842.  
  843.  
  844.          MarshallSoft Computing, Inc. grants the registered user  of  LZW4P
  845.          the  right  to  use  the  LZW4P  library  (in  object form) in the
  846.          development  of  any  software  product  without  any   royalties.
  847.          However,  the  source  code for the library may not be released in
  848.          whole or in part.
  849.  
  850.  
  851.          7.3 Warranty
  852.  
  853.  
  854.          MARSHALLSOFT COMPUTING, INC. DISCLAIMS ALL WARRANTIES RELATING  TO
  855.          THIS  SOFTWARE,  WHETHER  EXPRESSED  OR IMPLIED, INCLUDING BUT NOT
  856.          LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY  AND  FITNESS
  857.          FOR  A  PARTICULAR  PURPOSE, AND ALL SUCH WARRANTIES ARE EXPRESSLY
  858.          AND SPECIFICALLY DISCLAIMED. NEITHER MARSHALLSOFT COMPUTING,  INC.
  859.          NOR ANYONE ELSE WHO HAS BEEN INVOLVED IN THE CREATION, PRODUCTION,
  860.          OR  DELIVERY  OF  THIS  SOFTWARE SHALL BE LIABLE FOR ANY INDIRECT,
  861.  
  862.          CONSEQUENTIAL, OR INCIDENTAL DAMAGES ARISING OUT  OF  THE  USE  OR
  863.          INABILITY  TO  USE  SUCH  SOFTWARE EVEN IF MARSHALLSOFT COMPUTING,
  864.          INC.  HAS BEEN ADVISED OF  THE  POSSIBILITY  OF  SUCH  DAMAGES  OR
  865.          CLAIMS. IN NO EVENT SHALL MARSHALLSOFT COMPUTING, INC.'S LIABILITY
  866.          FOR ANY SUCH DAMAGES EVER EXCEED THE PRICE PAID FOR THE LICENSE TO
  867.          USE  THE SOFTWARE, REGARDLESS OF THE FORM OF THE CLAIM. THE PERSON
  868.          USING  THE  SOFTWARE  BEARS  ALL  RISK  AS  TO  THE  QUALITY   AND
  869.          PERFORMANCE OF THE SOFTWARE.
  870.  
  871.          Some  states  do not allow the exclusion of the limit of liability
  872.          for consequential or incidental damages, so the  above  limitation
  873.          may not apply to you.
  874.  
  875.          This  agreement  shall  be  governed  by  the laws of the State of
  876.          Alabama and shall inure to the benefit of Marshallsoft  Computing,
  877.          Inc.   and  any successors, administrators, heirs and assigns. Any
  878.          action or proceeding brought by either  party  against  the  other
  879.          arising  out of or related to this agreement shall be brought only
  880.          in a STATE or FEDERAL COURT of competent jurisdiction  located  in
  881.          Madison County, Alabama. The parties hereby consent to in personam
  882.          jurisdiction of said courts.
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.         LZW4P Users Manual                                     Page 15
  901.          8.0 Revision History
  902.  
  903.  
  904.          Version 1.0 -- October 8, 1992 -- original release (C only).
  905.  
  906.          Version 1.1 -- November 11, 1992  (C only)
  907.  
  908.          o Added MK_ARC example program.
  909.          o Added UN_ARC example program.
  910.  
  911.          Version 1.2 -- March 1, 1993  (1st release of PASCAL version)
  912.  
  913.          o SEE_ARC example program added.
  914.          o Minor speed improvements.
  915.  
  916.  
  917.          9.0 Other MarshallSoft Computing Products for Pascal
  918.  
  919.          Shareware versions of  all  MarshallSoft  Computing  products  are
  920.          available on our user support BBS 205-880-9748.
  921.  
  922.          9.1 The Personal Communications Library for Pascal
  923.  
  924.  
  925.          The Personal Communications Library for the Pascal (PCL4P)  is  an
  926.          asynchronous   communications  library  designed  for  experienced
  927.          software developers programming in Turbo Pascal. The PCL features:
  928.  
  929.          o 30 communications and support functions.
  930.          o Support for the high performance INS16550 UART.
  931.          o Supports hardware (RTS/CTS) flow control.
  932.          o Interrupt driven receiver.
  933.          o Supports 300 baud to 115,200 baud.
  934.          o Supports COM1, COM2, COM3, and  COM4.
  935.          o Adjustable receive queues from 8 bytes to 32 KB.
  936.          o Control-BREAK error exit.
  937.          o 17 communications error conditions trapped.
  938.          o Allows 4 ports to run concurrently.
  939.          o Complete modem control & status.
  940.          o Written in assembly language for small size & high speed.
  941.          o Terminal program featuring XMODEM, YMODEM, & YMODEM-G.
  942.  
  943.          The   Personal   Communications  Library  for  Pascal  (PCL4P)  is
  944.          available for $55 plus  $3  S&H  ($6  S&H  overseas).
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.         LZW4P Users Manual                                     Page 16
  961.  
  962.