0 оценок0% нашли этот документ полезным (0 голосов)
162 просмотров33 страницы
PAK The File Compression Utility Version 2 was developed by noGate consulting, A division of noGate communications, in 1988. The software is licensed under the terms of the noGate Shareware license. NoGate is A member of the Association of _ Shareware __ o Professionals ----- ------------ ___ __ MEMBER Introduction. Purpose of PAK. Archive Files. A Note on the Interface. Registration and Benefits. Obtaining
PAK The File Compression Utility Version 2 was developed by noGate consulting, A division of noGate communications, in 1988. The software is licensed under the terms of the noGate Shareware license. NoGate is A member of the Association of _ Shareware __ o Professionals ----- ------------ ___ __ MEMBER Introduction. Purpose of PAK. Archive Files. A Note on the Interface. Registration and Benefits. Obtaining
PAK The File Compression Utility Version 2 was developed by noGate consulting, A division of noGate communications, in 1988. The software is licensed under the terms of the noGate Shareware license. NoGate is A member of the Association of _ Shareware __ o Professionals ----- ------------ ___ __ MEMBER Introduction. Purpose of PAK. Archive Files. A Note on the Interface. Registration and Benefits. Obtaining
Version 2.51 Copyright 1988, 1989, 1990 by NoGate Consulting P.O. Box 88115 Grand Rapids, MI 49518-0115 (616)455-6270 BBS: (616)455-5179 (1200-9600+ baud) FAX: (616)455-8491 ALL RIGHTS RESERVED _______ ____|__ | (Tm) --| | |------------------- | ____|__ | Association of | | |_| Shareware |__| o | Professionals -----| | |--------------------- |___|___| MEMBER Introduction..............................................1 Purpose of PAK.......................................1 Archive Files........................................1 A Note on the Interface..............................1 The Shareware Concept................................2 Registration and Benefits............................2 Obtaining Updates....................................3 Limitations..........................................3 Other NoGate Products................................3 List of Files........................................3 The Security Envelope.....................................4 Creating An Archive.......................................4 The Add Command......................................4 The Move Command.....................................5 The Update Command...................................5 The Freshen Command..................................5 Archiving Subdirectories.............................5 Extracting Files From An Archive..........................6 The Extract Command..................................6 The Extract and Remove Command.......................7 Extracting Files to the Screen or Printer............7 Extracting files to their original paths.............7 Managing Archives.........................................8 Listing Files........................................8 Deleting Files.......................................8 Testing files........................................9 Adding Remarks to Archives................................9 The /R (remark) option...............................10 The /H (header remark) option........................10 The Revise command...................................10 The Header command...................................10 Converting Archives for other programs....................10 Converting to and from ZIP files.....................11 Self-Extracting Archives..................................12 Creating self-extracting archives....................12 Using self-extracting archives.......................12 Self-extracting to a path............................13 Converting to self-extracting archives...............13 Options...................................................13 Crunch, Squash, and Crush (/C, /S, /CR)..............14 Zip, Shrink, Bugs (/Z, /ZS, /BUGS)...................14 Encrypting Files (/G)................................14 Duplicate Files (/D).................................15 Make EXE file (/EXE).................................15 Print in Hex format (/HEX)...........................15 Including subdirectories (/I)........................16 Use last date (/L)...................................16 Moving Files (/M)....................................16 Pause after each page (/MORE)........................16 Using the original path (/PATH)......................17 Use Remarks (/R and /H)..............................17 Rename archives on convert (/REN)....................17 Sorting Files (/S)...................................18 Pack Archives (/P)...................................18 Check security envelope (/SEC).......................18 Only use Distill or Implode (/O).....................18 The Temporary Path (/T)..............................19 Replacing Existing Files (/W)........................19 General Syntax............................................20 Summary of Standard PAK Commands.....................20 PAKINST (PAK install program).............................21 Text Configuration Files.............................22 Comments.............................................22 Command Definitions..................................22 Option Definitions...................................23 Configuring a default temporary path.................24 Using PAK with a WORM or Network Drive...............24 Configuring a standard archive title.................24 Appendices................................................25 Release History......................................25 Technical Notes......................................27 File Formats....................................27 Error Codes.....................................28 Credits..............................................28 Order Form...........................................29 PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 1 Introduction Purpose of PAK PAK is a utility to create and maintain file archives in compressed form. There are several advantages to compressing files. On a hard disk, most files are accessed infrequently. Reducing the size of these files allows more of them to remain on the hard disk, where they are more accessible than on a floppy in a file cabinet, and frees disk space for other use. Backup is simpler, faster, and cheaper, since the files are smaller and organized into related groups. Most importantly, compressed files take less time to transmit via modem, and time is money when the transmission is long distance, or to a service such as CompuServe. Even on local computer bulletin boards, reduced transmission time is an advantage. PAK is intended as a replacement for ARC by System Enhancement Associates and PKARC and PKZIP by Philip Katz. While PAK is faster than ARC, speed is not the emphasis, and PAK does not attempt to compete with PKARC in this respect. However, PAK produces archive files that are consistently 50% to 90% of the size produced by either ARC, PKARC, or PKZIP 0.9 and supports files created by any of these programs. While PKZIP 1.0 files are roughly comparable in size to PAK files, PAK supports more archive formats and more features. Finally, PAK is available in a full screen edition which is much easier to use than ARC, PKARC, or PKZIP, and in a programmer's toolkit for those who want data compression in their own programs. Archive Files PAK creates and modifies archive files, which have the .PAK, .ARC, or .ZIP extension. An archive file may contain one, two, or any number of compressed files. Files in an archive retain all of the information they had in the directory, such as name, size, and date. In addition, each file in an archive has a calculated CRC number, which assures the detection of damage after events such as file transmission via modem. A Note on the Interface This manual describes PAK's commands as they are initially configured. Using PAKINST and the provided example files STDCFG.TXT and ALTCFG.TXT, you can easily add, change, or delete the commands and options which PAK understands. For example, if the 'A' command is too cryptic for your taste, you can change it to 'Add' or 'Compress'. The section on PAKINST describes how to change the interface. PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 2 The Shareware Concept PAK is distributed as shareware. Shareware is commercial software distributed in an unconventional manner. Microcomputers copy information very easily. Instead of trying to frustrate this through copy protection, shareware takes advantage of it to reach as many users as possible at the lowest cost. Anyone may copy a shareware program and distribute it to whomever they desire, provided they do not charge a fee or alter it. Shareware isn't free. Serious shareware is as polished as any conventional commercial product, and represents just as much programming effort. If you use it regularly, the authors expect compensation. However, unlike conventional distribution, shareware allows you to evaluate the product before you decide to purchase it. The price is often lower, as well, because there are no advertising, packaging, or distribution costs. It can only work with your support. If you are still using a shareware product after a couple of weeks, then it is obviously worth something to you, and you should register it. Registration and Benefits There are three editions of the compression routines in PAK available. The first is the command line edition, included in the evaluation package (of which this file is a part) distributed as shareware. Registration of this edition is $15, and entitles you to a disk with a copy of PAK registered in your name. The second is the full screen edition, also known as PAKF. PAKF is a fully windowed program which displays archive contents and file directories, and allows easy tagging of files to be compressed or extracted. Registration of this edition is $30, and entitles you to a disk with both the full screen and command line editions. The third, for programmers, is a library of data compression routines suitable for inclusion in your own programs. This toolkit can be used in practically any application, since all compression is done on buffers in memory, not on disk. Programs created with the toolkit do not require a royalty so long as they do not compete with PAK. For example, you can compress your own program's data, or distribute your software in compressed form without royalty. On the other hand, a general-purpose archiving, installation, or backup utility would require a special licensing agreement. Registration of this edition is $75, and entitles you to a disk with object files suitable for use with Turbo Pascal, Turbo C, Microsoft C, or assembler. The toolkit is usable with OS/2 and Windows 3.0. The toolkit disk also includes the other two editions of PAK, as well as example programs in Pascal and C. To register your copy of PAK, send in a completed copy of the enclosed order form, call the NoGate BBS to order via questionnaire, or call NoGate Consulting at (616)455-6270. PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 3 Obtaining Updates The fastest way for registered users to obtain an update of any of the editions of PAK is to call our bulletin board at (616)455-5179. The BBS has a 9600 baud US Robotics Dual Standard modem, so any modem from 1200 to 9600 baud should work. If you have never called the BBS before, you will have to start as a new user, even if you are a registered PAK user. This entails choosing a password and leaving some information such as your phone number and city. If you are a registered user, you can download PAK, PAKF, and the Toolkit through the Update Door. Before you can do so, however, you will have to leave a message to the Sysop asking for access to that door. If you don't have a modem, or don't want to call our BBS, you can call for an update at (616)455-6270, FAX us at (616)455-8491, or send us a letter. Updates are free from the BBS, and $5.50 by mail within the United States or $7 overseas. Updates of the Toolkit from release 1.6 or earlier are $25. Limitations PAK can handle at most 16,000 files at once, though this may also be limited by available memory. Other NoGate Products CONTOUR, a utility for creating contour maps from empirical data. Quickly and accurately approximates the entire surface from relatively few data points, and then draws lines at each elevation change. Also creates AutoCad .DXF files. Primarily intended for surveyors, taking a few minutes for a process that normally takes weeks, but useful to anyone who wishes to plot three dimensional data. CONTOUR is $150. NoGate consulting also provides custom solutions in a wide variety of fields including databases, networking, simulations, and telecommunications. Inquire for further information. List of Files Your copy of PAK251.EXE should contain: READ.ME - This list of files, and documentation revisions. PAK.EXE - PAK version 2.51 PAK.DOC - This documentation file. PAKINST.EXE - PAK installation program. ORDER.FRM - Order form for registration. UPDATE.FRM - Form for updates and upgrades. SITE.FRM - Form for site licenses. STDCFG.TXT - Text file for standard configuration. ALTCFG.TXT - Text file for alternate configuration. PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 4 The Security Envelope PAK 2.51 is the official archive program for distributing files through SDNet/Works!, the Shareware Distribution Network. PAK will automatically recognize files distributed by The SDN Project and SDNet/Works! (sm). The SDN Project and SDNet/Works! is a cooperation of BBS Sysops and not-for-profit. SDN distributed files have the .SDN extension and a Security Envelope which protects them from viruses. PAK will automatically check the integrity of SDN files. If the archive has been altered in any way, PAK will alert you. If the archive is untouched, PAK will display a page of information about the author. Shareware authors interested in this free distribution should contact The SDN Project BBS at 203-634-0370, 1200-9600HST baud, 8-N-1. Creating An Archive The Add Command To create an archive, type PAK a <archive name> <file name or file names> A is the Add command, and adding files to an archive will create it if it doesn't exist. If the extension is omitted, PAK will look first for a file with the extension PAK and then for ARC, ZIP, or SDN. For example, to add the file "FOO.DAT" to an archive named "BAR.PAK" (which need not already exist), type PAK a bar foo.dat The wildcard characters ? and * are also permissible, as are multiple file specifications. For example, to add all of the files ending in ".DAT" to the same archive, and all of the files named "TURBO" with any extension, type PAK a bar *.dat turbo.* Specifying a subdirectory will add all of the files in that subdirectory. For example, PAK a bak \c\lib would add all of the files in the "\c\lib" directory to the archive "BAK.PAK", provided that "\c\lib" was a subdirectory. Of course, if "\c\lib" were simply a file, it would be added like any other file. If you omit the file name, PAK assumes you mean "*.*", or all of the files in the directory. PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 5 The Move Command The Add command copies files to an archive, and leaves the originals intact. The Move command also copies files to an archive, but deletes the originals when the operation is successfully completed. Using the Move command is very similar to the Add command. To move a file or files, type PAK m <archive name> <file name or names> The Update Command If a file specified in an Add or Move command has the same name as a file already in the archive, PAK will ask if you wish to replace the old file. The Update command behaves much as the Add command does, except that it replaces existing archived files automatically if they have an older date, and does not replace newer files. To update a file or files, type PAK u <archive name> <file name or names> For example, suppose NEW1.DAT and NEW2.DAT existed in the archive "SAVE.PAK", that the copy of NEW1.DAT in the archive was older than the one on the disk, and that NEW3.DAT existed on the disk but not in the archive. Then PAK u save new1.dat new2.dat new3.dat would add "NEW1.DAT" and "NEW3.DAT" to "SAVE.PAK". The Freshen Command The Freshen command is very similar to the Update command, except that it only checks files which already exist in the archive. To freshen files in an archive, type PAK f <archive name> <file name or names> For example, PAK f total *.* would check every file in the archive "TOTAL.PAK" and freshen any which were older than those on the disk. Note that the "*.*" in the above example is optional; if you omit the file list, PAK assumes you intended all files in the directory. Archiving Subdirectories By including the /I (include subdirectories) option with any of the above commands (Add, Move, Update, or Freshen), you can add files from several directories at once. PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 6 For example, if you had these directories - \DOCUMENT \DOCUMENT\BUSINESS \DOCUMENT\BUSINESS\LETTERS the command: PAK a save \document\g*.* /I would add all files which began with the letter G in each of the three directories. Similarly, PAK a image a:\ /I would archive every file from drive A. Extracting Files From An Archive The Extract Command To copy files from an existing archive to the disk, type PAK e <archive name> <file name or names> For example, to unpack all of the files from the archive "GAME.PAK", type PAK e game Again, PAK assumes that you mean all of the files in the archive if you omit the file names to be extracted. If one of the files to be extracted already exists, PAK will stop and ask if you intend to replace the existing file. When using any command which does involve compression (i.e., the Add, Move, Update and Freshen commands), you can use wildcards in specifying the archive name. For example, PAK e ch* *.doc would extract all of the files with the extension .DOC from all of the archives starting with the letters CH. As usual, PAK will provide .PAK, .ARC, .ZIP, or .SDN if you omit the extension. Extracting files to one or more remote subdirectories is much like adding them from other subdirectories. For example, PAK e project \c\objects\*.obj \c\source\*.c would extract all of the files with the extension .OBJ to the \C\OBJECTS directory, and all the files with the extension .C to the \C\SOURCE directory. PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 7 The Extract and Remove Command Sometimes you may wish to move files out of an archive rather than simply copying them. To do this, type PAK x <archive name> <file name or names> The X command is like the Extract command in all ways except that it deletes the files from the archive after unpacking them. If this removes all of the files from the archive, leaving it empty, it also deletes the archive. Extracting Files to the Screen or Printer You can also extract files to the standard output, which is normally the screen. To do so, type PAK p <archive name> <file name or names> If you add the /MORE option to this command, PAK will pause after each screen of information. Anything sent to the standard output can be re-directed to a file, some other programs, or to the printer. For example, PAK p docs >prn: would extract all of the files from the archive DOCS and send them to the printer. For other uses of redirection, consult your DOS manual. Extracting files to their original paths PAK 2.51 saves complete path information for each file in your archives. By adding the /PATH option to the extract command, you can tell PAK to restore your files to their original directories. For example, if you saved a directory and its subdirectories with the Add command, like so: PAK a saved \test /I then you could restore every file from the archive to its original location by typing PAK e saved /path PAK will create any needed directories if they do not already exist. PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 8 Managing Archives Listing Files Both the L and V commands display a list of files, the original sizes, and the file dates, in much the same format as the MSDOS DIR command. In addition, they display the type of compression, compression ratio, the compressed size, time, and CRC checksum. If you add the /MORE option to the list command, PAK will pause after each screen of information. There is no difference between the two commands. Both L and V are provided for the convenience of those used to PAK 1.0. There are 12 compression types, created variously by ARC, PKARC, PKZIP, and PAK. PAK can extract files compressed with any of these, and compress new files with the Crunched, Squashed, Shrunk, Crushed, Imploded, or Distilled types. -- No compression. Used by ARC, PKARC, PAK. Packed Repeated byte values replaced by codes. Used by ARC. Squeezed Huffman encoding, used by ARC 5.20 and earlier. crunched Lempel-Zev compression, used by ARC 4.5 and earlier. Crunched Lempel-Zev compression, used by ARC 5.0 and later. Squashed Lempel-Zev compression, used by PKARC. Crushed Lempel-Zev compression, used by PAK. Distill Huffman/Sliding Window, used by PAK 2.51. Shrunk Lempel-Zev compression, used by PKZIP. Reduced Sliding Window, used by PKZip 0.9 imploded Huffman/Sliding Window, PKZIP 1.0 and later. Imploded Huffman/Sliding Window, PKZip 1.1 and later. PAK uses the CRC checksum to verify that the file is intact. Deleting Files Sometimes you may wish to remove files from an archive, either because they were added accidently or because they are no longer useful. To delete files from an archive, type PAK d <archive name> <file name or names> PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 9 For example, PAK d junk *.tmp would delete all the files ending in the ".TMP" extension from the archive "JUNK.PAK". PAK can ask for confirmation before deleting each file. To enable this option, type PAK d /WP <archive name> <file name or names> Testing files Sometimes the integrity of an archive (or any other file) is suspect, such as after transmission by modem or after physical disk damage. The Test command checks all the specified files to insure that they are intact. For example, to test the archive "POKER.PAK" which you have just downloaded from a BBS, type PAK t poker PAK can also test multiple archives this way: PAK t *.pak would test all of the archives ending in the .PAK extension. If, for some reason, you wish to test only some of the files, you may specify a list of files, much as you can for any other command. For example, PAK t *.pak *.doc will test only files ending in the .DOC extension. Adding Remarks to Archives PAK supports variable length remarks for each file in an archive, and for the archive as a whole. PAK 2.51 also supports extended comments, such as multiline remarks or remarks with ANSI graphics. To add these special remarks to a file, type @[filename] when asked for a remark instead of a normal line of text. For example, at this prompt: Archive remark? You could type Demonstration (C) 1989 Special Software PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 10 Or you could type @banner.txt where banner.txt is a file with the logo you wish to display. Note: PAK automatically removes the ANSI sequence for keyboard remapping from remarks. The /R (remark) option Adding the /R option to any other command (such as Add or List) will enable remarks. For example, PAK a /r saved *.pas will add all the files with the extension .PAS to the archive SAVED, and ask for the remark for each new file. PAK l /r saved would then include those remarks with the list of files in the archive. The /H (header remark) option Adding the /H option to any other command will enable the remark at the head of an archive. In all other ways it is like the /R option. The Revise command Sometimes you may wish to change the remarks in an archive. Typing PAK r saved *.doc will first display the archive remark, and then display the files with the extension .DOC one at a time, and ask for the new remark for each. If you wish to keep the existing remark, simply press <enter>. The Header command The H (header) command is just like Revise, except that it only changes the remark at the head of the archive, and not the remarks for the files in the archive. Converting archives for other programs PAK can read archives created by ARC, PKARC, PKZIP, and earlier versions of PAK directly. To save space, however, you may wish to PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 11 convert archives to the PAK 2.0 format. The C command extracts files from the archive and recompresses them. Example: To convert all the files in BONZO.ARC, type: PAK c bonzo If you add the /REN (rename) option, PAK will automatically rename any converted archives to .PAK. For example, if you had a directory full of ARC format files which you wished to convert, you could type PAK c *.ARC /ren and all of the files would be changed to .PAK. It is also possible to convert files created with PAK so that they will be compatible with ARC, PKARC or PAK 1.x, by adding the C, S, or CR compression type modifier: PAK c /c bonzo converts bonzo (created with PAK, PKARC, or PAK) to compression types compatible with ARC, PKARC, and PAK 1.x. PAK c /s bonzo converts bonzo to compression types compatible with PKARC or PAK 1.x. PAK c /cr bonzo converts bonzo to compression types compatible with PAK 1.x. Converting to and from ZIP files ZIP files are a special case, since they are in a format completely different from ARC and PAK files. PAK automatically renames the archive to .PAK or .ZIP if you change from one format to the other. Otherwise, converting ZIP archives is much like converting any other kind of archive. To convert a PAK or ARC format archive to ZIP, type PAK c bonzo /z Version 1.01 PKUNZIP had bugs in it. PAK compensate for these when creating a ZIP archive, but this may hurt compression on some files. If you want to create a file that PKUNZIP 1.01 can read, you must include the BUGS option: PAK c bonzo /bugs BUGS implies the Z (Zip format) option. PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 12 If you want to create an archive that ZIP 0.9 will read, you must force PAK to use Shrinking only with the ZS option, like so: PAK c bonzo /zs Self-Extracting Archives PAK can create special EXE files which contain archived files and can extract them without PAK. PAK treats these files like any other archive, and any and all PAK commands will work on them. There is an additional overhead of approximately 6.7K for these files. There is no royalty required to distribute self-extracting archives, and several vendors use them as a method of delivering software in a compressed form. Creating self-extracting archives To create a self-extracting archive from scratch, simply use the A (Add) command as you would to create a normal archive, and include the /EXE option. For example, PAK a demo /exe will create a new archive DEMO.EXE which contains all the files in the current directory. Using self-extracting archives To extract files from a self-extracting archive, simply type the name of the EXE file, like so: DEMO Self-extracting archives created by PAK normally ask before writing over a file if the file with the same name exists. You can disable this by adding the /W (write-over) option: DEMO /w A self-extracting archive will pause after an archive remark and ask if it should continue. You can use this to display an opening banner detailing the contents of the archive, so you, or anyone else extracting the archive, have a better idea if you want to continue. If you want to disable this, add the /N (no pause) option: DEMO /n PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 13 Self-extracting to a path By specifying a path, you can determine a destination for the extracted files. For example, DEMO c:\project will deliver the files in the C:\PROJECT directory. If the directory does not exist, the self-extracting archive will attempt to create it. You can extract files to their original directories if you include the /P (path) option. Suppose you created the original archive in a directory called C:\PROJECTS\ALIEN, which had two subdirectories called TILES and TERRAIN. You might create the original archive like this: PAK a /exe alien *.exe *.com *.dat tiles\*.pic terrain\*.* If you then typed: ALIEN c:\games\alien /p The files would extract to C:\GAMES\ALIEN, C:\GAMES\ALIEN\TILES, and C:\GAMES\ALIEN\TERRAIN. If any of these directories, including GAMES, did not exist, then the self-extracting archive would create them. Converting to self-extracting archives You can convert existing archives to a self-extracting format with the C (Convert) command, like so: PAK c sales /exe You can also convert self-extracting files to conventional archives with the Convert command. For example, PAK c sales.exe will remove the self-extracting code from sales. Self-extracting archives created by EXEMAKE (which was distributed with PAK 1.0 to 1.61) which contain remarks will generate errors when read by PAK 2.51. PAK cannot read these remarks, but it will read the files. Options In addition to the commands, PAK supports a variety of options. We've already mentioned a few in passing. PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 14 These options aren't necessary for the day-to-day use of PAK, but occasionally you may wish to use them. Normally, these options appear immediately after the command, separated by slashes (/) or dashes (-). For example: PAK a /opt1 /opt2 archive While this is the normal ordering, it's not required, and the options can appear anywhere on the line, provided each starts with the slash character or dash character. For example, PAK a archive /opt1 file /opt2 is also acceptable. Note: Options may no longer be jammed together as they were in PAK 1.0. This format was hard to read, and precluded certain combinations of option names. Crunch, Squash, and Crush (/C, /S, and /CR) Using the /C, /S or /CR option will force PAK to use Crunching, Squashing, or Crushing when compressing files. They are of primary use with the Convert command, but they can also be used with Add, Move, Update, and Freshen. Use Zip format (/Z, /ZS, /BUGS) The /Z, /ZS, and /BUGS options tell PAK to create a ZIP format archive. /BUGS forces PAK to write a file which accommodates bugs in PKUNZIP 1.01, which may hurt compression. /ZS forces PAK to use only Shrinking, so that PKUNZIP 0.9 can read the archive. Like the /C, /S, and /CR options, these options can be used either with the Convert command or with Add, Move, Update, or Freshen. Encrypting Files (/G) You can encrypt your archives with a password. Files can still be listed in such archives, but they cannot be extracted without the password. To encrypt files, type PAK a /g=<password> <archive name> <file name or names> The 'g' option stands for Garble. Passwords used with the Garble command are converted to all uppercase. For example, to encrypt the file "SECRET.EXE" in the archive "DARK.PAK" with the password "DEEP", type PAK a /g=DEEP dark secret.exe PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 15 To extract it later, type PAK e /g=DEEP dark secret.exe While these are the most common uses of Garble, Garble can also be used with any of the other commands. For example, testing the example encrypted archive requires the use of the Garble command: PAK t /g=DEEP dark Duplicate Files (/D) The /D (duplicate) option selects only those files which are both inside the archive and outside the archive. For example, PAK e /d saved *.doc would only extract those files with the .DOC extension which matched existing files on the disk. The Freshen command is another example of the /D option - it only adds those files which already exist in the archive. While of most use with the Add and Extract commands, the Duplicate option can be used with other commands, such as List. Make EXE file (/EXE) Including the /EXE option with the Convert command or any compression command (such as Add or Update) will create a self- extracting archive. See the section on self-extracting archives. Print in Hex format (/HEX) Adding the /HEX option to the Print command will display the file in a hexadecimal format. PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 16 Including subdirectories (/I) The /I option causes PAK to search subdirectories when adding files to an archive. For example, if you had these directories - \DOCUMENT \DOCUMENT\BUSINESS \DOCUMENT\BUSINESS\LETTERS the command: PAK a save \document\g*.* /I would add all files which began with the letter G in each of the three directories. Similarly, PAK a image a:\ /I would archive every file from drive A. The /I command automatically includes the /PATH command so that adding files to an existing archive will take the paths of the original files into account. You can change this by altering the configuration file (STDCFG.TXT) and installing your new configuration with PAKINST. See the section on PAKINST. Use last date (/L) Normally, the date of an archive is the last date it was altered in any way. If you add the /L option to any command which changes an archive, the archive date will be set to that of the most recent file in the archive. Moving Files (/M) The Move option will delete files after compressing them or extracting them. The M (move) and X (extract + delete) commands are actually the Add and Extract commands with the Move option. This option is primarily of use in combination with Update or Freshen, which do not have matching Move commands. Pause after each page (/MORE) The /MORE option causes the List or Print commands to pause after each page of text displayed. PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 17 Using the original path (/PATH) PAK stores the full path of each file compressed except for the drive. By including the /PATH option with most commands, you can take this information into account. The List command displays the path of the archived files if you include the /PATH option. Compression commands (such as Add or Update) normally only consider the names of files when comparing old files in the archive to new files to be added. For example, if there is a file in the archive named READ.ME, adding a new file named READ.ME will replace the old one. With the /PATH option, compression commands also consider the path. In the previous example, if the first READ.ME was archived from the \123 directory, and the second was archived from the \TP5 directory, they would be considered different files with the /PATH option. Use Remarks (/R and /H) Adding the /R option to any other command (such as Add or List) will enable remarks. For example, PAK a /r saved *.pas will add all the files with the extension .PAS to the archive SAVED, and ask for the remark for each new file. PAK l /r saved would then include those remarks with the list of files in the archive. The /H option is similar, except that it only enables the remark at the head of an archive. Rename archives on convert (/REN) Adding this option to the Convert command will change the extensions of the converted archives to .PAK. PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 18 Sorting Files (/S) PAK supports sorting of archives by filename + extension (the normal method, used in release 1.0), extension + filename, date + time, size, or no sort at all. To enable a sorting method, include one of these options: /SN for filename + extension /SE for extension + filename /ST for date + time /SS for size /NS for no sort For example, PAK a /ST newmail mail*.* will add the all files starting with MAIL to the archive NEWMAIL in the order of the date and time of the files. On the other hand, PAK l /SS saved would list all of the files in an archive in the order of their fully-expanded size, regardless of the actual order in SAVED. Note that adding any file to an archive will result in PAK sorting the archive. In the first example above, all of the files in the archive NEWMAIL would be sorted by time, even if they were previously sorted by some other method. The standard sort for the compression commands (Add, Move, Update, Freshen) is by filename + extension. For other commands, the standard is no sorting. Pack Archives (/P) Archives rarely compress, so normally PAK does not attempt to do so, which saves time. Adding this option will force PAK to try and compress archive files. Check security envelope (/SEC) Adding the /SEC option to any command will check the security envelope for the archive before any other action. Only use Distill or Implode (/O) PAK normally uses Crushing on files of less than 1500 bytes when using Distilling, and if PAK is writing a ZIP file, PAK normally uses Shrinking on files of less than 500 bytes. Using the /O option will force PAK to use only Distilling or Imploding. PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 19 The Temporary Path (/T) You can specify a path for temporary files, like so: PAK c /t=C: doodle Whenever PAK makes any change (adding or deleting a file) to an archive, PAK must create a temporary file for the changed archive. If you are working on floppy disks, this limits the maximum size of an archive to half the volume of the disk, since the old copy and the new copy must exist at the same time. If you use this option to specify a temporary path (such as C:), and you are working on drive A: or B:, PAK will create this temporary file in the Temporary Path and copy it over the old file when everything is done. This allows archives up to the full size of a floppy. PAK also needs a temporary file if you Print or Convert a file which is larger than what PAK can hold in memory (this is always limited to 64K, even if you have more). PAK will always try to use the Temporary Path to create this file. The temporary path can also be specified in the configuration information. You can also specify in the configuration information which drives should always use the temporary path. By default this is A and B. The details of changing your configuration are described in the section on PAKINST (page 24). If the Temporary Path is invalid, PAK will use the directory of the archive instead. Replacing Existing Files (/W) Normally, PAK asks before replacing an existing file, either in an archive or on your disk. You can change this by adding one of these options: /WA Always replace existing files. /WP Prompt before replacing existing files (normal). /WO Replace older files. /WN Never replace existing files. NOTE: The /WP option simply means 'Prompt' when used with the Delete command. Also, the Update and Freshen commands automatically include the /WO option. PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 20 General Syntax The command format for PAK is: PAK <command> [/opt, /opt...] <arcname> [<filename>, <filename> ...] [@<filename>] <command> is a command. [/opt] is zero or more options. <arcname> is the name of the archive to operate on, which may include the "wildcard" characters * or ?, provided <command> is not one of the compression commands (Add, Move, Update, or Freshen). <filename> is one or more file names. Filenames may include the "wildcard" characters * and ?. If you specify a directory or a disk drive, PAK will use all files in that directory. If you don't list any files or directories, PAK assumes you mean all the files in the current directory. @<filename> is a response file. A response file is a text file with commands, options, and file names, just as they would appear on the command line. Simply typing PAK will print a short list of commands. Summary of Standard PAK Commands Commands: A Add files to archive M Move files to archive U Update archive files F Update duplicate files E Extract files from archive X Move files from archive D Delete files L List files V List files P Display files T Test files C Convert files R Revise remarks H Revise archive header Options: /sec = check security envelope (if present) /m = move files /c = make ARC compatible files (Crunched). /s = make PKARC compatible files (Squashed). /cr = make PAK 1.x compatible files (Crushed). /z = make ZIP 1.10 compatible archive (Imploded). /bugs = make ZIP 1.01 compatible archive. /zs = make ZIP 0.9 compatible archive (Shrunk). /g = encrypt the file with a password. /t = use temporary path /d = use only duplicate files. /wa = always replace existing files PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 21 /wp = prompt before replacing existing files (normal) /wo = replace older files /wn = never replace existing files /r = use remarks /sn = filename + extension order /se = extension + filename order /st = time order /ss = size order /ns = no order /p = pack archives /l = use last date in archive to stamp archive /hex = display using hexadecimal format /more = pause after every page /ren = rename archive extension to PAK when converting /path = use path to compress, extract, or display. /i = include subdirectories /exe = create self-extracting file /o = Use only Distilling or Imploding. PAKINST (PAK install program) PAKINST can alter the interface for PAK to suit your needs. Also, if you are using a version of MSDOS or PCDOS earlier than 3.0, you will need to use PAKINST to install PAK.EXE in a specific directory. The configuration information for PAK is stored in the EXE file. However, you can convert this information to a text file with PAKINST, or convert a properly formatted text file to new configuration information. Included with PAK 2.51 are two example text-format configuration files, STDCFG.TXT and ALTCFG.TXT. By creating your own configuration files with a word processor, or by altering the provided examples, you can customize PAK's commands. PAKINST must always be run in the same directory with PAK. To run PAKINST, simply type PAKINST PAKINST provides four choices: set [D]irectory for pak.exe (required ONLY for DOS 2.xx) configure [P]AK from text file create [T]ext file from PAK.EXE configuration [Q]uit To set the directory for PAK, select D. If you are using DOS version 3.0 or later, this option is unnecessary. To configure PAK from a properly-formatted text file, select P. To create a text file from the current configuration of PAK, select T. PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 22 Text Configuration Files If you examine STDCFG.TXT, or create a new text file with PAKINST from the configuration information in PAK, you will notice that there are four basic sections: the header comment, the command definitions, the option definitions, and the default temporary path. These sections may be arranged in any order, but for clarity they are grouped together. Comments Text configuration files may include comments. PAKINST will ignore anything contained in curly braces {} or Pascal comment symbols (* *). For example, { This is a comment. } (* So is this. *) Comments may appear anywhere on a line. Command Definitions A command definition in a text-format file looks like this: <command> = <PAK command> [+ <PAK options>], "<help definition>" The <command> is the command as it will be used with PAK, i.e. 'A' or 'Add'. Commands must start with a letter, and may contain no spaces, but may be may be any length. <PAK option> Standard option Alternate option (ALTCFG.TXT) ADD A Add CONVERT C Convert DELETE D Del EXTRACT E Ext LIST L or V List REVISE R Revise VIEW P View TEST T Test The command may also include one or more <PAK options>, separated by the plus (+) symbol. <PAK option> Standard option Alternate option (ALTCFG.TXT) ALWAYS_REPLACE WA Always ARCHIVE_REMARK H Title ASCII (not used) (not used) CRUNCH C Crunch CRUSH CR Crush DISTILL (not used) Distill DUPLICATE D Dup PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 23 EARLY_ZIP BUGS Bugs EXT_SORT SE SExt HEX HEX Hex IMPLODE Z Zip INCLUDE_DIRS I Include LAST_DATE L Last MOVE M Move NAME_SORT SN SName NEVER_REPLACE WN Never NO_SORT NS SNone PACK_ARCHIVES P Pack PASSWORD G Pass PAUSE MORE More PROMPT_REPLACE WP Prompt REMARK R Rem RENAME REN Rename REPLACE_OLDER WO Older SELF_EXTRACT EXE EXE SHRINK ZS Shrink SINGLE O (not used) SIZE_SORT SS SSize SQUASH S Squash TEMP_PATH T Temp TEST_ENVELOPE SEC Security TIME_SORT ST STime USE_PATH PATH Path Finally, separated from the commands and options by a comma and enclosed in quotation marks is the help definition for this command. The PAK help screen, obtained by typing PAK by itself, will display the text within these quotation marks after the command. For example, the Freshen command (F) in the STDCFG.TXT file looks like this: F = Add + Duplicate + Replace_Older + Name_Sort, "Update duplicate files" Reading this literally, PAKINST takes this as 'F means add files to the archive, selecting only duplicate files, replacing older files, and sorting by name. When asked for help, display F followed by the text "Update duplicate files".' Notice that this does not all have to be on the same line. Option Definitions An option definition looks like this: /<option> = <PAK option> [+ <PAK options>], "<help definition>" This is much like a command definition, only it begins with a slash (/) to indicate it is an option. Options, of course, may not include PAK commands. PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 24 For example, /MORE = PAUSE, "Pause after each page" indicates that the /MORE option means that PAK should PAUSE. If you have a set of options that you often use together, it may be worthwhile to create a new option or change an existing one. For example, /MAIL = NO_SORT + ALWAYS_REPLACE + LAST_DATE + INCLUDE_DIRS + USE_PATH, "Mail packet option" Configuring a default temporary path To specify a default temporary path, include a line in the text configuration file in this format: $TPATH = "<path>" For example, $TPATH = "C:" Will set the temporary path to drive C. Using PAK with a WORM or Network Drive Normally, PAK only uses the temporary path for intermediate files needed for Distilling and Imploding. However, if you are working on a network drive or a WORM drive, you may want PAK to use the temporary path for everything but the finished archive. In that case, you can set the $TDRIVES variable to specify these drives, like so: $TDRIVES = "A,B,E,H" In which case PAK would avoid writing to A:, B:, E:, or H: except when writing the finished archive. By default, $TDRIVES is A: and B:. Configuring a standard archive title To specify a standard title to include in all of the archives which you create, include a line in the text configuration file in this format: $STD_TITLE = "<remark>" For example, $STD_TITLE = "Joe's BBS" PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 25 Will include the remark "Joe's BBS" in every archive you create with the /H option. Like any other remark, the standard title can be the name of a file instead, like so: $STD_TITLE = "@C:\DOC\Title.txt" It's fairly important to include a complete path to a standard title file, since you could be using PAK in any path on any drive. Appendices Release History Release 2.51 (October 8th, 1990): Fixed bug with self-extracting archives with 7 or 8 character file names. Release 2.50 (September 20th, 1990): Added support for ZIP files. Added Temp path support for Network and WORM drives. Added Distill-only option. Added autochecking for security envelopes. Added error count display to test command. Added path support to self-extracting archives. Added pause feature to self-extracting archives. Reduced overhead for self-extracting archives. Fixed bug with deleting files from self-extracting archives. Release 2.10 (August 10th, 1989): Fixed bug with deleting files from multiple archives. Fixed bug which required excessive memory. Fixed another minor bug in Distill. Fixed bug with Garble and Distill. Added path-matching on compression. Added default archive title to configuration. Changed Revise command so as to preserve the security envelope. Release 2.01 (July 31st, 1989): Fixed minor bug in Distill. Release 2.0 (July 26th, 1989): Added Distill compression. Added security envelope. Added path support and subdirectory inclusion. Added ability to use all commands on self-extracting archives. Moved creation of self-extracting archives from EXEMAKE to PAK. Added write-over option for self-extracting archives. PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 26 Added pause feature. Added response file. Added option to rename converted archives to .PAK. Added summary for multiple archive conversion. Added default temp path to configuration information. Added filter to eliminate ANSI keyboard definition codes from remarks. Increased speed of Print option. Eliminated PAK.CNF. Eliminated need to install PAK for DOS version 3.0 and later. Eliminated restriction on foreign characters in file names. Eliminated difficulties with read-only files. Changed command syntax slightly to allow more flexibility in choice of command and option names. Allows use of '-' for options as well as '/'. Release 1.6 (January 24th, 1989): Fixed several small bugs. Added separate support for archive remarks. Added optional prompting on deletion. Changed Convert command to preserve archive date. Added optional date stamping using last date in archive. Fixed incorrect stack size in EXEMAKE which caused erratic failures. Added support for remarks in self-extracting archives. Overhead increased to 6744 bytes. Release 1.51 (January 15th, 1989): Fixed bug which left junk bytes at the end of archives when using a simple Store on large files. (Rare, usually only with already compressed files). Fixed bug in EXEMAKE with extraction of files over 64K. EXEMAKE fixes increase self-extraction overhead to 6674 bytes. Release 1.5 (January 12th, 1989): Added remarks. Added support for wildcards in specifying archives. Added extraction to standard output. Added sorting options. Added temporary path. Added configurable interface. Added target directory parameter to self-extracting archives. Improved error reporting. Reduced size overhead for self-extracting archives to 6662 bytes. Fixed bug in the Move command. Fixed problem with handling large numbers of files. Fixed bug with EXEMAKE forcing the name of the output .EXE to that of the input archive. PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 27 PAK Release 1.0 (October 17th, 1988): Initial release as PAK. GSARC Release 1.0 (October 13th, 1988): Limited release. Technical Notes File Formats In the interest of simplifying the creation of utilities by third-party developers, this section provides a short description of the file format for archives created with PAK. For information on the ZIP format, see the file APPNOTE.TXT supplied with PKWare's PKZIP program. In the basic format for archives, each archived file has a header which looks like this: Marker (1 byte) - always 26 (^Z, the eof mark for text files). Version (1 byte) - type of compression used. Name (13 bytes) - an ASCIIZ string. Size (4 bytes) - a long integer giving the current file size. Date (2 bytes) - packed date. bits 0-4 = day 5-8 = month 9-15 = year - 1980. Time (2 bytes) - packed time. bits 0-4 = second / 2 5-10 = minute 11-15 = hour. CRC (2 bytes) - the CRC checksum for the expanded file. Length (4 bytes) - original length of file. The version field currently has the following values: 0 End of file. File header is only 2 bytes long (26 and 0). 1 No compression. File header lacks the Length field. 2 No compression. 3 Run-length encoding (RLE). 4 Huffman squeezing. 5 Fixed-length 12 bit LZW compression. 6 As above, with RLE. 7 As above, but with a different hashing scheme. 8 Variable-length 9-12 bit LZW compression with RLE. 9 Variable-length 9-13 bit LZW compression without RLE. 10 Crushing. 11 Distilling. Basic archives end with a short header, containing just the marker (26) and the end of file value (0). PAK release 1.5 extended this format by adding information after this end of file marker. Each extended record has the following header: PAK 2.51 (C) 1989-90 NoGate Consulting October 8th, 1990 Page 28 Marker (1 byte) - always 254 type (1 byte) - type of record File (2 bytes) - # of file in archive to which this record refers, or 0 for the entire archive. length (4 bytes) - size of record Type Meaning 0 End of file 1 Remark 2 Path 3 Security envelope 4 Error correction codes (not implemented in PAK 2.xx) Error Codes On exiting, PAK sets the DOS error level two one of four values: 0 No Error 1 CRC error in file or file missing 2 Out of memory 7 Disk error Credits ARC is a registered trademark of System Enhancement Associates, and PKZIP is a registered trademark of PKWare, Inc. NoGate Consulting is not associated in any way with System Enhancement Associates or PKWare. We would like to thank several people: The various authors of the public-domain De-Arc'ing utility, for providing insights into the (sometimes very strange) internal workings of ARC: Roy Collins, David W. Carroll, Richard P. Byrne, Robert D. Tolz, and Jim North. We must also credit Terry A. Welch, whose article "A Technique for High Performance Data Compression", IEEE Computer Vol 17 No 6 (June 1984) seems to have started all the research on Lempel-Zev coding. Spencer W. Thomas, Jim McKie, Steve Davies, Ken Turkowski, James A. Woods, and Joe Orost, who are the authors of the UNIX compress utility. Ray Kaliss of SDNet/works!, who proposed the Security Envelope concept. And all of the people whose suggestions we added to PAK, such as the temporary path, sorting, wildcards for archives, path support, and remarks. PAK version 2.51 Order Form ----------------------------------------------------------------- Make checks payable to: NoGate Consulting P.O. Box 88115 Grand Rapids, MI 49518-0115 ----------------------------------------------------------------- Qty ___ Command line edition of PAK @ $15 each $______ ___ Full screen edition of PAK (PAKF) @ $30 each $______ ___ Programmer's edition of PAK @ $75 each $______ Subtotal $______ Michigan residents please add 4% sales tax. $______ Shipping and handling - inside the United States $3.50 - or - - overseas $5.00 Credit Card orders add 3% surcharge $______ Total $______ Diskette type (check or circle one): [ ] 5.25" [ ] 3.5" Payment: (check or circle one): [ ] Check [ ] Money Order [ ] Visa [ ] MasterCard [ ] AmEx Credit Card #__________________________________________________ Expiration Date _______ Signature ____________________________ Credit Card Orders may be made by phone - (616)455-6270 or via the NoGate BBS - (616)455-5179 or via FAX - (616)455-8491 Checks and Money Orders must be drawn on U.S. banks in U.S. funds ----------------------------------------------------------------- Name_______________________________________________________ Company_______________________________________________________ Address_______________________________________________________ ______________________________________________________ Phone_________________________ Bus.________________________ Where did you obtain PAK? _______________________________________________________ Comments_______________________________________________________
A Beginner's Guide To IPhone 14 Pro Max Mastering: The Comprehensive User Guide And Illustrated Owner's Manual With Tips And Advanced Tricks For New Be