home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 2 / DATAFILE_PDCD2.iso / utilities / _squish / !Squish / Tech < prev    next >
Encoding:
Text File  |  1993-01-04  |  2.2 KB  |  92 lines

  1. Using Squish in your own programs
  2. ---------------------------------
  3.  
  4. The Module
  5.  
  6. This program is intended to compress and decompress files in programs which
  7. will require compression, the code has been written as a module so that all 
  8. the machine code can be used simply and efficiently in other programs.  The 
  9. module can be taken straight out of the Application (Use Shift and double-
  10. click on the Squish icon, and copy the file called "SquishMod") and then used
  11. in any other program.  The code is accessed by the use of Software Interupt 
  12. calls ("SWI", or in  BASIC "SYS") these are designed to be simple and easy to
  13. use.  The module can be used on the conditions:
  14.         *       It is not altered in any way without my written permission.
  15.         *       The program acknowledges the authors of the module 
  16.                 (Dave Lodge & Ian Jeffray)
  17.         *       We recieve a copy of the program.
  18.  
  19.  
  20. SWI Calls
  21. ---------
  22.  
  23. There are several SWI calls in the module, these are mentioned below:
  24.  
  25. Squish_Compact
  26.  
  27. This compacts the required data.
  28.  
  29. On Entry        R0 = Method (see Below)
  30.                 R1 = Address to compact to
  31.                 R2 = Address to compact from
  32.                 R3 = Size of Input File + R1
  33.  
  34. On Exit         R0 = Size of Output File + R2
  35.  
  36. Example         SYS "Squish_Compact",1,to,from,isize TO osize
  37.  
  38.  
  39.  
  40. Squish_Decompact
  41.  
  42. This decompacts the required data.
  43.  
  44. On Entry        As Above
  45.  
  46. On Exit         As Above
  47.  
  48.  
  49.  
  50. Squish_Version
  51.  
  52. This returns the address of the version string in R0
  53.  
  54. On Entry        -
  55.  
  56. On Exit         R0 = Address of Version String
  57.  
  58. Example         SYS "Squish_Version" TO A
  59.                 PRINT $A
  60.  
  61.  
  62.  
  63. Squish_FillIcon
  64.  
  65. This fills an icon in a window with the given string
  66.  
  67. On Entry        R0 = Window handle
  68.                 R1 = Icon to be filled
  69.                 R2 = Address of string to be placed in icon
  70.  
  71. On Exit         -
  72.  
  73. Example         SYS "Squish_FillIcon",Info,6,Version$
  74.  
  75.  
  76. Methods
  77. -------
  78.  
  79. The Methods are:
  80.         Number                          Method
  81.  
  82.         Byte and Counter                1
  83.         Counter and Byte                2
  84.         Byte and Counter Mod.           3
  85.         Counter and  Byte Mod.          4
  86.         LZW (nsy)                       5
  87.         Huffman Encoding (nsy)          6
  88.  
  89. * nsy : Not Supported Yet
  90.  
  91.  
  92.