home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1992 / TheOrigSharewareV1.cdr / 25 / pak151.exe / pak / PAK.DOC < prev    next >
Text File  |  1989-01-15  |  38KB  |  1,255 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.                                  PAK
  20.  
  21.                      The File Compression Utility
  22.                              Version 1.5
  23.  
  24.                          Copyright 1988, 1989
  25.                                   by
  26.                           NoGate Consulting
  27.                             P.O. Box 88115
  28.                      Grand Rapids, MI 49518-0115
  29.                             (616)455-6270
  30.                                    
  31.                          ALL RIGHTS RESERVED
  32.  
  33.                                _______
  34.                           ____|__     |               (tm)
  35.                        --|       |    |-------------------
  36.                          |   ____|__  |  Association of
  37.                          |  |       |_|  Shareware
  38.                          |__|   o   |    Professionals
  39.                        -----|   |   |---------------------
  40.                             |___|___|    MEMBER
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73. Introduction...............................................1
  74.     Purpose of PAK.........................................1
  75.     The Shareware Concept..................................1
  76.     Registration and Benefits..............................1
  77.     Other NoGate Products..................................2
  78.     List of Files..........................................2
  79. Using the Command Line Version Of PAK......................3
  80.     A Note on the Interface................................3
  81.     Archive Files..........................................3
  82.         Creating An Archive................................3
  83.         The Add Command....................................3
  84.         The Move Command...................................4
  85.         The Update Command.................................4
  86.         The Freshen Command................................4
  87.     Extracting Files From An Archive.......................5
  88.         The Extract Command................................5
  89.         The Extract and Remove Command.....................5
  90.         Extracting Files to the Screen or Printer..........6
  91.     Managing Archives......................................6
  92.         Listing Files......................................6
  93.         Deleting Files.....................................7
  94.         Testing files......................................7
  95.     Adding Remarks to Archives.............................7
  96.         The /R option......................................8
  97.         The Revise command.................................8
  98.     Converting Archives from ARC and PKARC.................8
  99.     Options................................................8
  100.         Moving Files (/M)..................................9
  101.         Duplicate Files (/D)...............................9
  102.         Replacing Existing Files (/W)......................9
  103.         Use Remarks (/R)..................................10
  104.         Crunch and Squash (/C and /S).....................10
  105.         Encrypting Files (/G).............................10
  106.         Sorting Files (/O)................................11
  107.         Pack Archives (/P)................................11
  108.         The Temporary Path (/T)...........................11
  109.     General Syntax........................................12
  110.         Summary of Standard PAK Commands..................12
  111.     Limitations...........................................13
  112. PAKINST (PAK install program).............................13
  113.     Command Definitions...................................14
  114.     Option Definitions....................................14
  115.     Comments..............................................15
  116. EXEMAKE (Make self-extracting archives)...................15
  117. Appendices................................................15
  118.     Release History.......................................15
  119.     PAK's Advanced Compression............................16
  120.     Technical Notes on File Formats.......................16
  121.     Credits...............................................17
  122.     
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. PAK (C) 1988, 1989 NoGate Consulting                  Jan 12th 1989  Page 1
  137.  
  138.  
  139.  
  140. Introduction
  141.  
  142. Purpose of PAK
  143.  
  144.      PAK is a utility to create and maintain file archives in
  145. compressed form.  There are several advantages to compressing files.
  146.      On a hard disk, most files are accessed infrequently.  Reducing
  147. the size of these files allows more of them to remain on the hard
  148. disk, where they are more accessible than on a floppy in a file
  149. cabinet, and frees disk space for other use.
  150.      Backup is simpler, faster, and cheaper, since the files are
  151. smaller and organized into related groups.
  152.      Most importantly, compressed files take less time to transmit via
  153. modem, and time is money when the transmission is long distance, or to
  154. a service such as CompuServe.  Even on local computer bulletin boards,
  155. reduced transmission time is an advantage.
  156.  
  157.      PAK is intended as a replacement for ARC by System Enhancement
  158. Associates and PKARC by Philip Katz.  While PAK is roughly 2.5 times
  159. as fast as ARC, speed is not the emphasis, and PAK does not attempt to
  160. compete with PKARC in this respect.  However, PAK produces archive
  161. files that are consistently 50% to 90% of the size produced by either
  162. ARC or PKARC, and supports files created by either program.  In
  163. particular, PAK handles large text files and non-text files of any
  164. length much better than the either of these programs.  In addition,
  165. the full screen version is much easier to use than ARC or PKARC.
  166.  
  167. The Shareware Concept
  168.  
  169.      PAK is distributed as shareware.
  170.      Shareware is commercial software distributed in an unconventional
  171. manner.  Microcomputers copy information very easily.  Instead of
  172. trying to frustrate this through copy protection, shareware takes
  173. advantage of it to reach as many users as possible at the lowest cost.
  174. Anyone may copy a shareware program and distribute it to whomever they
  175. desire, provided they do not charge a fee or alter it.
  176.      Shareware isn't free.  Serious shareware is as polished as any
  177. conventional commercial product, and represents just as much
  178. programming effort.  If you use it regularly, the authors expect
  179. compensation.
  180.      However, unlike conventional distribution, shareware allows you
  181. to evaluate the product before you decide to purchase it.  The price
  182. is often lower, as well, because there are no advertising, packaging,
  183. or distribution costs.
  184.      But it can only work with your support.  If you are still using a
  185. shareware product after a couple of weeks, then it is obviously worth
  186. something to you, and you should register it.
  187.  
  188. Registration and Benefits
  189.  
  190.      There are three versions of the compression routines in PAK
  191. available.  The first is the command line version, included in the
  192. evaluation package (of which this file is a part) distributed as
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. PAK (C) 1988, 1989 NoGate Consulting                  Jan 12th 1989  Page 2
  203.  
  204.  
  205. shareware.  Registration of this version is $15, and entitles you to a
  206. disk with a copy of PAK registered in your name.
  207.      The second is the full screen version, also known as PAKF.  PAKF
  208. is a fully windowed program which displays archive contents and file
  209. directories, and allows easy tagging of files to be compressed or
  210. extracted.  Registration of this version is $30, and entitles you to a
  211. disk with both the full screen and command line versions.
  212.      The third, for programmers, is a library of data compression
  213. routines suitable for inclusion in your own programs.  This toolkit
  214. can be used in practically any application, since all compression is
  215. done on buffers in memory, not on disk.  Registration of this version
  216. is $50, and entitles you to a disk with object files suitable for use
  217. with Turbo Pascal, C, or assembler, and the other two versions of PAK,
  218. as well as example programs in Pascal and C.
  219.  
  220.      To register your copy of PAK, see the enclosed order form.
  221.  
  222. Other NoGate Products
  223.  
  224.      TRI_D, a programming toolkit for three dimensional graphics, with
  225. support for wireframes and hidden surface removal.  Reasonably fast
  226. and very easy to use.  Includes a TPU for Turbo Pascal (4.0 or 5.0)
  227. and OBJ files for Turbo C.  TRI_D is $30.
  228.  
  229.      CONTOUR, a utility for creating contour maps from empirical data.
  230. Quickly and accurately approximates the entire surface from relatively
  231. few data points, and then draws lines at each elevation change.  Also
  232. creates AutoCad .DXF files.  Primarily intended for surveyors, taking
  233. a few minutes for a process that normally takes weeks, but useful to
  234. anyone who wishes to plot three dimensional data.  CONTOUR is $150.
  235.  
  236.      NoGate consulting also provides custom solutions in a wide
  237. variety of fields including databases, networking, simulations, and
  238. telecommuncications.  Inquire for further information.
  239.  
  240. List of Files
  241.  
  242.      Your copy of PAK15 should contain:
  243.  
  244.      PAK.EXE      - PAK version 1.5
  245.      PAK.CNF      - PAK configuration file.
  246.      PAK.DOC      - This documentation file.
  247.      PAKINST.EXE  - PAK installation program.
  248.      EXEMAKE.EXE  - Utility to make self-extracting archives.
  249.      ORDER.FRM    - Order form for registration.
  250.      UPDATE.FRM   - Form for updates and upgrades.
  251.      SITE.FRM     - Form for site licenses.
  252.      STDCFG.TXT   - Text file for standard configuration.
  253.      ALTCFG.TXT   - Text file for alternate configuration.
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. PAK (C) 1988, 1989 NoGate Consulting                  Jan 12th 1989  Page 3
  269.  
  270.  
  271. Using the Command Line Version Of PAK
  272.  
  273. A Note on the Interface
  274.  
  275.      This manual describes PAK's commands as they are initially
  276. configured.  Using PAKINST and the provided example files STDCFG.TXT
  277. and ALTCFG.TXT, you can easily add, change, or delete the commands and
  278. options which PAK understands.  For example, if the 'A' command is too
  279. cryptic for your taste, you can change it to 'Add' or 'Compress'.
  280.      The section on PAKINST describes how to change the interface.
  281.  
  282. Archive Files
  283.  
  284.      PAK creates and modifies archive files, which have the .PAK or
  285. .ARC extension.  An archive file may contain one, two, or any number
  286. of compressed files.  Files in an archive retain all of the
  287. information they had in the directory, such as name, size, and date.
  288. In addition, each file in an archive has a calculated CRC number,
  289. which assures the detection of damage after events such as file
  290. transmission via modem.
  291.  
  292. Creating An Archive
  293.  
  294. The Add Command
  295.  
  296.      To create an archive, type
  297.  
  298.      PAK a <archive name> <file name or file names>
  299.  
  300.      A is the Add command, and adding files to an archive will create
  301. it if it doesn't exist.  If the extension is omitted, PAK will look
  302. first for a file with the extension PAK and then for ARC.
  303.      For example, if to add the file "FOO.DAT" to an archive named
  304. "BAR.PAK" (which need not already exist), type
  305.  
  306.      PAK a bar foo.dat
  307.  
  308.      The wildcard characters ? and * are also permissible, as are
  309. multiple file specifications.  For example, to add all of the files
  310. ending in ".DAT" to the same archive, and all of the files named
  311. "TURBO" with any extension, type
  312.  
  313.      PAK a bar *.dat turbo.*
  314.  
  315.      Specifying a subdirectory will add all of the files in that
  316. subdirectory.  For example,
  317.  
  318.      PAK a bak \c\lib
  319.  
  320.      would add all of the files in the "\c\lib" directory to the
  321. archive "BAK.PAK", provided that "\c\lib" was a subdirectory.  Of
  322. course, if "\c\lib" were simply a file, it would be added like any
  323. other file.
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. PAK (C) 1988, 1989 NoGate Consulting                  Jan 12th 1989  Page 4
  335.  
  336.  
  337.      If you omit the file name, PAK assumes you mean "*.*", or all of
  338. the files in the directory.
  339.  
  340. The Move Command
  341.  
  342.      The Add command copies files to an archive, and leaves the
  343. originals intact.  The Move command also copies files to an archive,
  344. but deletes the originals when the operation is successfully
  345. completed.  Using the Move command is very similar to the Add command.
  346. To move a file or files, type
  347.  
  348.      PAK m <archive name> <file name or names>
  349.  
  350. The Update Command
  351.  
  352.      If a file specified in an Add or Move command has the same name
  353. as a file already in the archive, PAK will ask if you wish to replace
  354. the old file.  The Update command behaves much as the Add command
  355. does, except that it replaces existing archived files automatically if
  356. they have an older date, and does not replace newer files.  To update
  357. a file or files, type
  358.  
  359.      PAK u <archive name> <file name or names>
  360.  
  361.      For example, suppose NEW1.DAT and NEW2.DAT existed in the archive
  362. "SAVE.PAK", that the copy of NEW1.DAT in the archive was older than
  363. the one on the disk, and that NEW3.DAT existed on the disk but not in
  364. the archive.  Then
  365.  
  366.      PAK u save new1.dat new2.dat new3.dat
  367.  
  368.      would add "NEW1.DAT" and "NEW3.DAT" to "SAVE.PAK".
  369.  
  370. The Freshen Command
  371.  
  372.      The Freshen command is very similar to the Update command, except
  373. that it only checks files which already exist in the archive.  To
  374. freshen files in an archive, type
  375.  
  376.      PAK f <archive name> <file name or names>
  377.  
  378.      For example,
  379.  
  380.      PAK f total *.*
  381.  
  382.      would check every file in the archive "TOTAL.PAK" and freshen any
  383. which were older than those on the disk.  Note that the "*.*" in the
  384. above example is optional; if you omit the file list, PAK assumes you
  385. intended all files in the directory.
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. PAK (C) 1988, 1989 NoGate Consulting                  Jan 12th 1989  Page 5
  401.  
  402.  
  403. Extracting Files From An Archive
  404.  
  405. The Extract Command
  406.  
  407.      To copy files from an existing archive to the disk, type
  408.  
  409.      PAK e <archive name> <file name or names>
  410.  
  411.      For example, to unpack all of the files from the archive
  412. "GAME.PAK", type
  413.  
  414.      PAK e game
  415.  
  416.      Again, PAK assumes that you mean all of the files in the archive
  417. if you omit the file names to be extracted.  If one of the files to be
  418. extracted already exists, PAK will stop and ask if you intend to
  419. replace the existing file.
  420.  
  421.      When using any command which does involve compression (i.e., the
  422. Add, Move, Update and Freshen commands), you can use wildcards in
  423. specifying the archive name.  For example,
  424.  
  425.      PAK e ch* *.doc
  426.  
  427.      would extract all of the files with the extension .DOC from all
  428. of the archives starting with the letters CH.  As usual, PAK will
  429. provide .PAK and .ARC if you omit the extension.
  430.  
  431.      Extracting files to one or more remote subdirectories is much
  432. like adding them from other subdirectories.  For example,
  433.  
  434.      PAK e project \c\objects\*.obj \c\source\*.c
  435.  
  436.      would extract all of the files with the extension .OBJ to the
  437. \C\OBJECTS directory, and all the files with the extension .C to the
  438. \C\SOURCE directory.
  439.  
  440. The Extract and Remove Command
  441.  
  442.      Sometimes you may wish to move files out of an archive rather
  443. than simply copying them.  To do this, type
  444.  
  445.      PAK x <archive name> <file name or names>
  446.  
  447.      The X command is like the Extract command in all ways except that
  448. it deletes the files from the archive after unpacking them.  If this
  449. removes all of the files from the archive, leaving it empty, it also
  450. deletes the archive.
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. PAK (C) 1988, 1989 NoGate Consulting                  Jan 12th 1989  Page 6
  467.  
  468.  
  469. Extracting Files to the Screen or Printer
  470.  
  471.      You can also extract files to the standard output, which is
  472. normally the screen.  To do so, type
  473.  
  474.      PAK p <archive name> <file name or names>
  475.  
  476.      Anything sent to the standard output can be re-directed to a
  477. file, some other programs, or to the printer.  For example,
  478.  
  479.      PAK p docs >prn:
  480.  
  481.      would extract all of the files from the archive DOCS and send
  482. them to the printer.
  483.      For other uses of redirection, consult your DOS manual.
  484.  
  485. Managing Archives
  486.  
  487. Listing Files
  488.  
  489.      Both the L and V commands display a list of files, the original
  490. sizes, and the file dates, in much the same format as the MSDOS DIR
  491. command.  In addition, they display the type of compression,
  492. compression ratio, the compressed size, time, and CRC checksum.
  493.      There is no difference between the two commands.  Both L and V
  494. are provided for the convenience of those used to PAK 1.0.
  495.  
  496.      There are 7 compression types, created variously by ARC, PKARC,
  497. and PAK.  PAK can extract files compressed with any of these, and
  498. compress new files with the Crunched, Squashed, or Crushed types.
  499.  
  500.        --      No compression.  Used by ARC, PKARC, PAK.
  501.  
  502.      Packed    Repeated byte values replaced by codes. Used by ARC.
  503.  
  504.     Squeezed   Huffman encoding, used by ARC 5.20 and earlier.
  505.  
  506.     crunched   Lempel-Zev compression, used by ARC 4.5 and earlier.
  507.  
  508.     Crunched   Lempel-Zev compression, used by ARC 5.0 and later.
  509.  
  510.     Squashed   Lempel-Zev compression, used by PKARC.
  511.  
  512.     Crushed    Lempel-Zev compression, used only by PAK.
  513.  
  514.      PAK uses the CRC checksum to verify that the file is intact.
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. PAK (C) 1988, 1989 NoGate Consulting                  Jan 12th 1989  Page 7
  533.  
  534.  
  535. Deleting Files
  536.  
  537.      Sometimes you may wish to remove files from an archive, either
  538. because they were added accidently or because they are no longer
  539. useful.  To delete files from an archive, type
  540.  
  541.      PAK d <archive name> <file name or names>
  542.  
  543.      For example,
  544.  
  545.      PAK d junk *.tmp
  546.  
  547.      would delete all the files ending in the ".TMP" extension from
  548. the archive "JUNK.PAK".
  549.  
  550.  
  551. Testing files
  552.  
  553.      Sometimes the integrity of an archive (or any other file) is
  554. suspect, such as after transmission by modem or after physical disk
  555. damage.  The Test command checks all the specified files to insure
  556. that they are intact.
  557.  
  558.      For example, to test the archive "POKER.PAK" which you have just
  559. downloaded from a BBS, type
  560.  
  561.      PAK t poker
  562.  
  563.      PAK can also test multiple archives this way:
  564.  
  565.      PAK t *.pak
  566.  
  567.      would test all of the archives ending in the .PAK extension.
  568.  
  569.      If, for some reason, you wish to test only some of the files, you
  570. may specify a list of files, much as you can for any other command.
  571. For example,
  572.  
  573.      PAK t *.pak *.doc
  574.  
  575.      will test only files ending in the .DOC extension.
  576.  
  577. Adding Remarks to Archives
  578.  
  579.      PAK 1.5 supports variable length remarks for each file in an
  580. archive, and for the archive as a whole.  While there is no inherent
  581. limitation to the length of a remark, PAK 1.5 currently only provides
  582. commands to handle single-line remarks of at most 55 characters.
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598. PAK (C) 1988, 1989 NoGate Consulting                  Jan 12th 1989  Page 8
  599.  
  600.  
  601. The /R option
  602.  
  603.      Adding the /R option to any other command (such as Add or List)
  604. will enable remarks.  For example,
  605.  
  606.      PAK a /r saved *.pas
  607.  
  608.      will add all the files with the extension .PAS to the archive
  609. SAVED, and ask for the remark for each new file.
  610.  
  611.      PAK l /r saved
  612.  
  613.      would then include those remarks with the list of files in the
  614. archive.
  615.  
  616. The Revise command
  617.  
  618.      Sometimes you may wish to change the remarks in an archive.
  619. Typing
  620.  
  621.      PAK r saved *.doc
  622.  
  623.      will first display the archive remark, and then display the files
  624. with the extension .DOC one at a time, and ask for the new remark for
  625. each.  If you wish to keep the existing remark, simply press <enter>.
  626.  
  627.  
  628. Converting Archives from ARC and PKARC
  629.  
  630.      The C command extracts files from the archive and recompresses
  631. them.  This is primarily of use to convert older archives created with
  632. ARC and PKARC to the better compression techniques used by PAK.
  633.  
  634.      Example:
  635.      To convert all the files in BONZO.PAK, type:
  636.  
  637.      PAK c bonzo
  638.  
  639.      It is also possible to convert files created with PAK so that
  640. they will be compatible with ARC or PKARC, by adding the C or S
  641. compression type modifier:
  642.  
  643.      PAK c /c bonzo
  644.      converts bonzo (created with PAK, PKARC, or PAK) to compression
  645. types compatible with ARC and PKARC.
  646.  
  647.      PAK c /s bonzo
  648.      converts bonzo to compression types compatible with PKARC.
  649.  
  650. Options
  651.  
  652.      In addition to the commands, PAK supports a variety of options.
  653. We've already mentioned a few in passing - the /R (remarks), /C
  654. (crunch) and /S (squash) options.
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664. PAK (C) 1988, 1989 NoGate Consulting                  Jan 12th 1989  Page 9
  665.  
  666.  
  667.      These options aren't necessary for the day-to-day use of PAK, but
  668. occasionally you may wish to use them.  Normally, these options appear
  669. immediately after the command, separated by slashes (/).  For example:
  670.  
  671.      PAK a /opt1 /opt2 archive
  672.  
  673.      While this is the normal ordering, it's not required, and the
  674. options can appear anywhere on the line, provided each starts with the
  675. slash character.  For example,
  676.  
  677.      PAK a archive /opt1 file /opt2
  678.  
  679.      is also acceptable.
  680.  
  681.      For compatibility with PAK 1.0, options may be jammed against the
  682. command.  For example,
  683.  
  684.      PAK cc archive
  685.  
  686.      is the same as
  687.  
  688.      PAK c /c archive
  689.  
  690.      This format is hard to read, and not recommended.
  691.  
  692. Moving Files (/M)
  693.  
  694.      The Move option will delete files after compressing them or
  695. extracting them.  The M (move) and X (extract + delete) commands are
  696. actually the Add and Extract commands with the Move option.
  697.      This option is primarily of use in combination with Update or
  698. Freshen, which do not have matching Move commands.
  699.  
  700. Duplicate Files (/D)
  701.  
  702.      The /D (duplicate) option selects only those files which are both
  703. inside the archive and outside the archive.  For example,
  704.  
  705.      PAK e /d saved *.doc
  706.  
  707.      would only extract those files with the .DOC extension which
  708. matched existing files on the disk.  The Freshen command is another
  709. example of the /D option - it only adds those files which already
  710. exist in the archive.
  711.      While of most use with the Add and Extract commands, the
  712. Duplicate option can be used with other commands, such as List.
  713.  
  714.  
  715. Replacing Existing Files (/W)
  716.  
  717.      Normally, PAK asks before replacing an existing file, either in
  718. an archive or on your disk.  You can change this by adding one of
  719. these options:
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. PAK (C) 1988, 1989 NoGate Consulting                 Jan 12th 1989  Page 10
  731.  
  732.  
  733.      /WA  Always replace existing files.
  734.      /WP  Prompt before replacing existing files (normal).
  735.      /WO  Replace older files.
  736.      /WN  Never replace existing files.
  737.  
  738.      The Update and Freshen commands automatically include the /WO
  739. option.
  740.  
  741.  
  742. Use Remarks (/R)
  743.  
  744.      Adding the /R option to any other command (such as Add or List)
  745. will enable remarks.  For example,
  746.  
  747.      PAK a /r saved *.pas
  748.  
  749.      will add all the files with the extension .PAS to the archive
  750. SAVED, and ask for the remark for each new file.
  751.  
  752.      PAK l /r saved
  753.  
  754.      would then include those remarks with the list of files in the
  755. archive.
  756.  
  757.  
  758. Crunch and Squash (/C and /S)
  759.  
  760.      Using the /C or /S option will force PAK to use Crunching or
  761. Squashing when compressing files.  They are of primary use with the
  762. Convert command, but they can also be used with Add, Move, Update, and
  763. Freshen.
  764.  
  765.  
  766. Encrypting Files (/G)
  767.  
  768.      Occasionally you may wish to encrypt your archives with a
  769. password.  Files can still be listed in such archives, but they will
  770. appear damaged unless extracted with the same password.
  771.      To encrypt files, type
  772.  
  773.      PAK a /g<password> <archive name> <file name or names>
  774.  
  775.      The 'g' option stands for Garble.  Passwords used with the Garble
  776. command are converted to all uppercase.  For example, to encrypt the
  777. file "SECRET.EXE" in the archive "DARK.PAK" with the password "DEEP",
  778. type
  779.  
  780.      PAK a /gDEEP dark secret.exe
  781.  
  782.      To extract it later, type
  783.  
  784.      PAK e /gDEEP dark secret.exe
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796. PAK (C) 1988, 1989 NoGate Consulting                 Jan 12th 1989  Page 11
  797.  
  798.  
  799.      While these are the most common uses of Garble, Garble can also
  800. be used with any of the other commands.  For example, testing the
  801. example encrypted archive requires the use of the Garble command:
  802.  
  803.      PAK t /gDEEP dark
  804.  
  805.  
  806. Sorting Files (/O)
  807.  
  808.      PAK supports sorting of archives by filename + extension (the
  809. normal method, used in release 1.0), extension + filename, time, size,
  810. or no sort at all.  To enable a sorting method, include one of these
  811. options:
  812.  
  813.      /ON  for filename + extension
  814.      /OE  for extension + filename
  815.      /OT  for time
  816.      /OS  for size
  817.      /O-  for no sort
  818.  
  819.      For example,
  820.  
  821.      PAK a /OT newmail mail*.*
  822.  
  823.      will add the all files starting with MAIL to the archive NEWMAIL
  824. in the order of the date and time of the files.  On the other hand,
  825.  
  826.      PAK l /OS saved
  827.  
  828.      would list all of the files in an archive in the order of their
  829. fully-expanded size, regardless of the actual order in SAVED.
  830.  
  831.      Note that adding any file to an archive will result in PAK
  832. sorting the archive.  In the first example above, all of the files in
  833. the archive NEWMAIL would be sorted by time, even if they were
  834. previously sorted by some other method.
  835.  
  836.      The standard sort for the compression commands (Add, Move,
  837. Update, Freshen) is by filename + extension.  For other commands, the
  838. standard is no sorting.
  839.  
  840.  
  841. Pack Archives (/P)
  842.  
  843.      Archives rarely compress, so normally PAK does not attempt to do
  844. so, which saves time.  Adding this option will force PAK to try and
  845. compress archive files.
  846.  
  847.  
  848. The Temporary Path (/T)
  849.  
  850.      You can specify a path for temporary files, like so:
  851.  
  852.      PAK c /tC: doodle
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862. PAK (C) 1988, 1989 NoGate Consulting                 Jan 12th 1989  Page 12
  863.  
  864.  
  865.  
  866.      Whenever PAK makes any change (adding or deleting a file) to an
  867. archive, PAK must create a temporary file for the changed archive.  If
  868. you are working on floppy disks, this limits the maximum size of an
  869. archive to half the volume of the disk, since the old copy and the new
  870. copy must exist at the same time.  If you use this option to specify a
  871. temporary path (such as C:), and you are working on drive A: or B:,
  872. PAK will create this temporary file in the Temporary Path and copy it
  873. over the old file when everything is done.  This allows archives up to
  874. the full size of a floppy.
  875.      PAK also needs a temporary file if you Print or Convert a file
  876. which is larger than what PAK can hold in memory (this is always
  877. limited to 64K, even if you have more).  PAK will always try to use
  878. the Temporary Path to create this file.
  879.      If the Temporary Path is invalid, PAK will use the directory of
  880. the archive instead.
  881.  
  882.  
  883. General Syntax
  884.  
  885. The command format for PAK is:
  886.  
  887.   PAK <command> [/opt, /opt...] <arcname> [<filename>, <filename> ...]
  888.  
  889.     <command> is a command.
  890.  
  891.     [/opt] is zero or more options.
  892.  
  893.     <arcname> is the name of the archive to operate on, which may
  894. include the "wildcard" characters * or ?, provided <command> is not
  895. one of the compression commands (Add, Move, Update, or Freshen).
  896.  
  897.     <filename> is one or more file names.  Filenames may include the
  898. "wildcard" characters * and ?.  If you specify a directory or a disk
  899. drive, PAK will use all files in that directory.  If you don't list
  900. any files or directories, PAK assumes you mean all the files in the
  901. current directory.
  902.  
  903.      Simply typing PAK will print a short list of commands.
  904.  
  905.  
  906. Summary of Standard PAK Commands
  907.  
  908. Commands:
  909.  
  910.  A  Add files to archive                 M  Move files to archive
  911.  U  Update archive files                 F  Update duplicate files
  912.  E  Extract files from archive           X  Move files from archive
  913.  D  Delete files                         L  List files
  914.  V  List files                           P  Display files
  915.  T  Test files                           C  Convert files
  916.  R  Revise remarks
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928. PAK (C) 1988, 1989 NoGate Consulting                 Jan 12th 1989  Page 13
  929.  
  930.  
  931. Options:
  932.  
  933.      /m  = move files
  934.      /c  = make ARC compatible files (Crunched).
  935.      /s  = make PKARC compatible files (Squashed).
  936.      /g  = encrypt the file with a password.
  937.      /t  = use temporary path
  938.      /d  = use only duplicate files.
  939.      /wa = always replace existing files
  940.      /wp = prompt before replacing existing files (normal)
  941.      /wo = replace older files
  942.      /wn = never replace existing files
  943.      /r  = use remarks
  944.      /on = filename + extension order
  945.      /oe = extension + filename order
  946.      /ot = time order
  947.      /os = size order
  948.      /o- = no order
  949.      /p  = pack archives
  950.  
  951.  
  952. Limitations
  953.  
  954.      PAK can handle at most 16,000 files at once, though this may also
  955. be limited by available memory.
  956.  
  957.  
  958. PAKINST (PAK install program)
  959.  
  960.      PAKINST manipulates PAK.CNF, the configuration file for PAK.
  961. Since PAK.CNF contains the definition of PAK's user interface, PAK
  962. cannot run without it.  You can use PAKINST to tell PAK where to look
  963. for PAK.CNF, to translate PAK.CNF into a text-format configuration
  964. file, or to translate a text-format configuration file into PAK.CNF.
  965.      Included with PAK 1.5 are two example text-format configuration
  966. files, STDCFG.TXT and ALTCFG.TXT.  By creating your own configuration
  967. files with a word processor, or by altering the provided examples, you
  968. can customize PAK's commands to suit your needs.
  969.      PAKINST must always be run in the same directory with PAK and
  970. PAK.CNF.  To run PAKINST, simply type
  971.  
  972.      PAKINST
  973.  
  974.      PAKINST provides four choices:
  975.  
  976.          set [D]irectory
  977.      convert [T]ext to PAK.CNF
  978.      convert [P]AK.CNF to text
  979.         and  [Q]uit
  980.  
  981.      To set the directory where PAK looks for PAK.CNF, select D.
  982.      To create a new PAK.CNF from a properly-formatted text file,
  983. select T.
  984.      To create a text file from PAK.CNF, select P.
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994. PAK (C) 1988, 1989 NoGate Consulting                 Jan 12th 1989  Page 14
  995.  
  996.  
  997.  
  998. Command Definitions
  999.  
  1000.      A command definition in text-format file looks like this:
  1001.  
  1002.      <command> = <PAK command> [+ <PAK options>], "<help definition>"
  1003.  
  1004.      The <command> is the command as it will be used with PAK, i.e.
  1005. 'A' or 'Add'.  Commands must start with a letter, and may contain no
  1006. spaces, but may be may be any length.
  1007.      The <PAK command> is one of ADD, EXTRACT, DELETE, LIST, VIEW,
  1008. TEST, CONVERT, or REVISE.  These correspond to the standard PAK
  1009. commands of A, E, D, L, P, T, C, and R.
  1010.      The command may also include one or more <PAK options>, separated
  1011. by the plus (+) symbol.  Each <PAK option> is one of MOVE, CRUSH,
  1012. CRUNCH, SQUASH, PASSWORD, DUPLICATE, REMARK, PACK_ARCHIVES, NAME_SORT,
  1013. TIME_SORT, SIZE_SORT, EXT_SORT, NO_SORT, ALWAYS_REPLACE,
  1014. PROMPT_REPLACE, REPLACE_OLDER, NEVER_REPLACE, or TEMP_PATH.  All of
  1015. these are covered in more depth in the section 'Using The Command Line
  1016. Version of PAK'.
  1017.      Finally, separated from the commands and options by a comma and
  1018. enclosed in quotation marks is the help definition for this command.
  1019. The PAK help screen, obtained by typing PAK by itself, will display
  1020. the text within these quotation marks after the command.
  1021.  
  1022.      For example, the Freshen command (F) in the STDCFG.TXT file looks
  1023. like this:
  1024.  
  1025.     F = Add + Duplicate + Replace_Older + Name_Sort,
  1026.         "Update duplicate files"
  1027.  
  1028.      Reading this literally, PAKINST takes this as 'F means add files
  1029. to the archive, selecting only duplicate files, replacing older files,
  1030. and sorting by name.  When asked for help, display F followed by the
  1031. text "Update duplicate files".'
  1032.      Notice that this does not all have to be on the same line.
  1033.  
  1034. Option Definitions
  1035.  
  1036.      An option definition looks like this:
  1037.  
  1038.      /<option> = <PAK option> [+ <PAK options>], "<help definition>"
  1039.  
  1040.      This is much like a command definition, only it begins with a
  1041. slash (/) to indicate it is an option.  Options, of course, may not
  1042. include PAK commands.
  1043.  
  1044. Comments
  1045.  
  1046.      Text configuration files may include comments.  PAKINST will
  1047. ignore anything contained in curly braces {} or Pascal comment symbols
  1048. (* *).  For example,
  1049.  
  1050.     { This is a comment. }
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060. PAK (C) 1988, 1989 NoGate Consulting                 Jan 12th 1989  Page 15
  1061.  
  1062.  
  1063.     (* So is this. *)
  1064.  
  1065.  
  1066. EXEMAKE (Make self-extracting archives)
  1067.  
  1068.      EXEMAKE is a utility to transform any archive created by PAK into
  1069. a self-extracting EXE file, at a cost of 6662 extra bytes.
  1070.  
  1071.      EXEMAKE uses the following command format:
  1072.  
  1073.      EXEMAKE <archive> [<target file>]
  1074.  
  1075.      If the target file is not specified, EXEMAKE creates a file with
  1076. the same name as the archive but with the .EXE extension.
  1077.  
  1078.      For example,
  1079.  
  1080.      EXEMAKE product
  1081.  
  1082.      will create the file "PRODUCT.EXE", which contains all of the
  1083. files in "PRODUCT.PAK".  Typing
  1084.  
  1085.      PRODUCT
  1086.  
  1087.      will then create all of the files from the original archive.
  1088. Self-extracting archives created with EXEMAKE can take one parameter:
  1089. the destination directory.
  1090.  
  1091.      PRODUCT b:\new
  1092.  
  1093.      extracts all of the files to the B:\NEW directory.
  1094.  
  1095.  
  1096. Appendices
  1097.  
  1098.  
  1099. Release History
  1100.  
  1101.      Release 1.51 (January 15th, 1989):
  1102.  
  1103.      Fixed bug in EXEMAKE with extraction of files over 64K.
  1104.      EXEMAKE fixes increase self-extraction overhead to 6674 bytes.
  1105.  
  1106.  
  1107.      Release 1.5 (January 12th, 1989):
  1108.  
  1109.      Added remarks.
  1110.      Added support for wildcards in specifying archives.
  1111.      Added extraction to standard output.
  1112.      Added sorting options.
  1113.      Added temporary path.
  1114.      Added configurable interface.
  1115.      Added target directory parameter to self-extracting archives.
  1116.      Improved error reporting.
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126. PAK (C) 1988, 1989 NoGate Consulting                 Jan 12th 1989  Page 16
  1127.  
  1128.  
  1129.      Reduced size overhead for self-extracting archives to 6662 bytes.
  1130.      Fixed bug in the Move command.
  1131.      Fixed problem with handling large numbers of files.
  1132.      Fixed bug with EXEMAKE forcing the name of the output .EXE to
  1133. that of the input archive.
  1134.  
  1135.      PAK Release 1.0 (October 17th, 1988):
  1136.  
  1137.      Initial release as PAK.
  1138.  
  1139.      GSARC Release 1.0 (October 13th, 1988):
  1140.  
  1141.      Limited release.
  1142.  
  1143.  
  1144. PAK's Advanced Compression
  1145.  
  1146.      ARC popularized the LZW method of compression, which substitutes
  1147. 9 to 12 bit codes for strings of characters which occur more than once
  1148. in a file.  PKARC made a very simple modification to the compression
  1149. algorithm in ARC, by allowing codes of up to 13 bits, and hence
  1150. doubled the number of allowable codes.  PKARC owes some of its
  1151. popularity over ARC to this, but its primary advantage is speed.
  1152.      PAK, on the other hand, makes some radical changes to the LZW
  1153. method.  PAK increases the range from 2 to 13 bits instead of 9 to 13,
  1154. dynamically alters the compression method based on the local nature of
  1155. the data, and drops only the least used codes when the code table
  1156. fills, instead of all of them as ARC and PKARC do.
  1157.      As a result, PAK performs much better on very large files, very
  1158. small files, and on difficult files (such as .EXE and .COM files) of
  1159. any length.
  1160.  
  1161.  
  1162. Technical Notes on File Formats
  1163.  
  1164.      In the interest of simplifying the creation of utilities by
  1165. third-party developers, this section provides a short description of
  1166. the file format for archives created with PAK.
  1167.  
  1168.      In the basic format for archives, each archived file has a header
  1169. which looks like this:
  1170.  
  1171. Marker (1 byte)  - always 26 (^Z, the eof mark for text files).
  1172. Version (1 byte) - type of compression used.
  1173. Name (13 bytes)  - an ASCIIZ string.
  1174. Size (4 bytes)   - a long integer giving the current file size.
  1175. Date (2 bytes)   - packed date.  bits 0-4  = day  5-8 = month
  1176.                                       9-15 = year - 1980.
  1177. Time (2 bytes)   - packed time.  bits 0-4  = second / 2  5-10 = minute
  1178.                                      11-15 = hour.
  1179. CRC (2 bytes)    - the CRC checksum for the expanded file.
  1180. Length (4 bytes) - original length of file.
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192. PAK (C) 1988, 1989 NoGate Consulting                 Jan 12th 1989  Page 17
  1193.  
  1194.  
  1195.      The version field currently has the following values:
  1196.  
  1197.      0  End of file.  File header is only 2 bytes long (26 and 0).
  1198.      1  No compression. File header lacks the Length field.
  1199.      2  No compression.
  1200.      3  Run-length encoding (RLE).
  1201.      4  Huffman squeezing.
  1202.      5  Fixed-length 12 bit LZW compression.
  1203.      6  As above, with RLE.
  1204.      7  As above, but with a different hashing scheme.
  1205.      8  Variable-length 9-12 bit LZW compression with RLE.
  1206.      9  Variable-length 9-13 bit LZW compression without RLE.
  1207.     10  Crushing.
  1208.  
  1209.      Basic archives end with a short header, containing just the
  1210. marker (26) and the end of file value (0).  PAK release 1.5 extends
  1211. this format by adding information after this end of file marker.  Each
  1212. extended record has the following header:
  1213.  
  1214. Marker (1 byte)  - always 254
  1215. type (1 byte)    - type of record
  1216. File (2 bytes)   - # of file in archive to which this record refers,
  1217.                    or 0 for the entire archive.
  1218. length (4 bytes) - size of record
  1219.  
  1220.      Currently, the only values for the Type field are 0 (end of file)
  1221. and 1 (remark).  PAK 1.5 considers any value between 0 and 20 to be
  1222. valid, though it discards any records with values over 1.
  1223.      NoGate Consulting has specific purposes planned for types 2-4.
  1224.  
  1225.  
  1226. Credits
  1227.  
  1228.      We would like to thank several people:
  1229.  
  1230.      The various authors of the public-domain De-Arc'ing utility, for
  1231. providing insights into the (sometimes very strange) internal workings
  1232. of ARC:
  1233.  
  1234.      Roy Collins, David W. Carroll, Richard P. Byrne, Robert D. Tolz,
  1235. and Jim North.
  1236.  
  1237.      We must also credit Terry A. Welch, whose article "A Technique
  1238. for High Performance Data Compression", IEEE Computer Vol 17 No 6
  1239. (June 1984) seems to have started all the research on Lempel-Zev
  1240. coding.
  1241.  
  1242.      Spencer W. Thomas, Jim McKie, Steve Davies, Ken Turkowski, James
  1243. A.  Woods, and Joe Orost, who are the authors of the UNIX compress
  1244. utility.
  1245.  
  1246.      And all of the people whose suggestions we added to this release
  1247. of PAK, such as the temporary path, sorting, wildcards for archives,
  1248. and remarks.
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.