libmspack
|
A decompressor for SZDD compressed files. More...
#include <mspack.h>
Data Fields | |
struct msszddd_header *(* | open )(struct msszdd_decompressor *self, const char *filename) |
Opens a SZDD file and reads the header. More... | |
void(* | close )(struct msszdd_decompressor *self, struct msszddd_header *szdd) |
Closes a previously opened SZDD file. More... | |
int(* | extract )(struct msszdd_decompressor *self, struct msszddd_header *szdd, const char *filename) |
Extracts the compressed data from a SZDD file. More... | |
int(* | decompress )(struct msszdd_decompressor *self, const char *input, const char *output) |
Decompresses an SZDD file to an output file in one step. More... | |
int(* | last_error )(struct msszdd_decompressor *self) |
Returns the error code set by the most recently called method. More... | |
A decompressor for SZDD compressed files.
All fields are READ ONLY.
void(* msszdd_decompressor::close) (struct msszdd_decompressor *self, struct msszddd_header *szdd) |
Closes a previously opened SZDD file.
This closes a SZDD file and frees the msszddd_header associated with it.
The SZDD header pointer is now invalid and cannot be used again.
self | a self-referential pointer to the msszdd_decompressor instance being called |
szdd | the SZDD file to close |
int(* msszdd_decompressor::decompress) (struct msszdd_decompressor *self, const char *input, const char *output) |
Decompresses an SZDD file to an output file in one step.
This opens an SZDD 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 SZDD output size or missing character.
self | a self-referential pointer to the msszdd_decompressor instance being called |
input | the filename of the input SZDD file. This is passed directly to mspack_system::open(). |
output | the filename to write the decompressed data to. This is passed directly to mspack_system::open(). |
int(* msszdd_decompressor::extract) (struct msszdd_decompressor *self, struct msszddd_header *szdd, const char *filename) |
Extracts the compressed data from a SZDD file.
This decompresses the compressed SZDD data stream and writes it to an output file.
self | a self-referential pointer to the msszdd_decompressor instance being called |
szdd | the SZDD file to extract data from |
filename | the filename to write the decompressed data to. This is passed directly to mspack_system::open(). |
int(* msszdd_decompressor::last_error) (struct msszdd_decompressor *self) |
Returns the error code set by the most recently called method.
This is useful for open() which does not return an error code directly.
self | a self-referential pointer to the msszdd_decompressor instance being called |
struct msszddd_header*(* msszdd_decompressor::open) (struct msszdd_decompressor *self, const char *filename) |
Opens a SZDD file and reads the header.
If the file opened is a valid SZDD file, all headers will be read and a msszddd_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 SZDD file.
self | a self-referential pointer to the msszdd_decompressor instance being called |
filename | the filename of the SZDD compressed file. This is passed directly to mspack_system::open(). |