home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / a / appsquash / !AppSquash / !Help next >
Text File  |  1997-03-02  |  3KB  |  88 lines

  1. AppSquash 1.23
  2. ¯¯¯¯¯¯¯¯¯
  3. Written by Darren Salt
  4. LZW code based on Michael Rozdoba's Squash-compatible code
  5. Squeeze and UnSqueeze © Acorn Computers Ltd
  6.  
  7. LZW decompression now StrongARM compliant - hopefully...
  8.  
  9.  
  10. AppSquash will squash application image files, modules, and BASIC¹ programs,
  11. producing files that, when run, will unsquash themselves and then run as if
  12. they hadn't been squashed. It can also handle modules squeezed using modsqz
  13. (though for particularly large modules, it may fail).
  14.  
  15.  
  16. All you need to do is to drag the file(s) you want to compress to the
  17. AppSquash icon, and for each file in turn, a save box will appear. You are
  18. *not* allowed to overwrite the original file!
  19.  
  20. The available options are:
  21.  
  22.      Squash    Squeeze
  23. Absolute   €       €
  24. Module           €
  25. BASIC       €
  26.  
  27. The 'Better' option forces the application (if Squeeze is selected) or module
  28. to be squeezed anyway, even if the resulting file would be larger.
  29.  
  30. Once you have decided where to save the file (in the normal way - it's just
  31. a standard save box), AppSquash will compress the file, and, if successful,
  32. will save it for you. If it fails for any reason, you will be told why and no
  33. file will be created. Note that if the file is not compressible, an exact
  34. copy will be made.
  35.  
  36.  
  37. AppSquash will also unsquash files. Just follow the same procedure; the file
  38. will be saved according to its original filetype.
  39.  
  40. The datestamp is always preserved when using the LZW method; Squeeze, for
  41. some reason, doesn't preserve it - AppSquash will ensure that the original
  42. datestamp is written to the squeezed (or unsqueezed) file.
  43.  
  44.  
  45. Squeeze must be in either !AppSquash or somewhere on Run$Path; your library
  46. directory is a good place to put it. UnSqueeze must be installed in
  47. AppSquash.
  48.  
  49.  
  50. Notes
  51.  
  52. 1. BASIC programs
  53.   There is a slight problem with command line parameters. Though the
  54.   programs will run without problem (as long as the unsquashed version did),
  55.   command line parameters cannot be passed to them because Acorn left a nice
  56.   little bomb in BASIC's in-core program loader code - it quite unhelpfully
  57.   dictates that, immediately following the addresses, the command string is
  58.   terminated. This leaves nowhere for the parameters!
  59.   Fortunately there is a way round this, as long as your program is packaged
  60.   in an application directory. (In the following description, I am assuming
  61.   that your BASIC program is called "!RunImage", and that the file which runs
  62.   it is "!Run". If your filenames are different, substitute yours as
  63.   appropriate.)
  64.     In "!Run":
  65.   Just before the line which runs "!RunImage", insert
  66.     Set Obey$Args ""
  67.   and move the parameters part of the line running "!RunImage" (complete
  68.   with leading spaces) into the quotation marks in the line above. For
  69.   example:
  70.     Run <Obey$Dir>.!RunImage -with %*0
  71.   becomes
  72.     Set Obey$Args "-with %*0"
  73.     Run <Obey$Dir>.!RunImage
  74.     In "!RunImage":
  75.   Search for the line looking something like
  76.     SYS "OS_GetEnv" TO env$
  77.   (OS_GetEnv is SWI number &10) and replace the command with
  78.     SYS "OS_ReadVarVal","Obey$Args",buf%,255 TO ,,len%
  79.     buf%?len%=13:env$=$buf%
  80.     SYS "OS_SetVarVal","Obey$Args",,-1
  81.   substituting your own variable names where necessary.
  82.   Also, occasionally, a program may not run in its squashed form. In this
  83.   case, unsquash it and make sure the first few lines are highly compressible
  84.   (eg. several spaces).
  85.  
  86.  
  87. Contact: arcsalt@spuddy.mew.co.uk
  88.