#include <mspack.h>
Data Fields | |
mskwajd_header *(* | open )(struct mskwaj_decompressor *self, char *filename) |
Opens a KWAJ file and reads the header. | |
void(* | close )(struct mskwaj_decompressor *self, struct mskwajd_header *kwaj) |
Closes a previously opened KWAJ file. | |
int(* | extract )(struct mskwaj_decompressor *self, struct mskwajd_header *kwaj, char *filename) |
Extracts the compressed data from a KWAJ file. | |
int(* | decompress )(struct mskwaj_decompressor *self, char *input, char *output) |
Decompresses an KWAJ file to an output file in one step. | |
int(* | last_error )(struct mskwaj_decompressor *self) |
Returns the error code set by the most recently called method. |
All fields are READ ONLY.
|
Closes a previously opened KWAJ file. This closes a KWAJ file and frees the mskwajd_header associated with it. The KWAJ header pointer is now invalid and cannot be used again.
|
|
Decompresses an KWAJ file to an output file in one step. This opens an KWAJ file as input, reads the header, then decompresses the compressed data immediately to an output file, finally closing both the input and output file. It is more convenient to use than open() then extract() then close(), if you do not need to know the KWAJ output size or output filename.
|
|
Extracts the compressed data from a KWAJ file. This decompresses the compressed KWAJ data stream and writes it to an output file.
|
|
Returns the error code set by the most recently called method. This is useful for open() which does not return an error code directly.
|
|
Opens a KWAJ file and reads the header. If the file opened is a valid KWAJ file, all headers will be read and a mskwajd_header structure will be returned. In the case of an error occuring, NULL is returned and the error code is available from last_error(). The filename pointer should be considered "in use" until close() is called on the KWAJ file.
|