home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / PXOS221A.LZH / POLYXPLN.DOC < prev   
Text File  |  1991-04-05  |  21KB  |  490 lines

  1.  
  2.  
  3.  
  4.  
  5.                      PolyXarc Configuration File Explanation
  6.                        Public Domain by Jeffrey J. Nonken
  7.                                  31 March, 1991
  8.  
  9.         In  this  document  I pick apart the configuration  file  that  I 
  10.         distribute   with  PolyXarc,  and  explain  some  details   about 
  11.         different archivers. I figured this would enhance my explanations 
  12.         in POLYXARC.DOC, which aren't as clear as I'd like them to be.
  13.  
  14.         Note  that while I tried to be reasonably accurate,  the  version 
  15.         numbers and some other niggling details should not be  considered 
  16.         completely reliable. Relax; this isn't a history test, it's  just 
  17.         an overview of how PolyXarc interacts with various archivers.
  18.  
  19.                                        ARC
  20.                                        ===
  21.  
  22.         ARC  files use different compression methods, depending  on  what 
  23.         program  you're using and what it decides is the best  method  to 
  24.         use. These compression methods are represented in the .ARC  files 
  25.         with  what  I call "levels", and what SEA calls  "header  types". 
  26.         Levels up to 9 are:
  27.  
  28.          Level  Common name  Compression method
  29.           ----  -----------  ------------------
  30.              1  stored       No compression (short header)
  31.              2  Stored       No compression (standard header)
  32.              3  Packed       Repeated Character Compression
  33.              4  Squeezed     RCC followed by Huffman
  34.              5  crunched     12 bit Lempel-Ziv
  35.              6  crunched     RCC followed by 12 bit Lempel-Ziv
  36.              7  crunched     RCC followed by 12 bit Lempel-Ziv, alternate 
  37.                              hash function
  38.              8  Crunched     RCC followed by variable 12 bit Lempel-Ziv 
  39.                              with dynamic reset
  40.              9  Squashed     variable 13 bit Lempel-Ziv with dynamic 
  41.                 or Deviant   reset
  42.  
  43.         PKware  and Nogate Consulting call level 9 "Squashed"; SEA  calls 
  44.         level  9 "Deviant". However, it is the same format. Level  10  is 
  45.         used  differently by two different programs: PAK, which calls  it 
  46.         "Crushed",  and  ARC+PLUS  (also known as  ARC  7.0).  These  two 
  47.         programs  use  different compression  algorithms,  and  therefore 
  48.         archives  with  files compressed at level 10 are  not  compatible 
  49.         between the two. Level 11 is as of this writing only used by  PAK 
  50.         2.51 and is called "Distilled".
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.                                    1
  63.  
  64.  
  65.  
  66.                              Who Can Decompress What
  67.                     |   1   2   3   4   5   6   7   8   9  10  11
  68.           ----------+------------------------------------------------------
  69.             ARC 4.5 |   x   x   x   x   x   x   x
  70.             ARC 5.0 |   x   x   x   x   x   x   x   x
  71.             ARC 6.0 |   x   x   x   x   x   x   x   x   x
  72.             ARC 7.0 |   x   x   x   x   x   x   x   x   x   1
  73.         PKUNPAK     |   x   x   x   x   x   x   x   x   x
  74.             PAK 1.0 |   x   x   x   x   x   x   x   x   x   2
  75.             PAK 2.5 |   x   x   x   x   x   x   x   x   x   2   x
  76.                            x = can decompress
  77.                            1 = ARC+PLUS version of level 10
  78.                            2 = PAK version of level 10
  79.  
  80.         ARCE  is  equivalent to ARC 5.0. XARC is equivalent  to  ARC  7.0 
  81.         (ARC+PLUS). PKUNPAK is the same thing as PKXARC 3.60.
  82.  
  83.         As  if that weren't confusing enough: as of ARC version 6.0,  SEA 
  84.         came out with an extended format. Header types 1-19 are  reserved 
  85.         for compression methods (what I call compression levels);  header 
  86.         types  20 and up are reserved for extended information. This  may 
  87.         include  extended  name  and  path  information;  extended   date 
  88.         information; icon bit maps; and so on. This is called a  "version 
  89.         6" format ARC file, presumably because it was introduced with ARC 
  90.         version  6.  So  far only ARC versions 6 and 7  can  dearchive  a 
  91.         version 6 file.
  92.  
  93.         So  we  have  to  deal with both ARC  levels  and  ARC  versions. 
  94.         Fortunately for our sanity, only ARC+PLUS can create an ARC+PLUS-
  95.         type  level 10 header, and it can only do it in a version  6  ARC 
  96.         file,  which  according  to Thom Henderson  will  always  contain 
  97.         version  6 headers (type 20 and up). This means we can  tell  the 
  98.         difference between PAK level 10 and ARC+PLUS level 10 compression 
  99.         by checking the file for version 6 headers: if it's got version 6 
  100.         headers and level 10 compression, it's ARC+PLUS; if it's only got 
  101.         version  5  headers and level 10 compression, it's PAK.  This  is 
  102.         exactly how PolyXarc tells the difference.
  103.  
  104.         In  fact, when PolyXarc goes through the ARC file, it  looks  for 
  105.         both  version  and highest level. If it finds the  archive  is  a 
  106.         version  6 file, it simply ignores all the version 5  dearchivers 
  107.         when it looks for the proper one to use.
  108.  
  109.         The  following paragraphs describe the ARC description  lines  in 
  110.         POLYXARC.CFG.  The examples I give assume you are  attempting  to 
  111.         decompress  a  file  called TEST.ARC.  Since  the  filenames  are 
  112.         usually optional, I will put "[*.*]" where the filenames go.
  113.  
  114.            ARC  level overwrite extract command_template
  115.            ---- ----- --------- ------- ----------------
  116.            ARC    8      w         ""   arc e%2 %3 %4
  117.  
  118.         This defines an ARC 5.x template. ARC 5 will extract up to  level 
  119.         8.  Normal syntax is "arc e TEST.ARC [*.*]"; overwrite mode  will 
  120.         use "arc ew TEST.ARC [*.*]". 
  121.  
  122.  
  123.                                    2
  124.  
  125.  
  126.  
  127.  
  128.            ARC  level overwrite extract command_template
  129.            ---- ----- --------- ------- ----------------
  130.            ARC    8      /r        ""   arce %3 %4 %2
  131.  
  132.         This  defines a template for ARCE, which is a fast ARC  extractor 
  133.         written  in  assembly.  It is the equivalent of  ARC  version  5. 
  134.         Normal syntax is "arce TEST.ARC [*.*]"; overwrite mode will  use 
  135.         "arce TEST.ARC [*.*] /r". 
  136.  
  137.            ARC  level overwrite extract command_template
  138.            ---- ----- --------- ------- ----------------
  139.            ARC    9      /r        ""   pkxarc %2 %3 %4
  140.  
  141.         This  template  is for PKXARC, which can extract up  to  level  9 
  142.         compression. Normal syntax is "pkxarc TEST.ARC [*.*]"; overwrite mode 
  143.         will use "pkxarc /r TEST.ARC [*.*]".
  144.  
  145.            ARC  level overwrite extract command_template
  146.            ---- ----- --------- ------- ----------------
  147.            ARC    9      /r        ""   pkunpak %2 %3 %4
  148.  
  149.         This  template  is for PKUNPAK, which can extract up to  level  9 
  150.         compression. PKUNPAK is version 3.61 of PKXARC; there are no real 
  151.         differences  between  them. Normal syntax  is  "pkunpak  TEST.ARC 
  152.         [*.*]"; overwrite mode will use "pkunpak /r TEST.ARC [*.*]".
  153.  
  154.            ARC  level overwrite extract command_template
  155.            ---- ----- --------- ------- ----------------
  156.            ARC   11     /WA        ""   pak /e %2 %3 %4
  157.  
  158.         This  template  is  for PAK, which can extract up  to  level  11. 
  159.         However,  PAK will not extract level 10 files if the archive  was 
  160.         made  by ARC+PLUS, but only if it was made by PAK. Normal  syntax 
  161.         is  "PAK /e TEST.ARC [*.*]"; overwrite mode will use "PAK /e  /WA 
  162.         TEST.ARC [*.*]".
  163.  
  164.  
  165.            ARC  level overwrite extract command_template
  166.            ---- ----- --------- ------- ----------------
  167.            ARC   11     /WA       /WO   pak /e %1%2 %3 %4
  168.  
  169.         This  is an alternate syntax for PAK 2.51. If you use this  line, 
  170.         if  PAK  encounters a file already on disk that it is  trying  to 
  171.         extract from the archive, if the archive file is newer, PAK  will 
  172.         replace  the older file. Normally without the /WO  parameter  PAK 
  173.         will  stop  and ask whether you want to overwrite. In  this  case 
  174.         syntax  for extraction will be "pak /e /WO TEST.ARC  [*.*]",  and 
  175.         for overwrite will be "pak /e /WA TEST.ARC [*.*]".
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.                                    3
  185.  
  186.  
  187.  
  188.            ARC  level overwrite extract command_template
  189.            ---- ----- --------- ------- ----------------
  190.            ARC6   9       w        ""   arc e%2 %3 %4
  191.  
  192.         This defines an ARC 6.0 template. ARC 6 will extract up to  level 
  193.         9.  In  addition, it can extract from version 6 ARC files  up  to 
  194.         level 9. Normal syntax is "arc e TEST.ARC [*.*]"; overwrite  mode 
  195.         will use "arc ew TEST.ARC [*.*]". 
  196.  
  197.  
  198.            ARC  level overwrite extract command_template
  199.            ---- ----- --------- ------- ----------------
  200.            ARC6      10    /o  !  xarc %2 %3 %4
  201.  
  202.         This  defines  a template for XARC. XARC is  a  free-distribution 
  203.         unarchiver  for ARC 7.0, also called ARC+PLUS. XARC will  extract 
  204.         up  to level 9, and will also extract version 6 ARC files  up  to 
  205.         level 10. Note that XARC will not extract PAK level 10 files, but 
  206.         only  ARC+PLUS  level 10 files. Normal syntax is  "xarc  TEST.ARC 
  207.         [*.*]"; overwrite mode will use "xarc /o TEST.ARC [*.*]". 
  208.  
  209.            ARC  level overwrite extract command_template
  210.            ---- ----- --------- ------- ----------------
  211.            ARC6      10     o  !  arc e%2 %3 %4
  212.  
  213.         This  defines  a template for ARC 7.0 (ARC+PLUS).  ARC+PLUS  will 
  214.         extract up to level 9, and will also extract version 6 ARC  files 
  215.         up to level 10. Note that ARC+PLUS will not extract PAK level  10 
  216.         files, but only ARC+PLUS level 10 files. Normal syntax is "arc  e 
  217.         TEST.ARC [*.*]"; overwrite mode will use "arc eo TEST.ARC [*.*]". 
  218.  
  219.                                  OTHER ARCHIVERS
  220.                                  ===============
  221.  
  222.         There  is a plethora of formats other than ARC. Every year or  so 
  223.         sees a new archiver, usually with a new format, and each time  it 
  224.         seems that improvements have been made on the speed or amount  of 
  225.         compression or both. And each format is incompatible with all the 
  226.         others.
  227.  
  228.         The  strength of PolyXarc is in the fact that you can program  it 
  229.         to  recognize  new  formats  simply  by  adding  a  line  in  the 
  230.         configuration  file.  Most archivers leave  a  "signature";  some 
  231.         constant set of values or characters imbedded in the archive file 
  232.         for distinguishing one type of archive from another. PolyXarc can 
  233.         be  configured  to  read  that  signature  and  determine   which 
  234.         dearchiver to use to access the files in the archive.
  235.  
  236.         Thus come the Signature lines in the configuration file. Each one 
  237.         shows  not only the command template, but also the signature  and 
  238.         where to find it. 
  239.  
  240.         For  these  examples  I  will use  TEST.ext,  where  ext  is  the 
  241.         archiver's native extension.
  242.  
  243.  
  244.  
  245.                                    4
  246.  
  247.  
  248.  
  249.                                        DWC
  250.                                        ---
  251.  
  252.         First  we'll  tackle  DWC. DWC stands for David  W.  Cooper,  the 
  253.         author  of the program. Originally DWC source was available,  but 
  254.         Mr.  Cooper sold his program to a commercial  interest;  versions 
  255.         written since then have not had source available. In fact, I have 
  256.         only  seen one version at all since then. DWC also requires  that 
  257.         all its archives have ".DWC" as an extension. It also is  unusual 
  258.         because it has its signature at the end of the file, rather  than 
  259.         at  or near the beginning of the file as most archivers do.  That 
  260.         can cause problems for recognition after an XMODEM-type download, 
  261.         because  the end of a file transferred via XMODEM is padded  with 
  262.         extra  characters,  and  the signature is no longer  at  a  fixed 
  263.         location  from the end of the file. Since DWC isn't  particularly 
  264.         fast and doesn't make particularly small archives, all this makes 
  265.         it of rather limited use.
  266.  
  267.         You'll  notice that the signature, "DWC", is shown to be  at  -3. 
  268.         That  means that PolyXarc should count backwards from the end  of 
  269.         the  file  by three characters. That count actually  starts  from 
  270.         just  past  the end of the file; the last character in  the  file 
  271.         would be at -1. So "DWC" is actually the last three characters of 
  272.         the file.
  273.  
  274.           SIGNATURE offset signature overwrite extract command_template
  275.           --------- ------ --------- --------- ------- ----------------
  276.           SIGNATURE   -3      DWC        w        ""   dwc e%2 %3 %4
  277.  
  278.         Normal syntax is "dwc e TEST.ARC [*.*]"; overwrite mode will  use 
  279.         "dwc ew TEST.ARC [*.*]". 
  280.  
  281.                                       LHARC
  282.                                       -----
  283.  
  284.         LHARC, written by a Japanese gentleman named Haruyasu  Yoshizaki, 
  285.         came out around 1990. It stopped at version 1.13 for a while, but 
  286.         in  1991 Yoshi came out with version 2.05. LHARC creates some  of 
  287.         the  smallest  archives of all, but unfortunatly  is  very,  very 
  288.         slow.  However, verion 2.0x is a great improvement over 1.1x;  it 
  289.         not  only has a new, smaller compression algorithm, but  is  much 
  290.         faster  (though  still  slow), and  can  even  create  backwards-
  291.         compatible  files  that are slightly smaller  than  the  original 
  292.         program made. It is now called LHA. 
  293.  
  294.         LHARC's signature is actually the compression method flag for the 
  295.         first  file.  Fortunatly that flag is always in the  same  place. 
  296.         Flags  seen so far are "-lh0-" through "-lh5-", so we  just  look 
  297.         for  the first three characters, "-lh"; as long as Yoshi  doesn't 
  298.         change the way the archiver works, that should be able to  handle 
  299.         LHARC files forever.
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.                                    5
  307.  
  308.  
  309.  
  310.           SIGNATURE offset signature overwrite extract command_template
  311.           --------- ------ --------- --------- ------- ----------------
  312.           SIGNATURE    2      -lh       /mc       ""   lharc e %2 %3 %4
  313.           SIGNATURE    2      -lh       /mc       ""   lha e %2 %3 %4
  314.  
  315.         Normal  syntax  is "lharc e TEST.LZH [*.*]" or  "lha  e  TEST.LZH 
  316.         [*.*]". Overwrite syntax is "lharc e /mc TEST.LZH [*.*]" or  "lha 
  317.         e /mc TEST.LZH [*.*]"
  318.  
  319.                                      XARCMAC
  320.                                      -------
  321.  
  322.         There  is  an  ARC-like  program  available  for  the   MacIntosh 
  323.         computer.  An extractor is available for the IBM  family,  called 
  324.         "XARCMAC". The run-time help claims the files are ARC compatible, 
  325.         but  none of the ARC programs I have will extract files from  it. 
  326.         Fortunatly it has a unique signature; instead of storing a hex 1A 
  327.         as the first byte of the file, which ARC does, this format has  a 
  328.         1B.  XARCMAC  -- at least, the version given to me --  will  only 
  329.         extract  and list files, and has no overwrite mode. It is  really 
  330.         only  useful for extracting files created on a MacIntosh  by  the 
  331.         one particular program.
  332.  
  333.           SIGNATURE offset signature overwrite extract command_template
  334.           --------- ------ --------- --------- ------- ----------------
  335.           SIGNATURE    0     <1B>        ""       ""   xarcmac e %3 %4
  336.  
  337.         Notice  that  this  signature has angle-brackets  <>  around  the 
  338.         signature. That means it gets treated as a hex value, rather than 
  339.         text. The only syntax PolyXarc will create with this is  "xarcmac 
  340.         e TEST.MAC [*.*]".
  341.  
  342.                                        ZOO
  343.                                        ---
  344.  
  345.         Though relatively slow and cumbersome, Rahul Dhesi's program  ZOO 
  346.         has  been ported onto a number of platforms and is quite  popular 
  347.         in some circles.
  348.  
  349.         This  one is awfully straightforward; the signature is "ZOO"  and 
  350.         is at the very beginning of the file.
  351.  
  352.           SIGNATURE offset signature overwrite extract command_template
  353.           --------- ------ --------- --------- ------- ----------------
  354.           SIGNATURE    0      ZOO        o        ""   zoo x%2 %3 %4
  355.  
  356.         Normal  syntax is "zoo x TEST.ZOO [*.*]"; overwrite mode is  "zoo 
  357.         xo TEST.ZOO [*.*]". Note that the overwrite command is the letter 
  358.         O, not the number 0.
  359.  
  360.         There  is  an extract-only program available on  most  platforms, 
  361.         called "BOOZ". I do not presently have a copy of it, but I'm sure 
  362.         the syntax would be quite simple to add to PolyXarc.
  363.  
  364.  
  365.  
  366.  
  367.                                    6
  368.  
  369.  
  370.  
  371.                                        ARJ
  372.                                        ---
  373.  
  374.         This is a new archiver; version 1.00 was released early in  1991. 
  375.         It creates very small archives quickly. The author also claims to 
  376.         be working on a program called ARJX that is supposed to make even 
  377.         smaller files even more quickly. As it stands, ARJ is one of  the 
  378.         best archivers for speed and size. 
  379.  
  380.           SIGNATURE offset signature overwrite extract command_template
  381.           --------- ------ --------- --------- ------- ----------------
  382.           SIGNATURE    0     <60EA>     -y        ""   arj e %2 %3 %4
  383.  
  384.         Normal syntax is "arj e TEST.ARJ [*.*]"; overwrite syntax is "arj 
  385.         e -y TEST.ARJ [*.*]".
  386.  
  387.                                        ZIP
  388.                                        ---
  389.  
  390.         PKZIP  is the latest offering from Phil Katz. PKZIP is  generally 
  391.         recognized  as  creating  the smallest archives,  and  being  the 
  392.         fastest  archiver for the compression ratio, though some  of  the 
  393.         other  new  programs and new versions of old programs  have  been 
  394.         giving it a run for its money. LHARC also sometimes makes smaller 
  395.         files,  though nobody has been able to positively  demonstrate  a 
  396.         clear edge of one over the other.
  397.  
  398.         PAK  2.51 now also includes ZIP capability. This allows a lot  of 
  399.         versatility  in one program. However, PKZIP is still  faster  and 
  400.         still usually produces smaller archives.
  401.  
  402.          SIGNATURE offset signature overwrite extract command_template
  403.          --------- ------ --------- --------- ------- ----------------
  404.          SIGNATURE    0       PK       -o        ""   pkunzip %2 %3 %4
  405.          SIGNATURE    0       PK      /WA        ""   pak e /z %2 %3 %4
  406.          SIGNATURE    0       PK      /WA       /WO   pak e /z %1%2 %3 %4
  407.  
  408.         See  the ARC section for notes on PAK's overwrite  modes.  Normal 
  409.         syntax is: "pkunzip TEST.ZIP [*.*]" or "pak e /z TEST.ZIP  [*.*]" 
  410.         or "pak e /z /WO TEST.ZIP [*.*]". Overwrite syntax is "pkunzip -o 
  411.         TEST.ZIP  [*.*]" or "pak e /z /WA TEST.ZIP [*.*]". Note that  the 
  412.         /z  is not necessary; once PAK determines the file type, it  will 
  413.         correctly treat it as a .ZIP file.
  414.  
  415.                                       - - -
  416.  
  417.         Well,  that  concludes  our  little  lecture.  If  you  have  any 
  418.         questions about the options I've chosen, or the syntaxes for  the 
  419.         different  archivers, I recommend you look at  the  documentation 
  420.         that came with the archiver. If you're still confused, try  using 
  421.         the  examples in POLYXARC.CFG. Make sure the archiver is in  your 
  422.         execution path someplace. 
  423.  
  424.  
  425.  
  426.  
  427.  
  428.                                    7
  429.  
  430.  
  431.  
  432.         If  you  have an archiver I haven't covered here, please  let  me 
  433.         know.  Especially,  if it isn't a commercial product, send  me  a 
  434.         copy  of the archiver; I'm always interested in adding new  ones, 
  435.         and  it's easiest to support and test if I have a copy  available 
  436.         to run.
  437.  
  438.                         Jeffrey J. Nonken
  439.                         1706 Cherrie Circle
  440.                         Blue Bell, Pa.   19422-3412
  441.                         BBS: (215)279-9799 HST/v.32
  442.                         Fidonet: 1:273/715
  443.                         Internet: Jeffrey.Nonken@f715.n273.z1.fidonet.org
  444.  
  445.         Note: the above Snailmail address and phone number may change  in 
  446.         the  next few months. Please use my Fidonet or Internet  address, 
  447.         or check the latest Nodelist for the current information.
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.                                    8
  490.