home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / mbug / mbug174.arc / CRUNCH28.LBR / CRUNCH28.DZC / CRUNCH28.DOC
Text File  |  1991-05-05  |  12KB  |  252 lines

  1.  
  2.                          CRUNCH and UNCR
  3.                            Version 2.8
  4.  
  5.              Copyright (c) 1987 by Steven Greenberg
  6.    This Version Released with the Permission of the Author by
  7.                           Gene Pizzetta
  8.                            May 5, 1991
  9.  
  10.  
  11. CRUNCH and UNCR are basic file compression and decompression 
  12. tools for ZCPR3 and CP/M.  A number options allow these utilities 
  13. to serve as hard disk backup and restoral tools, and make CRUNCH 
  14. a convenient tool for creating of archival libraries.  UNCR 
  15. handles crunched, squeezed, and LZH-encoded files.
  16.  
  17. Under ZSDOS and ZDDOS file date stamps are embedded in the 
  18. crunched file and then restored to disk when the file is 
  19. uncrunched.  In addition, the source file's date stamp is 
  20. transferred to the crunched file's on-disk date stamp so the 
  21. create and modify dates can be checked without uncrunching it.
  22.  
  23. CRUNCH USAGE:
  24.  
  25.      CRUNCH {dir:}afn.aft {dir:} {[text]} {/options}
  26.  
  27. UNCR USAGE:
  28.  
  29.      UNCR {dir:}afn.aft {dir:} {/options}
  30.  
  31. All command line parameters are optional, except the source 
  32. filename, which may be ambiguous.  The output filename is 
  33. generated automatically.
  34.  
  35. The two DIR specifications, the first for the source file and the 
  36. second for the destination file, may be in DU (drive and user) 
  37. form or, if running under ZCPR3, named directories.  If no drive 
  38. or user is given, the current default directory is assumed.  
  39. Under ZCPR3 all 32 user areas are available, but only the first 
  40. 16 users are accessible under vanilla CP/M.
  41.  
  42. "[text]" is an optional text string (CRUNCH only) that can be 
  43. used to identify the file.  The text string must be enclosed with 
  44. square brackets.  During uncrunching UNCR will print on the 
  45. screen any text string contained in the crunched file.
  46.  
  47. OPTIONS:  The option list must be preceded by a slash and contain 
  48. no embedded spaces.
  49.  
  50.      A    Archive mode (CRUNCH only).  The only files crunched 
  51.           (or copied) are those that have been modified since 
  52.           they were last backed up, based on the archive 
  53.           attribute.  After each source file is crunched, its 
  54.           attribute will be changed to archived.  This option 
  55.           allows CRUNCH to be used as an simple archival backup 
  56.           tool.
  57.  
  58.      C    Confirm mode.  Same as I.
  59.  
  60.      E    Erase existing files without asking.  Suppresses the 
  61.           prompt "Erase existing file (Y/[N])?" when a file of 
  62.           the same name is found in the destination directory.  
  63.           Instead existing files will be erased and overwritten 
  64.           without notice.
  65.  
  66.      I    Inspect mode.  Allows choosing the files to be 
  67.           processed interactively.  Each filename is displayed, 
  68.           one at a time, alphabetically, and can be tagged for 
  69.           processing, untagged if tagged previously, or skipped.  
  70.           Processing begins after selection is completed.  This 
  71.           mode works similarly to the SWEEP and NSWP tagging 
  72.           concept.
  73.  
  74.      O    Overwrite mode.  Same as E.
  75.  
  76.      Q    Quiet mode.  Suppresses continuous console output 
  77.           during the processing of a file.  Only the input and 
  78.           output filenames and sizes in kilobytes will be 
  79.           displayed.  Normally this mode uses only one screen 
  80.           line for each file, so it allows the display of as many 
  81.           as 24 filename pairs at one time.  This mode is also 
  82.           desirable for printing or other slow terminals because 
  83.           they will slow down file processing.
  84.  
  85.      S    Include system files.  Allows system (hidden) files to 
  86.           be found and processed.  Normally system files are 
  87.           ignored.
  88.  
  89.      T    Tag mode.  Same as I.
  90.  
  91. All command line options can be set as the default mode of 
  92. operation (see "Configuration", below).  The command line option 
  93. will then toggle to the non-default mode.  The current effect of 
  94. the command line options is always correctly reflected by the 
  95. usage screen, which can be accessed by "CRUNCH //" or "UNCR //".
  96.  
  97. DETAILS:  CRUNCH and UNCR cannot handle more than 512 matching 
  98. files.  When system files are being ignored, such files do not 
  99. count toward this file limit.  In archive (option A) mode, 
  100. however, archived files still count, even though they will not be 
  101. processed, because this mode works internally by "tagging" all 
  102. files which do have their archive attribute set.  That method can 
  103. be useful, however, because if inspect mode (options I or T) is 
  104. also selected, all filenames are presented as if inspect mode had 
  105. been selected alone, except unarchived files will already be 
  106. tagged.  It is then possible to tag any archived files that you 
  107. might want to include, or to untag any pre-tagged unarchived 
  108. files you might want to skip.
  109.  
  110. Pressing ^C will abort either program immediately.  It may be 
  111. issued anytime the programs are running.  The partial output file 
  112. will be closed and erased, so zero-length files or files in an 
  113. unknown condition will not be left on the disk.  Although 
  114. probably of limited usefulness, ^S will pause the programs and 
  115. any key (except ^C) will resume operation.  Pressing ^C after a 
  116. ^S will abort the program, but a partial file will not be erased.
  117.  
  118. While crunching or uncrunching a file (unless in quiet mode) a 
  119. full running progress report is displayed, including the number 
  120. of input and output records, the compression ratio, the number of 
  121. codes assigned, and the number of codes reassigned.  Although 
  122. some of this information has limited usefulness, it is amusing to 
  123. watch.
  124.  
  125. OUTPUT FILENAMES:  The CRUNCH destination file will have the same 
  126. name as the crunched file, except that the middle letter of the 
  127. filetype will be changed to "Z".  If the source file's filetype 
  128. already has a "Z" as the middle letter, then the last two letters 
  129. of the filetype will be changed to "ZZ"  If the source file's 
  130. filetype already ends in "ZZ", or if its filetype is blank, then 
  131. "ZZZ" will be used as the filetype of the crunched file.  Files 
  132. with filetypes of "ZZZ" cannot be crunched.  When a file is 
  133. uncrunched by UNCR, its original filename and filetype will be 
  134. restored.
  135.  
  136. DIRECT COPYING:  If CRUNCH creates a file larger than the 
  137. original, this file will be automatically erased and replaced 
  138. with a direct copy of the original.  If the original is already 
  139. crunched or squeezed, or if the filetype matches a type on the 
  140. filetype exclusion list, such as .LBR or .ARK, no attempt will be 
  141. made to compress it.  Instead, a straight copy operation will be 
  142. substituted.  Thus all specified files will be transferred in the 
  143. most efficient manner, facilitating the use of CRUNCH for the 
  144. creation of LBR's or as a backup utility.  Similarly, UNCR will 
  145. either uncrunch or direct-copy all specified files for full 
  146. restoration.
  147.  
  148. If the source and destination directories are the same, then 
  149. direct copying is inhibited.  In this case, CRUNCH will ask the 
  150. user whether he wants to keep a crunched file, if it is larger 
  151. than the original.
  152.  
  153. LZH DECODING AND UNSQUEEZING:  UNCR also uncrunches LZH-encoded 
  154. files and unsqueezes as an added convenience.  The file's format 
  155. will be recognized automatically and the appropriate method will 
  156. be used.
  157.  
  158. EXCLUSION LIST OVERRIDE:  While it is useful to have CRUNCH skip 
  159. attempts to compress certain filetypes when doing bulk transfers, 
  160. there may be instances where you want to crunch, for instance, a 
  161. LBR file.  (As distributed, excluded filetypes are ARC, ARK, LBR, 
  162. and FOR.)  To make that possible, CRUNCH will ignore the filetype 
  163. exclusion list if a filename is fully specified.  The exclusion 
  164. list will be used, however, whenever one or more wildcard 
  165. characters ("?" or "*") appear in the filename.
  166.  
  167. SPANNING DISKETTES:  If an output disk fills during a wildcard 
  168. operation, the last (partial) file will be deleted and the user 
  169. will be prompted to change disks.  Operation will then continue, 
  170. starting  with that last file.  If the source and destination 
  171. drives are the same, however, then the prompt to change diskettes 
  172. will not be given, since changing the output diskette will remove 
  173. the input disk from which the program is reading.
  174.  
  175. UNCR WILDCARD LIMITATIONS:  Normally when UNCR is given a "*.*" 
  176. wildcard specification, it transfers all files from one drive 
  177. and/or user area to another, uncrunching crunched files, 
  178. unsqueezing squeezed files, and copying the rest.  If your intent 
  179. is to only process crunched files, you must issue a file 
  180. specification with a filetype of "?Z?".
  181.  
  182. When the source and destination directories are the same, 
  183. however, a file specification of "*.*" will be automatically 
  184. converted to "*.?Z?".  A side-effect is that squeezed and LZH- 
  185. encoded files will not be uncompressed unless a specific "*.?Q?" 
  186. or "*.?Y?" file specification is given.
  187.  
  188. FILE DATE STAMPS:  When running under ZSDOS or ZDDOS, CRUNCH will 
  189. store the date and time stamp of the source file in the header of 
  190. the crunched file.  In addition, it will transfer the source 
  191. file's date stamp to the crunched file's on-disk date stamp.  
  192. Since crunching is used primarily for archival storage and the 
  193. crunched file will not be modified in place, this latter feature 
  194. allows you to check the original date stamp of the file without 
  195. uncrunching it.  The access date of the crunched file will be the 
  196. date it was crunched, until you type it with ZLT or uncrunch it.
  197.  
  198. When UNCR uncrunches a file, it looks for a date stamp in the 
  199. header and, if it finds one, it restores the file's original 
  200. create and modify dates to the uncrunched file.  This restoral 
  201. works equally well with files crunched by CR23D.  If there is no 
  202. date stamp in the header of the crunched file, UNCR will transfer 
  203. the crunched file's on-disk date stamp to the uncrunched file, so 
  204. at least you will not lose whatever date stamp you have.  As with 
  205. CRUNCH, the access date will be the date the file is uncrunched.  
  206. The original access date is stored in the header by CRUNCH, but 
  207. it will not be restored.
  208.  
  209. If the source file has no modify date, a non-standard condition, 
  210. the modify date of the output file will be filled in from the 
  211. create date.  A blank create date will be transferred as is.
  212.  
  213. TELENET AND PC-PURSUIT SUPPORT:  CRUNCH monitors its output for a 
  214. sequence that would put Telenet or PC-Pursuit into command mode 
  215. and abort a file transfer.  If this sequence is detected, CRUNCH 
  216. inserts the CRUNCH null code to prevent disaster.
  217.  
  218. CONFIGURATION:  All the modes of operation set by command line 
  219. options can be configured as default modes.  In that case the 
  220. corresponding command line option will toggle to the non-default 
  221. mode.  (The current effect of the command line options will 
  222. always be reflected by the usage screen.)  In addition, CRUNCH 
  223. contains a list of filetypes that will be ignored during wildcard 
  224. operations.  Up to 10 filetypes can be entered in the list.  
  225. There are also specific options that are only effective under 
  226. TurboDos or vanilla CP/M.
  227.  
  228. Configuration for both CRUNCH and UNCR is accomplished using the 
  229. accompanying CRUNCHnn.CFG file and ZCNFG, which is available from 
  230. most Z-Nodes and RCP/M's.  The name of the configuration file 
  231. should not be changed.  More complete instructions are included 
  232. on the configuration help screens.
  233.  
  234. +---------------------------------------------------------------+
  235. | The source code, as well as any object code created from it,  |
  236. | are copyright (c) 1987 by Steven Greenberg.  It may be repro- |
  237. | duced for non-profit use only.  Public release of modifica-   |
  238. | tions is strictly prohibited without the expressed consent of |
  239. | the author.                                                   |
  240. +---------------------------------------------------------------+
  241.  
  242. This version was released with the permission of the original 
  243. author.  Please report any bugs to:
  244.  
  245.      Gene Pizzetta
  246.      481 Revere St.
  247.      Revere, MA 02151
  248.  
  249.      Voice:  (617) 284-0891
  250.      Newton Centre Z-Node:  (617) 965-7259
  251.      Ladera Z-Node Central:  (213) 670-9465
  252.