home *** CD-ROM | disk | FTP | other *** search
/ TCE Demo 2 / TCE_DEMO_CD2.iso / demo_cd_.2 / mags / stosser / stestos3.arj / stestos3.msa / DCK / STZIP.DOC < prev    next >
Text File  |  1995-10-26  |  22KB  |  541 lines

  1.  
  2.  
  3.  
  4.   ____________________________
  5.                            _________  ***** ******    ******  *  *****
  6. __________________________           *        *         **   *  *    *
  7.                     _________________ **     *       ***    *  ******
  8.   ________________                     *   *      **      *  *
  9.                     _____________ *****   *      ******  *  *
  10.      ______________________
  11.  
  12.  
  13.  
  14.  
  15.                             STZip version 2.1
  16.                      (c) Vincent Pomey 1990, 1991, 1992
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.         **************
  25.         * 0 - Prolog *
  26.         **************
  27.  
  28.     STZip is a program that allows you to compress and decompress
  29. files, i.e.  to reduce their lengths. You saves space on your disks and
  30. reduce the transmission time if you send the files by modem. It also
  31. allows you to group several files in one single file, whose extension
  32. in general is ZIP.
  33.  
  34.     STZip uses files that are compatible with PKZip 1.93 on the IBM PC,
  35. and the Unix Info-Zip programs Zip 1.9/Unzip 5.2. It will probably be
  36. compatible with the up-coming version 2.0 of PKZIP.
  37.  
  38.     You can and are encouraged to copy, distribute and put this program
  39. for download on bulletin boards. Commercial use is not authorized
  40. without agreement. Use this program at your own risk, I do not provide
  41. any warranty about it.
  42. Please avoid to "repackage" STZip, I prefer than the users gets all the
  43. files originally in the distribution.
  44.  
  45. This is postcardware, if you use it, please send a nice postcard to
  46.  
  47. Vincent Pomey
  48. 2 allée Valéry Larbaud
  49. 92260 Fontenay aux roses - France
  50.  
  51. I inform registered users of new versions if they supply an E-mail address.
  52. Thanks to all users who were kind enough to register !
  53.  
  54. The program is written in Modula-2 and assembler. For information on
  55. the file-format, see APPNOTE.TXT distributed with PKZip.
  56.  
  57. I can be contacted via electronic mail :
  58. Fido  : Vincent Pomey (2:320/100.2)
  59. Email : vincent@stell.fr.mugnet.org or vincent@stell.gna.org (unreliable)
  60.  
  61.     As you will probably see if you read this doc, I'm not a good
  62. technical writer... Sorry for that !
  63.  
  64.  
  65.                               ----oooOooo---
  66.  
  67.  
  68. There are several ways to use STZip:
  69.  
  70.         - double-clicking STZIP.PRG, using the GEM-interface
  71.  
  72.         - installing it as an application in the desktop: click once on
  73. STZIP.PRG, choose from the Desktop's menus the entry "Install 
  74. Application," type ZIP and confirm. After this, you may save the
  75. desktop.  Now, to use ZIP you only have to double-click a file with the
  76. extension  .ZIP en you will find yourself in STZip, with GEM interface
  77. for using that  file.
  78.  
  79.         - renaming STZIP.PRG to STZIP.TTP and using it with a command 
  80. line.
  81.  
  82.         - from a command line interpreter or external program, also using 
  83. a command line.
  84.  
  85.  
  86. The usage with the GEM interface is the easiest. Certain options are 
  87. available only in GEM (the comments for example), while others are only 
  88. present with command-line usage (e.g. excluding files from compression).
  89.  
  90.  
  91.  
  92.         *********************************
  93.         * I - Usage with a command line *
  94.         *********************************
  95.  
  96. The usage of STZip with a command line is similar to that of ARC or LHArc 
  97. on the Atari, or PKZip on the PC.
  98.  
  99.  
  100.    1 -  A Table
  101.    ------------
  102.  
  103.  
  104.    +--------------------------------------------------------------------+
  105.    |       The syntax is of the form:                                   |
  106.    |                                                                    |
  107.    |    STZip command {options} [path] zipfile {file}                   |
  108.    |                                                                    |
  109.    |                                                                    |
  110.    |  There has to be one single command:                               |
  111.    |                                                                    |
  112.    |    -a      add files                                               |
  113.    |    -d      delete files                                            |
  114.    |    -f      freshen: update files in the zip-file                   |
  115.    |    -u      update: add new files and freshen the ones already      |
  116.    |            present in the zip-file                                 |
  117.    |    -x      extract files                                           |
  118.    |    -s      extract compressed files on the screen                  |
  119.    |    -c      check the zipfile                                       |
  120.    |    -v      list of the files with info                             |
  121.    |    -l      list of the files, just with their names                |
  122.    |    -?      a bit of help                                           |
  123.    |                                                                    |
  124.    |                                                                    |
  125.    |   You can also add a few options:                                  |
  126.    |                                                                    |
  127.    |    -o      overwrite a file without asking for confirmation        |
  128.    |            if the file already exists                              |
  129.    |    -r     `recursive compression: all the files in the             |
  130.    |            sub-directories you selected will also be compressed.   |
  131.    |           `recursive decompression: files compressed from sub-     |
  132.    |            directories will be decompressed in the corresponding   |
  133.    |            folders, which will be created if they don't exist.     |
  134.    |    -p      store pathname: the pathname of the file you have       |
  135.    |            specified in the command line is stored in the zip;     |
  136.    |            automatic with recursive compression                    |
  137.    |    -m      move file: files are deleted after compression          |
  138.    |    -t      the date of the .zip file will be that of the file      |
  139.    |            compressed with the most recent date.                   |
  140.    |    -z      modify the general comment for the zip file             |
  141.    |    -i dir  put the files to be compressed in the subdirectory      |
  142.    |            DIR in the zipfile                                      |
  143.    |    -g      extract the file FFF.ZIP in the directory FFF           |
  144.    |    -w pw   encrypt the files to be added using pw as password      |
  145.    |            or use pw to decrypt the files to be extracted          |
  146.    |    -nmmddyy add only the files newer than mm/dd/yy (US date format)|
  147.    |    -h      wait for keypress before terminating the program        |
  148.    |    -e      specifies the compression method:                       |
  149.    |             -es    store, no compression                           |
  150.    |             -eh    shrink, quick compression                       |
  151.    |             -ei    implode, default                                |
  152.    |             -ed    deflate, better compression                     |
  153.    |                                                                    |
  154.    +--------------------------------------------------------------------+
  155.  
  156. Note that you can use the -z option alone, without any command. STZip
  157. will only ask you for the new comment of the file.
  158.  
  159.    2 - The command line
  160.    --------------------
  161.  
  162.    You can specify the folder that is to be used as a default for all 
  163. operations after the commands and the options: for example d:\texts\.
  164. Note the \ at the end.
  165.  
  166.    Following that, the name of the zipfile, that will contain (or already 
  167. contains) compressed files, must be specified. The extension .ZIP is the
  168. default. You may use wildcards for the zipfile (but be sure that your
  169. shell doesn't expand them because it won't work) : all the matching
  170. zipfiles will be processed .
  171. e.g.  stzip -xg *.zip    this will extract all the zip files in their directory
  172.    or stzip -z *.zip <comment.txt  this will change the zip comments for all
  173.   the zipfiles. (note that -z may now be used alone, without any action
  174.   switch).
  175.  
  176.    After all this, you put the list of files to be processed (i.e.: to be
  177. deleted, compressed or decompressed). It may be a directory name (without
  178. trailing \), all files inside that directory will be processed.
  179.  
  180.  
  181.    You may use the wildcards ? and * in the names of files:
  182.                 ? represents any single character
  183.                 * represents a string of characters
  184.  
  185.    Not specifying any file names is the same as *.* (all files).
  186.  
  187.  
  188.    3 - External list
  189.    -----------------
  190.  
  191.    If a name begins with a @, it means that that file contains a list
  192. of files to be treated. If you have a file list.txt containing for
  193. example:
  194.  
  195.         *.mod
  196.         zip*.txt
  197.         file1.vdt
  198.  
  199.    then stzip -a burp @list.txt         is equivalent to
  200.         stzip -a burp *.mod zip*.txt file1.vdt
  201.  
  202.    stzip -a burp @   will read the names of the file from stdin
  203. (generally keyboard).
  204.  
  205.  
  206.    4 -  Excluding files
  207.    --------------------
  208.  
  209.    If a name begins with a ~, it means that it is NOT to be added. It is 
  210. solely of interest when one uses wildcards; for example, to compress 
  211. all files except .BAK, you have to use something like this: stzip -a burp 
  212. *.* ~*.bak
  213.  
  214.  
  215.    5 - Odds & Ends
  216.    ---------------
  217.  
  218.       An external list may contains another external list, but not ~
  219. file names. The ~ file names of the command line are valid for all
  220. files, including the ones read from external lists.
  221.  
  222.       Matching wildcards goes MS-DOS style, not the Unix way: *.* matches 
  223. all files, and not only those that have a . in their name. Paths using '..' 
  224. are not supported.
  225.  
  226.       The -p switch:
  227. if you run stzip -ap burp folder\alt.txt, the name of the file in the zip 
  228. will be folder\alt.txt, while without the -p switch, it would have been 
  229. alt.txt. The -p switch is automatically invoked during recursive 
  230. compression.
  231.  
  232.  
  233.     6 - Recursive compression
  234.     -------------------------
  235.  
  236.         If you have entered the -r option for compression, an important 
  237. thing will happen: the files you specify will also be searched for in all 
  238. sub-directories below you.
  239.  
  240.         The second attempt at explaining will be based on examples, the 
  241. first one being incomprehensible without several hours of meditation 
  242. topped off with a bunch of aspirins.
  243.  
  244.     An important thing to note is that if STZip doesn't do want
  245. you want, either compression or extraction, that's probably because
  246. you have forgotten to add the -r switch.
  247.  
  248. (In order to better understand the second attempt, remember that 
  249. folders do not actually exist within a zip-file. It's the path of the
  250. files (stored in the .zip) that contains the names of the folders)
  251.  
  252. fld is a folder.
  253. ...\ stands for any quantity of folders, or even none.
  254.  
  255. * stzip -ar burp
  256.         All the files in the current folder will be compressed, including 
  257. sub-directories.
  258.  
  259. * stzip -ar burp fld
  260.         The files fld\...\*.* will be compressed. The name fld\...\*.* is 
  261. stored in the zip file. To recap: all the files in fld are compressed, 
  262. including all the subdirectories found in fld.
  263.  
  264. * stzip -ar burp fld\*.txt
  265.         The files fld\...\*.txt will be compressed. The names 
  266. fld\...\*.txt are stored in the zip file. To recap: all the files with the 
  267. extension txt in fld are compressed, including all those found in the 
  268. subdirectories found in fld.
  269.  
  270. * stzip -ar burp fld\file.txt
  271.         The files fld\...\file.txt will be compressed. The names 
  272. fld\...\file.txt are stored in the zip file. To recap: all the files with 
  273. the name file.txt in fld are compressed, including all those found in the 
  274. subdirectories found in fld.
  275.  
  276. * stzip -ar burp c:\fld
  277.         The files c:\fld\...\*.* will be compressed. The names \...\*.* 
  278. are stored in the zip file. This means that c:\fld\ will NOT be stored as 
  279. part of the file names of the compressed files, because it is a COMPLETE 
  280. path, different from fld\.
  281.         Also, by using the changing of the working directory (of the kind 
  282. stzip -ar burp c:\fld1\ fld2\*.txt) it is possible to perform all sorts of 
  283. complex manipulations with the names of the files to be compressed. In the 
  284. above example, the files with the extension txt in c:\fld1\fld2 will be 
  285. compressed, but their names in the zip-file will be fld2\*.txt.
  286.  
  287.         No tests are performed EVER on the names of folders.
  288. stzip -ar burp *.txt will search in all directories, not only in those 
  289. with the extension txt!
  290.  
  291.         Some Unix-style shells perform themselves the substitutions of the 
  292. wildcards. STZip does not respond similarly to 
  293. 'stzip -ar burp fld\a.txt fld\b.txt' and
  294. 'stzip -ar burp fld\*.txt' even though for the shell this may be the same. 
  295. In this case, it is therefore necessary to add quotation marks to 
  296. fld\*.txt so that the shell will not substitute the wildcards. Likewise, 
  297. the ~ character may pose problems.
  298.  
  299.  
  300.    7 - Recursive decompression
  301.    ---------------------------
  302.  
  303.         If a zip file contains folders, there are two possibilities:
  304.  - ignore them and decompress to the current working directory (which is 
  305.    the default). This allows for the quick decompression of a specific 
  306.    file without creating lots of folders.
  307.  - or decompress the files to these folders and create the folders when 
  308.    necessary. For this, use option -r.
  309.  
  310. You can always add paths and use wildcards in the filenames. If you 
  311. specify in the parameters a name with a path, for example infra\*.msg, 
  312. then all *.msg files in infra AND in its subdirectories will be extracted.
  313.  
  314.  
  315.     8 - Comments
  316.     ------------
  317.  
  318.         The global comment for the entire zip file (changed with the -z 
  319. switch) is displayed every time the zipfile is accessed. In Gem, it is
  320. also possible to have a comment for each files in the zipfile, it is
  321. displayed when the file is extracted.
  322.  
  323.  
  324.  
  325.       ********************************
  326.       * II - Using the GEM interface *
  327.       ********************************
  328.  
  329.  
  330.    1 - General
  331.    -----------
  332.  
  333. The general algorithm is to select files on the disk selector and then
  334. click on the "Compress" button if you want to compress files, and select
  335. files on the zipfile selector and then click on the "Extract" button if
  336. you want to extract files.
  337. If you click on the "Compress" or "Extract" button without having
  338. selected any files, STZip will suggest you to process all the files.
  339.  
  340. You may unselect the files by clicking on the "Select: 000" button (it
  341. shows the number of selected files).
  342.  
  343. To change the zipfile, click on the close-box of the Zip file selector.
  344.  
  345. The "Recurse Subdirs" button:
  346.       during compression, if it is selected, then all subdirectories will 
  347. also be compressed.
  348.       during decompression, if it is selected, then all files will be 
  349. extracted to their original directory : DIR\FILE.TXT will be extracted
  350. in directory DIR (created if it doesn't exist). If not selected,
  351. DIR\FILE.TXT will be extracted as FILE.TXT, in the current directory.
  352.  
  353.  
  354.    2 - Informations/Comments/Display a file
  355.    ----------------------------------------
  356.  
  357. To get information about the entire zip file, you have to double-click
  358. on name of the zip file.
  359.  
  360. Similarly, you may get information about a specific file in the zip or
  361. on the disk by double-clicking on its name.
  362.  
  363. Information about the zipfile and the compression files contains some
  364. comments, and you may edit them. Zipfile comments are displayed
  365. whenever accessing the zipfile, while comments specific to a compressed
  366. file is displayed when extracting this file. The comments are saved on
  367. disk when you change the zipfile or when you quit STZip. This results in
  368. some disk access.
  369.  
  370. While looking the information of a disk file, you may rename it.
  371.  
  372. While looking the information of a file (compressed or on disk), you
  373. will be able to Display it (by clicking on the Trash button, uhh no,
  374. the Display button). Then, a few keys are available :
  375.     keys :         Move the text
  376.     Clr-Home :     Goto beginning of the file
  377.     Shift-Clr-Home : Goto end of the file
  378.     Ctrl-V :     Copy the file on the clipboard
  379.     Ctrl-S :     Save the file (will display a fileselector)
  380.     Ctrl-C :     Change the font or the font-size used
  381.     Ctrl-F :     Search a string
  382.     Ctrl-N :     Search same string
  383.     ESC :         Quit the display mode
  384.  
  385. It is also possible to get a menus with those options by pressing the
  386. HELP key.
  387.  
  388.    3 - Configuration
  389.    -----------------
  390.  
  391.     The Configuration dialog box lets you choose the compression
  392. method, the sort method for the Zip selector and the Disk selector,
  393.  
  394.     The configuration file contains all those choice, plus the
  395. current disk path and list field (the mask for the compressed files to
  396. be listed).
  397.  
  398.         *****************************
  399.         * III - Third part of the doc
  400.         *****************************
  401.  
  402.  
  403.    1 - Compression method
  404.    ----------------------
  405.  
  406.       The best compression method is _deflating_, but at that time
  407. it is not "officially" supported by PKZIP. Only a public alpha version
  408. of PKZIP (v1.93) support it. PKZIP 2.0 should be released soon and will
  409. support that method. For these reasons, the default method is
  410. _imploding_, which is compatible with every ZIP processing program.
  411. This will probably change in the future since Zip programs handling the
  412. "deflating" method are now officialy available for Unix and Amigas.
  413.  
  414.       The deflating method has three variants : one that compress
  415. faster but not so good, one medium, and one which compress best but
  416. slowly. There are buttons to select the one you want in Gem (Config
  417. dialog box). Using a command line, -edf gives you the fast one, -edb
  418. the best one, and -ed the medium.
  419.  
  420.     _Shrinking_ is an very fast compression method, but not as good
  421. as deflating or imploding. _Storing_ simply stores the files without
  422. compression. You may use that if the files are uncompressible (already
  423. compressed files or compressed pictures such as GIF or JPEG files).
  424.  
  425.       STZip checks if the file to be compressed has been already
  426. compressed using ARC, LHARC, ZIP, ZOO, freeze, compress, PfxPack, Ice
  427. or Atom. That way, you won't loose time or space by trying to compress
  428. files that would give bad or no compression at all (not speaking of
  429. growing in size, which is possible with the Implode method).
  430.  
  431.  
  432.    2 - Updating and freshening
  433.    ---------------------------
  434.  
  435.        These options allows to add a file you specified (in the command
  436. line) or selected (in Gem) only if it is needed :
  437.  
  438.  -Freshening : only specified files that are already in the zip and are
  439.         newer than those in the zip will be added.
  440.  -Updating : only specified files that are already in the zip and are
  441.          newer than those in the zip, _AND_ the specified files that are
  442.          not in the zipfile will be added.
  443.  
  444.  -Using a date line : only the files changed after the specified date will
  445.          be added.
  446.  
  447. To use those features in Gem, click on the 'Add Mode' box, and select what you
  448. want.
  449.  
  450. To use those features in a command line,
  451.    freshening is -f : stzip -f backup *.c
  452.    updating is -u   : stzip -u galery *.gif
  453.    date line is -t  : stzip -a -t011692 fip *.prg
  454.       Will add all *.prg files created or changed after Janury 16th 1992.
  455.       Note the US date format !
  456.  
  457.  
  458.    3 - Self extracting files
  459.    -------------------------
  460.  
  461.   You may use ZIP2TOS.PRG to convert a zip file to a .TOS program which
  462. will contains the compressed files and will extract them when launched.
  463.  
  464.   Without parameters, you will be prompted for the file to convert. You may
  465. also calls it with the zipfile names in parameters, from the desktop (drag
  466. a file) or a shell (zip2tos *.zip)
  467.  
  468.   A self extracting file should contains _only_ deflating or stored files. It
  469. will be unable to explode or unshrink files. This is _not_ checked when
  470. ZIP2TOS does the conversion.
  471.  
  472.   A self extracting file may be used as a normal zip file. Using STZip >1.3,
  473. you will be able to change the comments, list, extract, add or delete
  474. compressed files in the self extracting file.
  475.  
  476.  
  477.    4 - Encryption
  478.    --------------
  479.  
  480.   A compressed file inside a zip may be crypted. STZip use the same
  481. algorithm as PKZIP, and also support the slighly different method used
  482. in the Unix versions of Zip/Unzip.
  483.  
  484.   You may specify a password using the -w switch when using the command
  485. line interface, or by clicking in the "Crypt box" in the Gem interface.
  486. The files to be compressed will be encrypted using that password.
  487.  
  488.   That password will be also used when extracting files. If you forgot
  489. to specify it and STZip encounter a crypted file, it will prompt you.
  490. (i.e. : if you compress files using password BURP and extract them
  491. without leaving STZip, STZip won't prompt you for the password since it
  492. still has BURP in mind).
  493.  
  494.   STZip is also able to tell you if the password supplied for extracting a
  495. file is wrong. Note that the password is not stored in the file (would be
  496. stupid!), STZip uses some techniques to see if the beginning of the file
  497. extracts correctly with the supplied password.
  498.  
  499.  
  500.    5 - Return codes from command line mode
  501.    ---------------------------------------
  502.  
  503.   1 : not enough memory
  504.   2 : file not found
  505.   3 : illegal option
  506.   4 : two actions specified
  507.   5 : no zip file specified
  508.   6 : no command specified
  509.   7 : error reading
  510.   8 : this file is not a zip file
  511.   9 : error writing
  512.  11 : warning during extraction (read/write error, CRC error ...)
  513.  12 : warning during compression
  514.  
  515. 100 : Function not implemented
  516.  
  517.  
  518.     6 - Limitations
  519.     ---------------
  520.  
  521. The number of files in a zip is maximum 65536.
  522. Nevertheless, selection box in the GEM dialogs cannot display more than
  523. 200 files in a directory. A file with two directories of 200 files each
  524. will be displayed correctly in Gem. A file with 400 files in one
  525. directory will be processed correctly in Gem, but only the first 200
  526. files will be in the selection box.
  527.  
  528.  
  529.     7 - The End
  530.     -----------
  531.  
  532. Thanks to H. Okumura for his help with the 'sliding dictionary' 
  533. compression and to Philippe Regnauld for the STZIP logo in GEM.
  534.  
  535. Have fun using it !
  536.  
  537.  
  538.         Vincent Pomey, 28 April 1990, 13 April 1991.
  539.         Translation by Peter Kocourek, 25 July 1991.
  540.         Updated, 27 December 1992.
  541.