home *** CD-ROM | disk | FTP | other *** search
/ PC Games 2 the Maxx / pcgames.zip / pcgames / MISC / PCPRO2.ZIP / PCL_EXE.ZIP / LHA212.DOC < prev    next >
Encoding:
Text File  |  1991-11-25  |  31.2 KB  |  886 lines

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