home *** CD-ROM | disk | FTP | other *** search
/ World of A1200 / World_Of_A1200.iso / programs / compress / misc / xfh / xfh.doc < prev    next >
Text File  |  1995-02-27  |  16KB  |  355 lines

  1. ----------------------------------------------------------------------------
  2.  
  3.                XFH-Handler 1.34
  4.  
  5.        Copyright (C) 1991, 1992, 1993 Kristian Nielsen.
  6. ----------------------------------------------------------------------------
  7.  
  8.  
  9.     This program is free software; you can redistribute it and/or modify
  10.     it under the terms of the GNU General Public License as published by
  11.     the Free Software Foundation; either version 2 of the License, or
  12.     (at your option) any later version.
  13.  
  14.     This program is distributed in the hope that it will be useful,
  15.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17.     GNU General Public License for more details.
  18.  
  19.     You should have received a copy of the GNU General Public License
  20.     along with this program; if not, write to the Free Software
  21.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  22.  
  23.  
  24. Comments, suggestions and bug reports are welcome. I can be reached as
  25.  
  26.    Kristian Nielsen
  27.    Groenjordskollegiet
  28.    room 6111
  29.    Groenjordsvej
  30.    DK-2300 Koebenhavn S
  31.    Denmark.
  32.  
  33.    E-Mail: bombadil@diku.dk
  34.  
  35.  
  36. Legal Issues
  37. ------------
  38.  
  39. This program as a whole is distributed under the GNU General Public
  40. License. However, some of the contained material carries different
  41. legal status. In particular, this product includes software developed
  42. by the University of California, Berkeley and its contributors.
  43. Details appear in each individual file in the source directories.
  44.  
  45. The "XFH" commodity was written by
  46.  
  47.    Nicola Salmoria
  48.    Via Piemonte 11
  49.    53100 Siena   ITALY
  50.  
  51.    E-Mail: MC6489@mclink.it
  52.  
  53. This program (the commodity with icons and mountlists) is freely
  54. distributable as long as the archive remains intact, and only a
  55. nominal fee is charged for its distribution. However, it is still
  56. provided "AS IS" without warranty of any kind, either expressed or
  57. implied. By using it, you agree to accept the entire risk as to the
  58. quality and performance of the program.
  59.  
  60. Version 1.34 and "xScan" were done by:
  61.  
  62.    Matthias Scheler
  63.    Schuetzenstrasse 18
  64.    4799 Borchen
  65.    Federal Republic of Germany
  66.  
  67.    E-Mail: tron@uni-paderborn.de
  68.  
  69. Changes since the previous versions
  70. -----------------------------------
  71.  
  72. Changes since last release (V1.32):
  73.  - After using the supplied tool "xScan" XFH will read directories MUCH
  74.    faster. Read "xScan.doc" for information about that.
  75.  - XFH now supports ACTION_PARENT_FH. Now MultiView and "amigaguide.datatype"
  76.    have no more problems to use links between different AmigaGuide files.
  77.  - XFH is now distributed with full source code for SAS/C Release 6.
  78.  
  79. Important changes include since V1.12:
  80.  
  81.  - XFH is now distributed with full source code (for GCC).
  82.  - The dreaded 'ExNext() / ExAll() bug with filenotes has been fixed.
  83.  - Much improved user interface: Gui 'front panel' (by Nicola
  84.    Salmoria), improved mountlist control.
  85.  - Arexx interface for setting options after mounting the handler.
  86.  - Support for MODE_READWRITE (appending to files).
  87.  
  88. Overview
  89. --------
  90.  
  91. XFH-handler is a DOS handler which uses xpkmaster.library to provide
  92. transparent access to compressed files in a given directory or partition.
  93. All compression/decompression is done automatically by the handler when files
  94. are read or written. Compression is optional and may be switched at any time,
  95. allowing for fine control over storage of data. The compression method may be
  96. changed at will. Decompression is always automatic, you don't have to care
  97. about which compressor was used to create the files.
  98.  
  99. This version of XFH is designed to work with Xpk, the data compression
  100. standard. You will need Xpk to use XFH. Most users should receive XFH as part
  101. of the Xpk distribution.
  102.  
  103. [Notes for users of previous versions of XFH: The way the handler is mounted
  104. has changed somewhat since v1.12 in order to make it simpler to use; you
  105. cannot just replace the binary in L: and go. This doc file does not mention
  106. the old option files, but they can still be used if you want to. Refer to the
  107. file "advanced_usage.doc". Also note that XFH now supports updating of
  108. existing files, something that a lot of users have requested.]
  109.  
  110.  
  111. Installation
  112. ------------
  113.  
  114. This doc file is intended for Workbench 2.0 or later. If you are using
  115. Wb 1.x, refer to "advanced_usage.doc". That file contains also information
  116. which may be useful to the advanced user.
  117.  
  118. We have tried to make the installation of XFH as easy as possible, but it
  119. still isn't a trivial task. Please read this paragraph carefully.
  120.  
  121. First of all, you will need to have xpkmaster.library installed
  122. (xpkmaster.library is distributed as part of Xpk). Refer to xpkmaster
  123. documentation for installation. Version 2.2 (or any later version) of
  124. xpkmaster.library is suggested, since previous versions contain some bugs
  125. which may make XFH behave incorrectly.
  126.  
  127. Then, copy "XFH-Handler" to your L: directory, and drag "XFH" into the
  128. Wbstartup drawer. XFH is a commodity, so as usual you will want to change
  129. the CX_POPUP ToolType from YES to NO to avoid having the window open
  130. everytime you boot.
  131.  
  132. Now you have to decide which partition you want to install XFH upon. Of
  133. course you can choose more than one partition, but with this version of XFH
  134. you shouldn't use the boot partition unless you really know what you are
  135. doing.
  136. >> NEVER COMPRESS XFH-HANDLER, XPKMASTER.LIBRARY, MOUNT, OR ANY OTHER FILE
  137. NEEDED TO MAKE XFH WORK!!!!!! <<
  138.  
  139. You are not limited to install on full partitions; you can choose any
  140. directory, but usage on a whole partition is probably the more immediate and
  141. useful. Here, we will assume installation on a whole partition. Installation
  142. over a directory is accomplished in a similar way, or by modifying the
  143. mountlist entry as explained in "advanced_usage.doc".
  144.  
  145. If you are using Workbench 2.1 or later, drag the icon "XDH1" from the
  146. "Workbench2.1+" drawer to the "Devs/DOSDrivers" drawer in your boot
  147. partition.  As its name suggests, XDH1 will work on your DH1 partition.
  148. To choose a different partition, just rename the icon; for example, "XJH2"
  149. will refer to JH2:, and so on (in fact any letter will work, not just
  150. 'X').  You can also use assigned names; for example, let's say you have
  151. assigned DOCS: to DH2:text/docs, then a copy of the icon named "XDOCS"
  152. will create an XFH task using that directory. To create multiple XFH
  153. partitions, use the Workbench 'Copy' command to duplicate the "XDH1" icon
  154. and rename it appropriately (ie. to "XDH2"). No other changes are needed.
  155.  
  156. If you are not using Wb 2.1 yet, you will have to append the sample entry
  157. "devs/mountlist.xdh1" to your "DEVS:Mountlist" file (appending one copy for
  158. each XFH partition you wish to use). The same considerations made before
  159. apply: to change the target partition, edit the mountlist and change the
  160. XDH1: line appropriately. Then edit the file "S:User-Startup" and add lines
  161. like
  162.  
  163.     Mount XDH1:
  164.  
  165. to automatically mount the XFH partitions at boot time.
  166.  
  167. If you don't like names like XDH1, refer to "advanced_usage.doc" for a way
  168. to use a name of your choice (by modifying the mount entry).
  169.  
  170.  
  171. When mounted, XFH will display a new icon on your Workbench screen. For
  172. example, let's say that your DH1: partition is labelled "DATA"; XFH will call
  173. its partition XFH_DATA. After the first installation, you may relabel the
  174. volume as usual (XFH will use a file called '.xfhrc' in its root
  175. directory to preserve the volume name across reboots).
  176.  
  177. The first step of installation is completed. Now reset and check that
  178. everyting works correctly. Next steps assume that you have rebooted and
  179. everything was ok.
  180.  
  181.  
  182. By default, XFH doesn't compress files. To do that, invoke the XFH commodity
  183. by using the hotkey (default is control alt x) or by double-clicking its
  184. icon.  You will be shown a list of all mounted XFH partitions. Choose one,
  185. and activate the "Compression" checkbox. Now click on "Select Compressor..."
  186. button, and you will see a list of available Xpk compressors. Select your
  187. favourite compressor and efficiency and click on "OK". Currently, the best
  188. choice is probably NUKE, since it features good compression percentage and
  189. very fast decompression.
  190.  
  191. The "Low Memory" checkbox, when activated, tells XFH to reduce memory usage
  192. as much as possible, even if that means reducing speed or compression
  193. efficiency (this option is not fully implemented in the current version of
  194. XFH-Handler).
  195.  
  196.  When you have set up all the partitions, select "Save" from the
  197. "Project" menu if you want to make the changes permanent, and click in the
  198. close gadget to hide the window ("Save" will store the settings in the .info file of the commodity).
  199.  
  200. Now installation should be finished! Try to copy something to XDH1:, and try
  201. from CLI to 'list' it in DH1: and in XDH1: to see if it has actually been
  202. compressed (of course the file in DH1: should be shorter than the file which
  203. is seen thru XDH1:).
  204.  
  205. Hint: if you want to compress all the files in your new XFH partition, the
  206. faster way is to make a backup and restore of XDH1:.
  207.  
  208.  
  209. Limitations
  210. -----------
  211.  
  212. It should be stressed that a given XFH partition binds to a volume,
  213. not to a device. This has consequences if XFH is used on a removable
  214. media like a floppy disk. For example, trying to use XDF0 to access DF0
  215. will work, but it will use the disk that was in the drive at the time
  216. it was mounted and will not recognise a newly inserted disk.
  217.  
  218.    The figures reported by the shell 'Info' command are somewhat
  219. strange.  The problem is that it isn't really possible to give
  220. sensible figures for 'NumBlocks' and 'NumBlocksUsed' (except scanning
  221. the entire XFH partition which would be ridicously slow). Currently,
  222. their values are the same as those for the underlying file system.
  223.  
  224.  
  225. Suggestions
  226. -----------
  227.  
  228. Remember that, in this release of XFH-Handler, the decompressed file has to
  229. stay in memory for all the time the file is open. If you are low on memory,
  230. do not compress large files.
  231. Do not compress files which stay open for a long time.
  232. If you are using a printer spooler which creates temporary files on the hard
  233. disk (like PrintManager by Nicola Salmoria), make sure they are not
  234. automatically compressed by XFH (either turn compression off, or use DH1:
  235. instead of XDH1:).
  236.  
  237. You may not want to have both DATA and XFH_DATA displayed as volumes on the
  238. Workbench. To avoid that, edit "S:User-Startup" and add the line
  239.  
  240.     Assign DATA: DISMOUNT
  241.  
  242. Moreover, since you may have references to DATA: (for example some assigns)
  243. you may want to add this line also
  244.  
  245.     Assign DATA: XDH1:
  246.  
  247. which will reroute every later access to the XFH partition.  Note that to do
  248. this trick, the label of DH1: must *NOT* be DH1 or any other name conflicting
  249. with a device name. If it is your case, relabel the volume.  After the
  250. DISMOUNT trick, you will always access the XFH partition from Workbench, but
  251. you will still be able to use both DH1: and XDH1: from CLI.
  252.  
  253. When doing backups, use DH1:, not XDH1:. This way you will use the
  254. compressed data, thus requiring less disks. If your backup program provides
  255. compression, turn the option off, since it will only slow things down.
  256. Remember also to RESTORE to DH1:, or you will end up with a useless
  257. partition!
  258.  
  259.  
  260. Future Enhancements
  261. -------------------
  262.  
  263. The following are a few loose ideas that may sometime be realised in future
  264. versions of XFH:
  265.  
  266.  - Support for other file formats. XFH is currently dependent on Xpk for
  267. operation; however original aim was (and still is) a general compressor
  268. front-end supporting Xpk, Zoo, Lharc, Lha etc.
  269.  
  270.  - Support for custom formats through AREXX. This would make it possible to
  271. write simple AREXX scripts that are called by XFH each time a request is made
  272. to open a file that XFH does not recognise. The script can then take over if
  273. it can handle the file and call the appropriate conversion programs. Thus,
  274. one could take for example a standard gif-to-iff converter and write a simple
  275. AREXX script that would make DeluxePaint suddenly read GIF pictures
  276.  
  277.  - Setting of options individually for specific directories and/or
  278. files (using AmigaDOS pattern matching). This would make it possible
  279. to specify that files named '#?.lzh' must not be compressed, or that
  280. directory listnings of ':net/uucp/news/' should not report the correct
  281. file sizes (for speedup).
  282.  
  283.  - Making the handler multi-treaded (like the ROM file systems)
  284. (multi-treadedness means that a large Read()-request won't block a simple CD
  285. command).
  286.  
  287.  - Implementing asyncronous I/O for compression and decompression
  288. (overlapping CPU time with IO time for large speedups).
  289.  
  290.  
  291. Acknowledgments
  292. ---------------
  293.  
  294. XFH owes a lot to all the people that have helped me during development with
  295. discussions, criticism, suggestions, bug reports etc. (not to mention the
  296. steady demands for new versions when I was a bit slow bringing them out...).
  297. I am especially indebted to Nicola Salmoria who wrote the nice gui front-end
  298. to XFH, wrote most of this doc file and spent a lot of time discussing the
  299. user interface of XFH with me. Many of the improvements in user-friendliness
  300. since XFH 1.0 should be attributed to Nicola; any remaining inconveniences or
  301. bugs are entirely due to me. My thanks should also go to Urban D. Müller for
  302. helping me start the whole concept of the XFH back in the summer of 1991 -
  303. without his help the XFH is not likely to have been realised.
  304.  
  305. XFH has been developed concurrently with my studies at the University of
  306. Copenhagen, Department of Computer Science. The institute kindly provides
  307. students with access to electronic mail and news; this also has been
  308. essential in the creation of XFH.
  309.  
  310. Program history
  311. ---------------
  312.  
  313. (In the list, an asterix ('*') denotes BETA version that have not been
  314. released and should not be used).
  315.  
  316. V1.00   Initial release.
  317. V1.00a  Bug in XObjExamine() fixed (it sometimes got the name of the root
  318.         dir wrong). Thanks to Matthias Scheler for reporting this bug.
  319. V1.00b  XFH: now obtains the values returned by ACTION_INFO and
  320.         ACTION_DISK_INFO from the underlying file system. This should
  321.         help problems with 'zero size file system' as experienced with
  322.         earlier versions of MFR for example. Thanks to Keith H. Brown
  323.         for pointing my attention to this problem.
  324. V1.10*  Beta version implementing option files and automatic compression.
  325. V1.11*  Beta with Xpk password support.
  326. V1.12   New XPKPRIORITY option. Also fixes bugs with bad volume names and a 
  327.         msgport that was unnessesarely public; thanks to Nicola Salmoria 
  328.         for telling me about these problem. 
  329. V1.20*  First beta with gui and Arexx support.
  330. V1.21*  - Bug fix: Write() to a compressed file opened for reading now
  331.         fails with a return value of -1L (it used to return 0). Thanks to
  332.         Stefan Boberg for pointing me to this problem.
  333.         - Bug fix: Very nasty bug with file notes that caused XFH to crash
  334.         the system (happened because dos.library does not preserve the
  335.         fib->fib_Comment field between calls to ExNext()). Thanks to
  336.         Anders Holmér for taking the bother sending me "snail mail" to
  337.         let me know of this problem.
  338. V1.22*    Enhanced gui support. XFH now mounts as a handler (instead of as a
  339.     disk-device based file system). Setting of options in mountlist.
  340. V1.23*    Minor bugfixes; some options to help compatibility with various
  341.     programs.
  342. V1.30*    First version with support for MODE_READWRITE. XFH will now retain
  343.     protection flags, filenotes and file dates when compressing files.
  344.     ALLOWAPPEND and COMPRESSREADWRITE option. Write() to MODE_OLDFILE
  345.     files.
  346. V1.31*    ACTION_RENAME_DISK; PORTNAME option; minor bug fixes.
  347. V1.32     Full source provided now under GNU GPL. Source now uses RCS.
  348.     Changed default for option ALLOWAPPEND to ON. Also changed
  349.     option KILLSTARTUP to ON per default (the enforcer hits in
  350.     Format etc. were too bad).
  351. V1.33*    ACTION_PARENT_FH required for "MultiView" and "amigaguide.datatype"
  352.     done by Matthias Scheler
  353. V1.34    support for xScan, source now for SAS/C Release 6
  354.     done by Matthias Scheler
  355.