home *** CD-ROM | disk | FTP | other *** search
- This line should be printed by the basic program.
- /***************************************************************************
-
- (C) 1994 George Taylor
- ----------------------
-
-
- Title: Squash
-
- Purpose: Load 'squash' format files -
- i.e. files produced with !Squash
- You can read in a file and if it's a squash file
- it will be decompressed.
-
- Author: George Taylor
-
- Notes: malloc() and free() are used as a storage allocator.
-
- These procedures will only work in a Shared C Library
- like environment (eg call from C/Pascal).
-
- ***************************************************************************/
-
- #pragma include_only_once
-
-
- /* Procedure: squash_GetSize
- *
- * Description: Find out the uncompressed size in memory of a
- * squash file and the file type of the original file.
- *
- * Parameters: const char *filename - name of squash format file
- * unsigned int *type
- * - if this pointer is not NULL the file type of the
- * original file is placed at *type
- * The result at *type is undefined if -1 is returned.
- *
- * Returns: unsigned int - number of bytes of uncompressed data
- * Returns -1 if the file could not be opened or if the
- * file is not a squash file.
- *
- * Other Info: The uncomressed size and type is found out by reading the
- * header of the squash file.
- *
- * If the file exists but does not have the squash file type
- * then the size and type of the file is returned. This is
- * useful as !Squash does not squash files which get longer
- * when squashed.
- */
- unsigned int squash_GetSize(const char *filename, unsigned int *type);
-
-
-
- /* Procedure: squash_Load
- *
- * Description: Load and uncompress a squash file.
- *
- * Parameters: const char *filename - name of squash format file
- * void *buf - buffer for uncompressed file contents
- * (assumed to be large enough)
- * (must be word aligned)
- *
- * Returns: int - non-zero if file loaded and uncompressed ok
- * zero if file could not be opened or if decompression
- * failed
- *
- * Other Info: malloc() is used to allocate a temporary buffer for the
- * whole (in one peice) of the input file.
- *
- * The whole file is decompressed in one call to SWI
- * Squash_Decompress as this is very fast.
- *
- * If the file exists but does not have the squash file type
- * then the file is simply read into the buffer. This is
- * useful as !Squash does not squash files which get longer
- * when squashed. (You can still the use buffer size as given
- * by squash_GetSize()).
- */
- int squash_Load(const char *filename, void *buf);
-
-