home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / s / sms9233a.zip / LHATXT.EXE / LHA213.DOC
Text File  |  1992-03-30  |  31KB  |  867 lines

  1.                    Manual for LHA Version 2.13  Ver 2.13  July 20, 1991
  2.                              NIFTY-Serve  SDI00506    HARUYASU YOSHIZAKI
  3.                              ASCII-pcs    pcs02846    Yoshi
  4.                              PC-VAN       FEM12376
  5.  
  6.      This is a manual for the public release of LHA.EXE.v 2.13. LHA
  7.      is an upward compatible and improved version of LH Ver 1.13C.
  8.      Since Microsoft's DOS 5.0 now has an interior command LH (for
  9.      Load High), the name has been changed from LH.EXE to LHA.EXE.
  10.  
  11. 0.  To begin with
  12. -----------------
  13.  
  14.      This is a revised version of LH113c.EXE, an archiver which was
  15.      rather slow in execution but tight in compression rate.  I am
  16.      grateful for the support of LH113c's users both in Japan where
  17.      the .LZH file is a standard archived file name and in other
  18.      countries where .LZH has become well-known and used often.  I
  19.      have been  working on this new version for two years since the
  20.      last release of LH113c.EXE.  I am now glad to announce the re-
  21.      lease of LHA. I am constantly upgrading upon user's report on
  22.      bugs and on new requests.
  23.  
  24.      LHA differs from LH113c:
  25.      -----------------------
  26.  
  27.      LHA is better than LH Ver 1.13 in compression rate, especially
  28.      with large files.  There are a few exceptions if using rather
  29.      small files.  (Under 1 Kb.)  LHA is faster than LH113c in de-
  30.      compressing, with new static Huffman coding, compared with the
  31.      older dynamic Huffman.  The speed of compression is not as fast
  32.      as I was expecting.  <Sigh>
  33.  
  34.      LHA needs more memory than LH113c did.  If there is not enough
  35.      for LHA to work, it may have looser compression rate, although
  36.      it tries to continue execution.  LHA is upward compatible with
  37.      LH113c.  But LH113c is not completely compatible with the LHA
  38.      format.  Please switch from LH113c to LHA as soon as you can.
  39.      With the "/o" option, you can make archives dearchivable by
  40.      LHarc Ver 1.xx - otherwise LHarc will complain for "unknown
  41.      method".
  42.  
  43.      LHA is distributed as a free program with copyright reserved.
  44.      There is no restriction for the use within private corporations
  45.      or the use for governmental agencies.  Users must be respon-
  46.      sible for the use of facilities of the software, especially of
  47.      the auto ! batch file (Often called a "Telop file).  The soft-
  48.      ware is distributed as is.  I am not liable for any damage
  49.      caused by the use of this software.  For commercial use, please
  50.      refer to our distribution policy.
  51.  
  52.      You can now proceed to read the complete description of com-
  53.      mands and options.  However, if you are not familiar with what
  54.      an archiver is, please refer to the introductory note LHA.HLP
  55.      written especially for LHA.EXE by late Irvin Hoff.
  56.  
  57.  
  58. 1.  Usage
  59. ---------
  60.  
  61.   A.  General Format:
  62.   
  63.  
  64.     LHA <command> [/<option> ARC [[DIR\] [FILE]...]...  [-+012|WDIR]...]
  65.  
  66.  
  67.     <command>: if one is not used, you get the help screen or a list of
  68.                FILE(s).
  69.     <option>:  you may supply one or more of options explained below.
  70.                (needs an  /  or  -  in front, to designate an option)
  71.  
  72.     ARC:       archive name.
  73.     DIR:       base directory name.
  74.     FILE:      File name or full pathname if specified.
  75.     WDIR:      Working Directory name.
  76.  
  77.  
  78.   B.  <command>
  79.   
  80.  
  81.    a (Add) compress and add to an archive.
  82.  
  83.      Compress and Add files specified to an archive.  If the named
  84.      archive does not exist, then create one with the name.  LHA
  85.      overwrites any file in the archive by the given file name with
  86.      'a' command.  Compare with 'u' command.
  87.  
  88.      The commands 'a' and 'm' are used to make an archive.
  89.  
  90.      < Example 1 >  LHA a EX *.EXE
  91.  
  92.      LHA makes an archive named EX.LZH from all the files with ex-
  93.      tension 'EXE'.  Extension .LZH is default.
  94.  
  95.  
  96.    u (Update) Compress and Update.
  97.  
  98.      Compress and add files specified to an archive as command 'a'.
  99.      If LHA detects a file with the name same as the one in the
  100.      archive, then LHA selects the new one to add to archive, by
  101.      comparing the time stamp of each.
  102.  
  103.      < Example 2 > LHA u EX *.C
  104.  
  105.      All the FILE(s) with extension '.C' are archived in EX.LZH.
  106.      If you already have an SX.LZH containing a FILE with the same
  107.      name, only the one with newer time stamp is archived.
  108.  
  109.  
  110.    m (Move)
  111.  
  112.      Compress and add to an archive as 'u' command with checking
  113.      time stamps.  The difference is that LHA deletes all the files
  114.      moved into the archive.
  115.  
  116.      < Example 3 > LHA m EX *.C
  117.  
  118.      does  the same as
  119.  
  120.                   LHA u EX *.C
  121.                   del *.C
  122.  
  123.      Watch the second line.  With the /C option, LHA removes all the
  124.      FILE(s) into the ARChive ignoring time stamps.  You may lose
  125.      the one with the older time stamp.
  126.  
  127.  
  128.    f (Freshen)
  129.  
  130.      LHA looks for a FILE with the same name as the FILE in the
  131.      archive.  If it finds one with a newer time stamp, LHA
  132.      rewrites the one in the archive.  'LHA f /c ARC ' will not
  133.      check the time stamp.
  134.  
  135.      < Example 4 > LHA f EX LHA.DOC
  136.  
  137.      You have LHA.DOC compressed and archived in EX.LZH.  You get a
  138.      new LHA.DOC, then you replace the one in the ARChive, also.
  139.  
  140.  
  141.    d (Delete)
  142.  
  143.      LHA deletes a file (or files) in the archive.
  144.     
  145.      < Example 5 > LHA d ex lha.doc
  146.  
  147.      LHA deletes lha.doc in the ARChive ex.LZH.
  148.  
  149.    e (Extract)
  150.  
  151.      LHA extracts FILE(s) from the archive with decompressing.  If
  152.      LHA finds a FILE in the archive with a newer FILE on the same
  153.      DIR and having the same name, it skips that FILE(s).  LHA
  154.      extracts FILE(s) from ARChives made by L113C, namely, those
  155.      with the compression ids -lzs-, -lz4-, -lz5-.
  156.  
  157.      <Example 6 > LHA e EX 
  158.  
  159.      Extracts all the FILE(s) in the archive 'EX.LZH'.
  160.  
  161.      < Example 7 > LHA e EX *.COM
  162.  
  163.      LHA extracts all the files with extension .COM from 'EX.LZH'.
  164.  
  165.  
  166.   x (eXtract) LHA eXtracts compressed FILE with pathnames.
  167.  
  168.      If LHA can not find any path, then it will create directories.
  169.      FILE(s) must be archived with full-pathnames.  LHA restores the
  170.      entire directory structure.  'LHA e /x1m1 ARC' does the same.
  171.  
  172.      < EXample 8 > LHA x EX
  173.  
  174.      Suppose '\BIN\CG86.EXE' were among the FILE(s) in 'EX.LZH'.  LHA
  175.      creates directory '\BIN' if necessary, and extracts 'CG86.EXE'
  176.      there.
  177.  
  178.  
  179.    p (Print) Print FILE on standard out.
  180.  
  181.      LHA prints FILE decompressing from ARC to standard output.
  182.  
  183.      < Example 9 >  LHA  p ex lha.doc
  184.  
  185.      LHA extracts 'LHA.DOC' from 'EX.LZH' and displays it on your
  186.      terminal.
  187.  
  188.      < Example 10 > LHA p EX LHA.DOC > prn
  189.  
  190.      LHA extracts 'LHA.DOC' from 'EX.LZH' and prints it out from
  191.      your printer.
  192.  
  193.  
  194.    l (List)
  195.  
  196.      LHA lists FILE names in the archive on a line.  A FILE with
  197.      pathname will have a mark '+' on the head of the line.  'LHA
  198.      l /x ARC' shows full-pathnames of FILE(s) in ARC, and in 2 lines
  199.      per FILE.  You need not type 'l' to have the list.
  200.  
  201.      <Example 11> LHA LHA213.EXE
  202.  
  203.      LHA assumes command 'l' and shows list of FILE(s) archived FILE
  204.      per line.
  205.  
  206.      < Example 11x > LHA /x LHA213.EXE
  207.  
  208.      You get a similar list but full-pathnames are inserted, and
  209.      each FILE is shown on two lines.
  210.  
  211.      NOTE:  Forward slash '/' is used as the pathname separator.
  212.  
  213.  
  214.    v (View)
  215.  
  216.      'LHA v ARC' is the same with 'LHA l /x ARC'.
  217.  
  218.    t (Test)
  219.  
  220.      Check the integrity of ARC, by CRC check.
  221.  
  222.      LHA t LHA.EXE or LHA t LHA213.EXE
  223.  
  224.      will announce the authenticity of the file you own.
  225.  
  226.            LHA t LHA.EXE
  227.  
  228.      "This file seems to be ORIGINAL distributed from H.Yoshi."
  229.  
  230.      LHA.EXE tests itself for you.  This guarantees the version you
  231.      have is not hacked by anyone, though it is not the full guaran-
  232.      tee in the present state of art.  You can't check LHA.EXE if
  233.      you have used executable file compressors such as LZEXE, PKLITE
  234.      or DIET.
  235.  
  236.      < Example 12 > LHA t EX
  237.  
  238.      LHA tests integrity of the FILE(s) in 'EX.LZH'.
  239.  
  240.      < Example 13 > LHA t LHA.EXE
  241.  
  242.      LHA checks if LHA.EXE is the original file distributed.
  243.      
  244.      It has often been asked that files made by LHarc v 1.xx
  245.      fail this test. You cannot test LHARC.exe with this test.
  246.      If you get an answer "file corrupt", don't get panic.
  247.      These files often have extra padding in the back of the file.
  248.  
  249.    s (Self-extract)
  250.  
  251.      LHA makes a Self-Extracting archive from ARC.LZH.  The default
  252.      switch /x0 is assumed when you do not specify.  SFX made with
  253.      the /x0 switch, small model, extracts files on the current
  254.      directory.  You can't activate some programs in the archived
  255.      FILE(s) automatically with small model.  The size of the SFX file
  256.      is smaller than those made with /x1 switch, large model.
  257.  
  258.      The large model SFX has the ability to restore subdirectory
  259.      structures and can automatically start execution from a FILE
  260.      inside the archive.
  261.  
  262.      < Example 14 > LHA s EX
  263.  
  264.      In this case, LHA makes a small model EX.EXE from EX.LZH.
  265.      
  266.      We had many inquiries that LHA does not make SFX file.
  267.      You must first make LZH file by 'a' or 'm' command. Then
  268.      you use 's' command to make it a self-extracting file.
  269.  
  270.   C.  </option>
  271.   
  272.  
  273.      Each option takes 3 numerical values to define its finer
  274.      actions.  Use 0,1 and 2 to specify.  For some options, the
  275.      values 1 and 2 does the same thing.  You may toggle 0 and 1 by
  276.      '+' and '-" as with LH113c.  You may change switch character
  277.      (option) from  /  to  - if you prefer the '-'.
  278.  
  279.      /x[0|1] (eXtend)
  280.  
  281.  
  282.      LHA uses eXtended FILE names, namely full-pathnames for FILE(s).
  283.  
  284.      You are on the root directory.  Suppose you want to archive the
  285.      FILE '\tc\include\sys\stat.h' in an archive 'ARC.LZH'.  You type
  286.      'LHA a /x1 ARC.LZH \tc\include\sys\stat.h' to store the FILE
  287.      with full-pathname,'\tc\include\sys\stat.h'.  Similarly, you
  288.      have a 2-lined list with full-pathnames with 'l' command.
  289.  
  290.      /p[0|1|2] (Precise)
  291.  
  292.      Search file names precisely.
  293.  
  294.      Suppose an ARChive 'TC.LZH' contains both 'STAT.H' and
  295.      'SYS\STAT.H'.  A simple command like 'LHA e TC stat.h' will
  296.      extract both files on the current directory and let one
  297.      override the other.  To avoid such confusion, you can type 'LHA
  298.      e -p TC stat.h' to extract 'STAT.H' only.  While by typing 'LHA
  299.      e -p TC sys\stat.h' you will get 'SYS\STAT.H'.
  300.  
  301.      /c[0|1|2]  (ignore Comparison of time)
  302.  
  303.  
  304.      With commands 'u', 'f', 'e', 'x', LHA ignores the checking of
  305.      time stamps.  With these commands, LHA chooses the newest FILE
  306.      with the same pathname to act on, by default.  This option lets
  307.      LHA ignore the time stamps.
  308.  
  309.  
  310.      /m[0|1|2]  (no Message)
  311.  
  312.      The switch '/m1' let LHA assumes answer 'Y' for all the
  313.      queries. "LHA e /m1 ARC" will extract files in ARC.LZH
  314.      wherever "Y" is typed for the queries "Overwrite? [Y/N]"
  315.      are asked. If there is a file in the directory with the
  316.      same name but with attribute read-only, LHA reports
  317.      'file creation error'. Similarly LHA creates new directory
  318.      if it meets 'Directory DIR does not exit. Create [Y/N]'.
  319.    
  320.      On the other hand, with '/m2' switch LHA acts differently.
  321.      'LHA e /m2 ARC.LZH FILE' dearchives every FILE by choosing
  322.      an unused file extension among 000-999, when LHA finds
  323.      FILE(s) with the same name as in the ARChive.
  324.  
  325.      /a[0|1] (any Attribute)
  326.  
  327.  
  328.      This switch enables LHA to archive FILE(s) with any attributes.
  329.  
  330.      In the process of archiving with default switch /a0, LHA will
  331.      not archive FILE(s) with hidden and system attributes.  FILE(s)
  332.      with read-only attribute is archived with the attribute. With
  333.      this switch on, '/a1', FILE(s) of any attribute are archived
  334.  
  335.      In the process of dearchiving, with /a1, dearchived FILE(s)
  336.      preserve their original attributes. With /a0, you can't
  337.      dearchive files with hidden and system attributes.  Read-only
  338.      FILE(s) are dearchived deprived of their original attribute.
  339.  
  340.      /r[0|1|2] (Recursive)
  341.  
  342.  
  343.      LHA archives and extracts files recursively from subdirect-
  344.      ories.  'Recursively' means LHA searches all FILE(s) from all
  345.      subdirectories under the specified directory if there is any.
  346.  
  347.      There are three different modes for the '/r' switch.
  348.  
  349.      /r0: (non-recursive mode, default)
  350.  
  351.  
  352.      LHA collects files specified by path names only.
  353.  
  354.      /r1:
  355.  
  356.  
  357.      LHA separates the given pathname into a directory name and FILE
  358.      name.  LHA recursively collects FILE(s) with the given name from
  359.      all the directories under the directory specified.
  360.  
  361.      < Example 15 > LHA a /r1 SOURCE.LZH \SOURCE.C\SOURCE\*.H
  362.  
  363.      LHA collects FILE(s) with extension C and H from the directory
  364.      \source and its subdirectories, probably '\SOURCES\SAMPLES\*.C'
  365.      but not '\SOURCE\*.OBJ'.
  366.  
  367.      /r2:
  368.  
  369.      LHA recursively collects all the files from all the specified
  370.      subdirectories.  Tree structure of the specified directory is
  371.      archived as it is.
  372.  
  373.      < Example 16 > LHA a /r2x1 a:\*.*
  374.  
  375.  
  376.      NOTE:  LH113c has set /x whenever /r is set in 'e' or 'x'
  377.             commands.  LHA differs from LH113c in that /x is
  378.             not set with /r automatically.
  379.  
  380.      The following questions are the most frequently asked ones:
  381.  
  382.      (1) How do you backup a disk a: ?
  383.  
  384.                         LHA a /r2x1 LZH a:\
  385.  
  386.      (2) Then how do you retrieve all the directories and files on
  387.          b:?
  388.  
  389.                         LHA x ARC.LZH b:\
  390.  
  391.  
  392.      /w[0|1|<Directory Name>] (Work directory)
  393.  
  394.      Specify the directory name where LH makes temporary files.
  395.  
  396.                         LHA a /wd:\  ARC.LZH FILE(s)
  397.  
  398.      set -w switch on.
  399.  
  400.      By default, LHA makes all the temporary files on the directory
  401.      where ARC.LZH is to be made.  It will rename the temporary file
  402.      as ARC.LZH.
  403.  
  404.      LHA makes temporary files on the current directory if no name
  405.      is specified with '/w+'.
  406.  
  407.      When you set Environmental variable 'TMP' this switch is set
  408.      automatically to be 1, and you have the directory set by 'TMP'.
  409.      as your working directory.
  410.  
  411.      The switch helps LHA when you have not enough room in your base
  412.      directory, or when you have a high speed memory device like RAM
  413.      disk or HARD ram.
  414.  
  415.      /t[0|1] (Time stamp)
  416.  
  417.      With command a,u,m,f,d reset time stamp of ARC.lzh according to
  418.      the newest file in the archive.  By default, the time stamp of
  419.      an ARC.LZH is the time when the ARC.LZH is made.
  420.  
  421.  
  422.      /z[0|1|2] (Zero compression)
  423.  
  424.      LHA makes an archive without compressing.
  425.  
  426.      /z1: None of the FILE(s) is compressed
  427.  
  428.      /z2: Compress and archive except for the FILE(s) with exten-
  429.           sions:
  430.  
  431.                .ARC, .LZH, .LZS, .PAK, .ZIP, .ZOO.
  432.  
  433.      /z<extension>:  Do not compress FILE(s) with the specified
  434.      extension.  This switch assumes /z2.  You may use wild card to
  435.      specify, and you may or may not put '.' in front of the exten-
  436.      sion.  With '/zdbf' you don't compress FILE(s) with extension
  437.      '.DBF'.  With '/z' you will not have FILE(s) with no extension
  438.      compressed.  You may specify multiple extensions by writing
  439.      sequentailly:
  440.  
  441.                LHA a /ZCOM /ZERO ARChive.LH *.*.
  442.  
  443.      /o[0|1] (Old compatible compression)
  444.  
  445.      LHA makes an archive compatible with the LH113c format.  Even
  446.      in this case, LHA makes tighter compression than LH113c ver
  447.      1xx.  The header id is automatically set to -h1.
  448.  
  449.      /h[0|1|2] (Header level)
  450.  
  451.      Choice of header level, default is /h0.
  452.  
  453.  
  454.      /i[0|1] (don't Ignore case)
  455.  
  456.      Recognize Upper and Lower cases.  LH(arc)s have common header
  457.      format in other OS's where cases are recognized as distinct.
  458.      This option is prepared for dearchiving archives made by other
  459.      OS'.  In the DOS version of LHA, you can't differentiate upper
  460.      and lower when LHA archives FILE(s) into the archive.  Names
  461.      are all stored in upper case.
  462.  
  463.      /n[0|1|2] (No indicator)
  464.  
  465.      In this version, LHA outputs compressing indicator "ooo....."
  466.      to standard error.  The switch is to suppress this output.
  467.  
  468.      /n1: LHA disables output "ooo....." to indicate its progress.
  469.  
  470.      /n2: LHA disables outputs of filename, compression rates.
  471.  
  472.  
  473.      /l[0|1|2] (Long display ).
  474.  
  475.      LHA outputs filenames in different formats when LHA archives
  476.      and dearchives.
  477.  
  478.       /l0 : FILE names only.
  479.       /l1 : Full-pathnames stored or to be stored in archive in 2 lines.
  480.       /l2 : Full-pathname of FILEs accessed by LHA in 2 lines.
  481.  
  482.      < Example 16 > LHA a /r1x1l2 LINK.LZH c:\LINK.*
  483.  
  484.      LHA collects LINK.* with full-pathname from directories below
  485.      c:\, with information from where LHA gets this FILE(s).
  486.  
  487.      /-[1|2] (The first letter switch).
  488.  
  489.      LHA recognizes the characters '-' and '@' as the first letter
  490.      of a FILE name.  By default, any file beginning with '@', like
  491.      '@xxx' is recognized as a Response File 'xxx'.  
  492.  
  493.      With
  494.      '/-1' switch LHA reads '@' as a character in the file name,
  495.      while with switch
  496.      '/-2' LHA recognizes both '-' and '@' as characters.
  497.  
  498.      To exit from this mode specify '/-[0]'.  You cannot use '--0' 
  499.      in this particular case.  LHA believes '--0' as a file name.
  500.  
  501.      /s[0|1] (refrain from "Skipped filename.ext" message).
  502.      
  503.      When LHA finds a file with the same name with newer time stamp,
  504.      LHA skips decompressing a file from an ARChive. This message may
  505.      cause some confusion in Batch mode execution. You may suppress the
  506.      display. New from this version 2.13.
  507.  
  508.   D.  Base Directory.
  509.   
  510.  
  511.      Base directory is not the current nor the root directory.  It
  512.      is the directory on which LHA is executed.  Or you may believe
  513.      that you move to this directory and execute LHA from there. You
  514.      may specify a number of directories as your base directories.
  515.  
  516.  
  517.   < Example 17 > LHA x program c:\BIN\ *.EXE *.COM c:\TEMP\ *.MAN *.DOC
  518.                               ~~~~~~~             ~~~~~~~~
  519.  
  520.      Suppose you are on the directory d:\.  You want to extract
  521.      files with extensions .COM and .EXE on c:\BIN, and those with
  522.      extensions .MAN and .DOC on the directory c:\TEMP.  This is
  523.      equivalent to the following set of command lines:
  524.  
  525.              D>C:
  526.              C>CD \BIN
  527.              C>LHA x D:\program *.COM *.EXE
  528.              C>cd \TEMPp
  529.              C>LHA x D:\program *.MAN *.DIX
  530.  
  531.      Naturally, you can't dearchive a single FILE on multiple di-
  532.      rectories.  The directory specified first has the priority.
  533.  
  534.  
  535.   E.  DOS redirection and response file
  536.  
  537.      LHA can't accept too many file names on a command line due to
  538.      MS-DOS's restriction.  To avoid this inconvenience, LHA now
  539.      accepts PIPES and REDIRECTS of DOS.  Besides, LHA can use work
  540.      file called response file to record the names of the files to
  541.      be archived like MAKEFILE for some compilers.
  542.  
  543.  a.  Response File.
  544.  
  545.      The response file name will be marked with the letter '@' as of
  546.      LINK.EXE, which is a text file.  You may just write whatever
  547.      you want LHA to be done on this file.  Response file ignores CR
  548.      code and uses space as a separator.  You may write options in
  549.      the response file but you can't nest, calling other response
  550.      file, file names.
  551.  
  552.  
  553.  b.  DOS Pipes and Redirects.
  554.  
  555.      You may specify the same information supplied by a response
  556.      FILE by using pipes or redirections.  You may create a response
  557.      FILE by redirection.
  558.  
  559.      < Example 18 > LHA l /n1 PARTS > FILE(s)
  560.                     LHA a NEWPARTS @FILE(s)
  561.  
  562.      Make a list of files in the 'PARTS.LZH' archive and use it to
  563.      make a new ARChive 'NEWPARTS.LZH'.  This is done by using the
  564.      response files, after some editing.
  565.  
  566.      < Example 19 > LS | SORTR | LHA a ALL ls -c | LHA a ALL
  567.  
  568.      Make a list of files in a directory by LS.EXE.  Sort file names
  569.      and make a sorted archive ALL.LZH.  Beware of the various for-
  570.      mats from output of LS.EXE.  LS.EXE is supposed to list files
  571.      one name per line without any attributes or time stamps.  LS
  572.      designed after UNIX will do the trick by "ls -c" or "ls -C".
  573.      C or c stand for "sorted by columns".
  574.  
  575.  
  576.   F.  Environmental Variables
  577.   
  578.  
  579.  a.  LHA and LHARC
  580.  
  581.      LHA overrides LHARC.  This will reset default optional.
  582.  
  583.  
  584.  b.  TMP
  585.  
  586.      Set working directory as -w option.  In case LHA recognizes no
  587.      working directory, it uses the current directory as the working
  588.      directory and creates temporary files on it.
  589.  
  590.  
  591.  c.  TZ
  592.  
  593.      The time zone (EST, PST, etc.) must be set when you archive
  594.      with the header level -h2- and when you dearchive with -h2-. In
  595.      the Eastern Standard Time zone you have to set TIME ZONE with
  596.      the DOS command: set TZEST+5.  Remember the default Remember
  597.      the default header level is -h1-, in which case you are all
  598.      set.
  599.  
  600.  
  601.   G.  Exit Codes.
  602.   
  603.  
  604.      LHA will return following result codes after batch or other
  605.      processes' execution.
  606.  
  607.      0.  Normal.
  608.  
  609.      1.  CRC error occured, probably with 'e','x','t' commands.
  610.          Or LHA failed to create files because of disk space, or
  611.          because of files in existence.
  612.  
  613.      2.  Fatal error.  Process terminated without transactions.
  614.  
  615.      3.  Failed to write temporary files in the archive.  You may
  616.          find a temporary file LHTEMP)2(.LZH on your working direct-
  617.          ory.  You may rename this file with extension LZH, and use
  618.          it as an archive.
  619.  
  620.  
  621.   H.  Working File Names
  622.   
  623.  
  624.        LHTMP)1(.LZH : Old ARChive renamed.
  625.        LHTMP)2(.LZH : Working file to be renamed as ARChive.
  626.  
  627.  
  628. 2.SFX, Self-Extracting archive
  629. ------------------------------
  630.  
  631.       General Usage:
  632.  
  633.          SFX.EXE [/x] [/!] [/eDIR] [DIR]
  634.  
  635.            /x: do not create new directory.
  636.            /!: auto-execution batch enable.
  637.            /a: restore file attributes.
  638.            [/eDIR],[DIR]; specify directory to extract.
  639.  
  640.  
  641.          SFX.EXE is an executable file with FILE(s) stored in
  642.          the archive to be automatically extracted by exe-
  643.          cution.  All the LHA distribution will be in the
  644.          Self-Extracting (SFX) .EXE-format.  Only LHA.EXE makes
  645.          SFX files from archive *.LZH made by LHA.EXE.  You
  646.          can't make a Self-Extracting executable file from the
  647.          archive made by 'LH113c.1.xx'.
  648.  
  649.      LHA makes two models of SFX files: (a) the small model and (b)
  650.      the large model according to the switch /x0 or /x1, with the
  651.      following special functions.
  652.  
  653.  
  654.    A.  Telop.
  655.    
  656.  
  657.      LHA displays any file with name '!' if SFX.EXE finds it
  658.      archived. LHA holds one screen after showing [Y/N] prompt.  LHA
  659.      proceeds to execute if it receives 'Y'.  It quits (aborts)
  660.      execution for 'N'.  (The '!' character was used as it is the
  661.      first printing character.  A file starting with '!' will always
  662.      be the first file in that archive.)
  663.  
  664.  
  665.    B.  Directory Specification.
  666.    
  667.  
  668.      This is possible only for the large model.  You can name the
  669.      directory on which to execute SFX.EXE.
  670.  
  671.      < Example 20 > LHA213.EXE c:\user
  672.  
  673.      LHA extracts FILE(s) in LHA212.EXE on C:\USER.  You may of
  674.      course type:
  675.  
  676.                 LHA e /x0 LHA213.EXE c:\user ,
  677.  
  678.      to keep the TELOP file.
  679.  
  680.  
  681.    C.  Auto Execution
  682.    
  683.  
  684.      This is possible only for large models.
  685.  
  686.      Archive a batch file with the name "!.BAT" and include it in
  687.      the SFX file.  This batch works if and only if you type:
  688.  
  689.                      LHA213 /!
  690.  
  691.      LHA always extracts files on the current directory.  Any
  692.      existing "!.BAT" file is overwritten.  You can't activate an
  693.      existing !.BAT by using the "/!" switch even if there is one on
  694.      the current directory.  The batch file is read if and only if
  695.      it is archived in the SFX file.
  696.  
  697.      Two Models of Self-Extracting files are available:
  698.  
  699.  
  700.  a.  Small Model  (LHA s SFX.LZH)
  701.  
  702.      This is the default model.
  703.  
  704.      LHA ignores the directory structures even if you make the
  705.      archive file with the /x or /r[1|2] switch.  LHA holds only the
  706.      FILE names.  SFX.EXE extracts files to the current directory.
  707.  
  708.      There is no limit on the size of SFX.EXE as there was for
  709.      LH113c.
  710.  
  711.  
  712.  b.  Large Model  (LHA s /x1 SFX.LZH)
  713.  
  714.      You can run a batch file to specify the directory to extract
  715.      files.  You can retrieve original directory structures with
  716.      this model.  You may refrain from creating unexpected
  717.      structures by using the /x switch.
  718.  
  719.  
  720. 3.  Main Differences from LH113c
  721. --------------------------------
  722.  
  723.      LHA is an improved version of LH113c in principle.  You will
  724.      notice a number of differences between the two, when comparing.
  725.      Some of the differences will be mentioned at this time.  (You
  726.      may wish to read the LH113c manual for a better comparison if
  727.      anything appears confusing.)
  728.  
  729.      FILE names are not sorted when entered into an archive.  They
  730.      are entered in the order in which they appear in the directory,
  731.      when using wild cards.  (This is different from LH113c.) 
  732.      If you specify the order of FILE, then the order is
  733.      reproduced in the archive.  If you add new FILE(s), they will
  734.      be added at the end of the existing files.
  735.  
  736.      There are external utility programs by other authors which you
  737.      may use to sort the FILE names in your directory prior to
  738.      adding them to the archive.  Some programs actually resort the
  739.      archive itself.  Few include LH113c archives as LH113c already
  740.      sorted those.  LHA210 doesn't.  By using a 'pipe' you can type:
  741.  
  742.      < Example 21 >   LS *.C *.H | SORT | LHA a EX.
  743.  
  744.      LHA collects FILE(s) with extensions C and H sorted in the
  745.      archive named 'EX.LZH'.
  746.  
  747.      With LHA, the /r switch does not necessarily activate the /x
  748.      switch in extraction. In this version of LHA, the 'x' command
  749.      is equivalent to using 'E /x1m1', namely, LHA restores all the
  750.      tree structures of subdirectories.
  751.  
  752.      LHARC executed an AUTOLARC.BAT file by key word upon self-
  753.      extracting.  LHA no more uses keyword comparison.  If a SFX
  754.      file contains an !.BAT file, the batch is activated by '-!'
  755.      following the executable file name.
  756.  
  757.      The time stamp of LHA is relatively counted from 1970-01-01,
  758.      00:00:00 UTC by seconds.  You must be careful not to set date
  759.      or time which is illusory, like 00-00-00.  LHA will display
  760.      some indefinite date from overflow of the counter.
  761.  
  762.  
  763. 4.  Our distribution Policy
  764. ---------------------------
  765.  
  766.      This software, this document and LHA.EXE, is a copyright-
  767.      reserved free program.  You may use, copy and distribute this
  768.      software free of charge under the following conditions.
  769.  
  770.   1.  Never change Copyright statement.
  771.  
  772.   2.  The enclosed documents must be distributed with as a package.
  773.  
  774.   3.  When you have changed the program, or implemented the program
  775.       for other OS or environment, then you must specify the part
  776.       you have changed.  Also make a clear statement as to your name
  777.       and MAIL address or phone number.
  778.  
  779.   4.  The author is not liable for any damage on your side caused by
  780.       the use of this program.
  781.  
  782.   5.  The author has no duty to remedy for the deficiencies of the
  783.       program.
  784.  
  785.   6.  When you are to distribute this software with publications or
  786.       with your product, you have to print the copyright statement
  787.       somewhere on the disk or on the package.  You cannot
  788.       distribute this software with copyprotected products.
  789.  
  790.           As long as those conditions are satisfied, you do not
  791.           need to get the author's permission to use or to dis-
  792.           tribute the software.
  793.  
  794.  
  795. 5.  How to contact the author.
  796. ------------------------------
  797.  
  798.      Please send MAIL to Forum flabo on Nifty Serve.  Go Nifty on
  799.      CompuServe and read the instructions there.  Your inquiries or
  800.      your questions are to be addressed to the one of the above
  801.      Nifty forums.  Direct MAIL to the author.
  802.  
  803.     My mail address :  SDI00506 | PFF00253 on Nifty Serve.
  804.                        pcs02846               ASCII-NET pcs.
  805.                        FEM12376               PC-VAN.
  806.  
  807.     Oversea Users may send inquiries, also, to K.Okubo to the address:
  808.                        [74100,2565]        on Compuserve,
  809.                        K.Okubo                Genie,
  810.                        c00236@sinet.ad.jp.    INTERNET,CSNET etc.
  811.  
  812.  
  813. 6. Acknowledgments
  814. -------------------
  815.  
  816.      I used the following softwares distributed on BBS.
  817.  
  818.      1. LSI-C86 ver 3.20 evaluation copy, from LSI Japan.
  819.  
  820.      2. A-MACROS /Structured Assembler Macros, from AMSCLS.INC
  821.         (c) Hortense S. Endoh 1986,1987 ver.2.10. I appreciate
  822.         the public distribution of these excellent softwares.
  823.  
  824.      What have I done in these days of rapidly changing software
  825.      technologies?  My LH113c has contributed for the improvements
  826.      of similar products such as PKZIP(tm) and PAK(tm).  Even with
  827.      my modest Japanese estimate, I can be proud of this achievement
  828.      at this time.  I thank all those people who supported and used
  829.      LH113c - voices of users have always been a constant encourage-
  830.      ment to me.
  831.  
  832.         I express my gratitude to Haruhiko Okumura and members
  833.         of SIG Science of PCVAN for the improvements of algo-
  834.         rithms,
  835.  
  836.         to K.Okubo who introduced and supported LH113c on over-
  837.         sea networks such as CompuServe and GEnie.
  838.  
  839.         to late Irvin Hoff, CP/M sysop Compusrve, who reviewed
  840.         the English version for spelling, grammar and English
  841.         phrasing while he was struggling with cancer,
  842.  
  843.         to K.Miki who introduced me to archivers and hold a
  844.         place for experiments,
  845.  
  846.         to members of LSI-Japan who offered excellent versions
  847.         of LSI-C, to the members of Forum FHONYAKU who prepared
  848.         the English manual, and finally to all who used LH113c
  849.         and supported it.
  850.  
  851.  
  852. 7.  Reference
  853. -------------
  854.   1.  Knuth, D.E., Dynamic Huffman Coding, J.Algorithms, 6:163-180.
  855.   2.  Kurita, T.   Harddisk Cook Book.  1987 Shoeisha,Tokyo.
  856.   3.  Kurita, T.  Tool Box of Computing, Huffman Coding, bit
  857.       70:100-101,1988.
  858.   4.  Okumura,K.,Masuyama,K.,Miki,K.  Practice and theory of Data
  859.       Compression.  The Basic, 70(March):1-65,1989.
  860.   5.  Fiala,E.R., and Greene,D.H., Data Compression with Finite Win-
  861.       dows, Comm.ACM, 32:490-595,1989.
  862.   6.  Okumura,H., and Yoshizaki,H.  Introduction to  Compression
  863.       Algorithm, C Magazine 3:1:44-68,1991.
  864.  
  865.                               - end -
  866.  
  867.