home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / compress / lhwarp_1.lzh / Lhwarp.doc < prev   
Text File  |  1990-02-13  |  12KB  |  316 lines

  1.  
  2.                                     LHWARP 1.40
  3.                                  12th April, 1990
  4.  
  5.                            A disk tracker for the Amiga
  6.  
  7.                             Written by Jonathan Forbes
  8.  
  9.    What is Lhwarp?
  10.  
  11.    (Pronounced L-H-WARP)
  12.  
  13.    Lhwarp is a program which will read tracks directly from your floppy disk,
  14. (or any other device), compress them, and output them to a file.  The
  15. advantages of using Lhwarp are:
  16.  
  17.    o The entire disk structure, including the boot block, is preserved.
  18.  
  19.    o Lhwarp will always produce a smaller output file than ARC, ZOO or WARP.
  20.       (note: this is true only when the default compression algorithm is used.)
  21.  
  22.    o Lhwarp will only archive sectors which contain data, by using the disk's
  23.         bitmap (however, Lhwarp will gladly compress every single sector on
  24.         the disk, if you wish.)
  25.  
  26.    o Using Lhwarp is much less hassle than archiving each and every file
  27.         individually.
  28.  
  29.    o The bootblock of any disk being either read or written is displayed, so
  30.         that bootblock viruses can easily be found.
  31.  
  32.    o Other filing system devices (such as ram disks) may be used with Lhwarp,
  33.         so you are not limited to floppy drives.
  34.  
  35.    Lhwarp will produce files which are much smaller than those produced by
  36. Warp, since Lhwarp uses a much more efficient compression algorithm (Adaptive
  37. Huffman Encoding); the same algorithm used in LHARC.  Typically, an Lhwarp
  38. file will be 80% of the size of an equivalent Warp file, resulting in quite
  39. reasonable hard drive space savings.
  40.  
  41.    In addition, Lhwarp will only archive sectors which contain data; deleted
  42. information is not archived (unless you explicity request this to be done.)
  43. When compressing or decompressing data, sectors which contain data are marked
  44. with a '.' character, while sectors which do not contain data are marked with
  45. a '_' character.  If the -m option is specified, all sectors will be marked
  46. with '.' automatically.
  47.  
  48.  
  49.    Algorithms
  50.  
  51.    For those who simply must have a faster compression rate, Lhwarp provides
  52. two additional compression algorithms; squeezing and vaporising (the latter is
  53. the 14 bit version of UNIX Compress.)  Both are faster than the LHARC Adaptive
  54. Huffman Encoding algorithm (called "freezing.")  However, neither of them comes
  55. close to the compression ratio of freezing.
  56.  
  57.    Even so, the speed increase and reasonable compression rates should appeal
  58. to those who are less concerned with compression efficiency, and more concerned
  59. with speed.  It should be mentioned, however, that the freezing algorithm can
  60. hold its own in terms of speed, and is the recommended algorithm for
  61. compressing disks.
  62.  
  63.    Freezing remains the default compression mode.  Using the -c switch will
  64. cause the disk to be vaporised (not literally), while the -s switch will cause
  65. the disk to be squeezed.  The -b option will cause each individual track to be
  66. either vaporised or squeezed, depending on which produces the smallest output.
  67.  
  68.    The -q option will cause Lhwarp to use its fastest and most reasonable
  69. algorithm on the disk.  Currently, this is vaporising.  If no space is gained
  70. from vaporising a track, then the track is squeezed, and if no space is gained
  71. from squeezing a track, the track is stored (no compression.)
  72.  
  73.    You cannot currently combine freezing with any other algorithm; this is for
  74. your own benefit; I have yet to see freezing beaten by vaporising or squeezing
  75. for any one track, ever!  However, if you find that vaporising and squeezing
  76. frequently do compress tracks more efficiently, please inform me.
  77.  
  78.    To compress the NewTek DYNAMIC HI-RES demo disk:
  79.  
  80.    * - Couldn't be bothered to time this
  81.  
  82.    Lhwarp     |  --- Version 1.40 ---  |  --- Version 1.31 ---
  83.    Algorithm  |  Size   Comp   Decomp  |  Size    Comp   Decomp
  84.    ---------  | ------  -----  ------- | -------  -----  ------
  85.    Freezing   | 671940  14:50    5:24  | 671630   19:00   12:40
  86.    Vaporising | 814052   5:59    1:47  | 869515    6:30     *
  87.    Squeezing  |   *       *       *    | 803714    7:30     *
  88.    Both       | 770726   9:38    5:28  | 770722   10:30     *
  89.  
  90.  
  91.    Other programs
  92.    --------------
  93.    Warp 1.11  | 796665  16:53    1:16 (Unwarp 1.0)
  94.  
  95.  
  96.    Viewing
  97.  
  98.    Lhwarp also supports viewing; you may see how Lhwarp has compressed a disk
  99. (which tracks are contained in the file, which algorithm was used to compress
  100. them, the source and destination lengths of each track, the number of sectors
  101. compressed, and the sector map of each track.)  The viewing option will also
  102. display any attached text.
  103.  
  104.    After any attached text is displayed, you must press return; this was
  105. implemented so that the displaying of the boot block wouldn't scroll the text
  106. off the screen.
  107.  
  108.  
  109.    More Information
  110.  
  111.    Lhwarp output files have the suffix ".LHW".  If the filename you give
  112. Lhwarp does not end in ".LHW", Lhwarp will append ".LHW" to it.  Please leave
  113. the suffix alone, and don't change it to ".WRP".
  114.  
  115.    The Adaptive Huffman Encoding algorithm was originally coded by Haruyasu
  116. Yoshizaki, and is the same algorithm used in LHARC 1.13c.  When the more
  117. efficient LHARC 2.0 arrives from Japan, that algorithm will instead be used.
  118.  
  119.  
  120.    Parameters
  121.  
  122.    To view Lhwarp's parameters, type "Lhwarp"; they are included within the
  123. program.  You will be presented with:
  124.  
  125.  
  126.  
  127.    LHWARP 1.40 - Amiga disk tracker - Written by Jonathan Forbes @ 1:250/642
  128.    Copyright © Xenomiga Technology, 1990.
  129.  
  130.    Usage: LHWARP [-options] Command Unit Filename Start End [Textfile]
  131.  
  132.    Command Options: -m:    Ignore disk bitmap
  133.                     -q:    Quick compression
  134.                     -s:    Squeeze algorithm
  135.                     -c:    Compress/14 (Vaporise) algorithm
  136.                     -b:    Both Squeeze and Compress
  137.                     -v:    View format of output file
  138.                     -n:    No prompting for return
  139.                     -dxxx: Use device name 'xxx'
  140.  
  141.    Command:         Read (disk->file) or Write (file->disk)
  142.    Unit:            Drive number (0 for internal, 1 ... 3 for external)
  143.    Filename:        Output or input filename
  144.    StartTrack:      Track number (0 ... 79) [valid only in read mode]
  145.    EndTrack:        Track number (0 ... 79) [valid only in read mode]
  146.    TextFile:        Attach text in 'TextFile' to output file
  147.  
  148.  
  149.    Examples are:
  150.  
  151.    a) Lhwarp READ 0 MyDisk 0 79
  152.  
  153.       This will read tracks 0 to 79 of the disk in drive 0 (i.e. the entire
  154. disk), and will output the result to "MyDisk.lhw"  Only sectors which contain
  155. data will be archived.
  156.  
  157.  
  158.    b) Lhwarp READ 0 MyDisk 0 79 MyText
  159.  
  160.       This will read tracks 0 to 79 of the disk in drive 0 (i.e. the entire
  161. disk), and will output the result to "MyDisk.lhw".  Only sectors which contain
  162. data will be archived.  The text from the file "MyText" will be imported to
  163. the output file.  Any text stored in the output file will be displayed when
  164. the disk is unarchived.
  165.  
  166.  
  167.    c) Lhwarp -m READ 0 MyDisk 0 79
  168.  
  169.       This will read tracks 0 to 79 of the disk in drive 0 (i.e. the entire
  170. disk), and will output the result to "MyDisk.lhw".  All sectors will be
  171. archived, regardless of whether or not they contain data; the disk's bitmap
  172. is ignored with the '-m' option.
  173.  
  174.  
  175.    d) Lhwarp WRITE 1 MyDisk
  176.  
  177.       This will output all tracks stored in MyDisk.lhw to drive 1.  If any
  178. text was in the output file, it will be displayed.
  179.  
  180.  
  181.    e) Lhwarp -c READ 0 MyDisk 0 79
  182.  
  183.       Same as a), except that the disk will be "vaporised."
  184.  
  185.  
  186.    f) Lhwarp -s READ 0 MyDisk 0 79
  187.  
  188.       Same as a), except that the disk will be "squeezed."
  189.  
  190.  
  191.    g) Lhwarp -b READ 0 MyDisk 0 79
  192.  
  193.       Same as a), except that tracks will be either squeezed or vaporisied,
  194.       depending on which is more efficient.
  195.  
  196.  
  197.    h) Lhwarp -m -c READ 0 MyDisk 0 79
  198.  
  199.       Same as e), except that the bitmap will be ignored.
  200.  
  201.  
  202.    i) Lhwarp -v mydisk
  203.  
  204.       View composition of the file "MyDisk.lhw."
  205.  
  206.  
  207.    j) Lhwarp -dramdrive.device READ 0 MyDisk 0 79
  208.  
  209.       Same as a), but read from the ramdrive.device instead of the floppy
  210.       drive (trackdisk.device.)
  211.  
  212.  
  213.    k) Lhwarp -n READ 0 MyDisk 0 79
  214.  
  215.       Same as a), but don't prompt for return.
  216.  
  217.  
  218.    Please note that you must combine options in the format of:
  219.        'Lhwarp -a -b -c ...'
  220.    Not:
  221.        'Lhwarp -abc ...'
  222.  
  223.    The latter may have unpredictable results (most probably all options but
  224. '-a' will be ignored.)
  225.  
  226.  
  227.    Using other devices
  228.  
  229.    If you decide to use the -d option of Lhwarp (i.e. use a non-floppy device
  230. such as ramdrive.device), then the device which you use must be a replica of a
  231. floppy disk in terms of data layout; it must have a lower track boundary of 0,
  232. and an upper track boundary of 79.  It must also have 2 heads (surfaces) and 11
  233. blocks per track, (512 bytes per sector are assumed); i.e. it should contain
  234. the following mountlist entry lines:
  235.  
  236.    Surfaces = 2
  237.    BlocksPerTrack = 11
  238.    LowCyl = 0; HighCyl = 79
  239.  
  240.    It is very important that the device has exactly the same configuration as a
  241. floppy drive; you will, most likely, receive a system message (the "GURU" no
  242. longer exists in 1.4) if this is not the case.  Do not assume that because you
  243. have a 120 track ramdrive.device, an 80 track disk will decompress properly
  244. into it; it won't!  You cannot mix disk sizes.
  245.  
  246.    You CANNOT use Lhwarp to read and write tracks from/to non-80 track devices,
  247. even if you read and write from/to the same device; Lhwarp assumes many things,
  248. just one of them being that the root block of the device will be at track 40!
  249. This may be fixed in a later version, but for now, don't experiment!
  250.  
  251.    Obviously you will be unable to "remove and re-insert" the disk as asked
  252. after write activity, if the disk is a ram drive.  The DISKCHANGE command
  253. should instead be used.
  254.  
  255.  
  256.    Virus detection
  257.  
  258.    Some people have complained about Warp because it aids the spreading of
  259. boot block viruses.  It is for this reason that Lhwarp will display the
  260. bootblock of any disk it reads or writes, so that one can see what is being
  261. Lhwarp'd.  Any non-standard looking bootblock should be viewed with suspicion.
  262.  
  263.    If you see a non-standard bootblock in read mode, this means that the disk
  264. you are reading from might possibly contain a virus.  If you see this in write
  265. mode, it means that the file you are writing out to your disk may contain a
  266. virus.  In either case, you should load a virus checker to make sure (such as
  267. VirusX 4.0)
  268.  
  269.  
  270.    Specifications
  271.  
  272.    Lhwarp uses ETD_READ and ETD_FORMAT to read/write directly from/to the
  273. trackdisk.device.  The 16 bytes of label information for each sector are
  274. preserved in the output file.  A 32-bit CRC protects data integrity.
  275.  
  276.  
  277.    Acknowledgements
  278.  
  279.    Huffman routines   - Haruyasu Yoshizaki (lzhuf.c, v1.13c)
  280.    Compress           - S.Thomas, J.McKie, S.Davies, K.Turkowski, J.Woods,
  281.                            and J.Orost (compress.c)
  282.    Squeezing          - William Swan (sq.c/usq.c)
  283.    Bitmap information - Leo Schwab (diskmap2.c)
  284.  
  285.  
  286.    This Program
  287.  
  288.    Lhwarp is a freely distributable, copyrighted piece of software.  You do
  289. not have to pay money to use it, and may upload it wherever you choose, but
  290. you are not allowed to sell Lhwarp for profit, or include Lhwarp on a disk
  291. which is sold for profit, without the author's (Jonathan Forbes) permission.
  292.  
  293.    I can be contacted on Canada Remote Systems as "Jonathan Forbes" (isn't
  294. that better than some 20 digit ID code?)
  295.  
  296.    My BBS (416-921-6638) is currently down, pending completion of Xenolink,
  297. a full featured FidoNet-compatible BBS program for the Amiga, which I have
  298. almost finished.
  299.  
  300.  
  301.    Disclaimer
  302.  
  303.    I am in no way responsible for anything this program does; you are using
  304. it entirely at your own risk, so if all of the cats in your neighbourhood
  305. cause a nuclear feline revolution, wiping out most of the human population in
  306. your part of the world, don't blame me!
  307.  
  308.  
  309.    Stack Size
  310.  
  311.    Lhwarp appears to function correctly with a stack size of 10,000 bytes (and
  312. maybe even less), but if you have any problems, you should increase it.
  313.  
  314.  
  315.    --- EOF
  316.