!Squash ======= Squash is copyright © Acorn Computers, 1991. !Squash is an application which compresses files using the RISC OS Squash module. The Squash module currently compresses using a 12-bit LZW algorithm but no guarantee is made that this will be so in the future. To use !Squash simply double click on the !Squash icon in the relevant directory display. This will install !Squash on the icon bar where the !Squash icon should then appear. Compressing a file ================== To compress a file simply drag it to the !Squash icon on the icon bar. A save box will then be displayed which will contain the file name, a file icon and an OK button. The compressed file may be saved back to itself (ie. it will replace the original) by pressing return or clicking on OK without changing the file name. If the file name is changed or the file icon is dragged to a directory viewer then the original file will be left untouched. Decompressing a file ==================== To decompress a file either double click on the compressed file or drag it to the !Squash icon on the icon bar. Double clicking on a compressed file will overwrite the compressed file with the decompressed file. Dragging to the icon bar allows the decompressed file to be saved elsewhere. Compressing and decompressing files and directories =================================================== To compress or decompress a directory just drag the directory to the !Squash icon on the icon bar. A save box will then be displayed which will contain the file name, a file icon, an OK button and two toggle buttons. The toggle buttons are used to specify whether the contents of the directory are to be compressed or decompressed, otherwise the procedure is the same as for compressing files. Menu options ============ !Squash has one menu displayed by pressing Menu on the !Squash icon on the icon bar. This menu contains four options: Info: Displays some information about the version of !Squash which is running. Save Box: Toggles the use of the save box. The save box is switched on initially which results in the manner of operation described above. Sometimes, if a large selection is made and dragged to the squash icon for example, it may not be desirable to have a save box for every file or directory selected. This menu option can be used to turn off the save box which means that all files and directories will be replaced by their compressed versions. Squash Apps: This is used to toggle the compressing of application directories. This is initially off ie. application directories which are found as a sub_directory of another directory are not compressed. Application directories which are explicitly dragged to the !Squash icon will always be compressed. Quit: Terminates the !Squash application. Squash utility program ====================== The !Squash directory also contains a utility called "Squash". This utility can be copied to the Library directory and used on the command line to compress files. The syntax is: Squash [] With a single file name the compressed or decompressed version of the file replaces the original. With a second file name the result is written to the specified file. Note that directories cannot be compressed using this utility. With both !Squash and the command line utility, if an attempt is made to compress or decompress a zero length file or the result of a compression is larger than the original (this can happen for very small files) then the original file will simply be copied. If the original file was to be replaced by the output then the original file is left untouched. NB. Squash prepends a header to the compressed data. This header is of the form: 4-byte ID: "SQSH" 1-word: length of the original, uncompressed file 1-word: load address of the original file 1-word: execution address of the original file 1-word: reserved (currently always 0) Where the load and execution addresses are used to hold the file type and the date stamp of the original file. These are restored when the file is decompressed.