libmspack
Data Structures | Defines | Functions

mspack.h File Reference

#include <sys/types.h>
#include <stdlib.h>
#include <unistd.h>

Go to the source code of this file.

Data Structures

struct  mspack_system
 A structure which abstracts file I/O and memory management. More...
struct  mspack_file
 A structure which represents an open file handle. More...
struct  mscabd_cabinet
 A structure which represents a single cabinet file. More...
struct  mscabd_folder
 A structure which represents a single folder in a cabinet or cabinet set. More...
struct  mscabd_file
 A structure which represents a single file in a cabinet or cabinet set. More...
struct  mscab_compressor
 TODO. More...
struct  mscab_decompressor
 A decompressor for .CAB (Microsoft Cabinet) files. More...
struct  mschmc_file
 A structure which represents a file to be placed in a CHM helpfile. More...
struct  mschmd_section
 A structure which represents a section of a CHM helpfile. More...
struct  mschmd_sec_uncompressed
 A structure which represents the uncompressed section of a CHM helpfile. More...
struct  mschmd_sec_mscompressed
 A structure which represents the LZX compressed section of a CHM helpfile. More...
struct  mschmd_header
 A structure which represents a CHM helpfile. More...
struct  mschmd_file
 A structure which represents a file stored in a CHM helpfile. More...
struct  mschm_compressor
 A compressor for .CHM (Microsoft HTMLHelp) files. More...
struct  mschm_decompressor
 A decompressor for .CHM (Microsoft HTMLHelp) files. More...
struct  mslit_compressor
 TODO. More...
struct  mslit_decompressor
 TODO. More...
struct  mshlp_compressor
 TODO. More...
struct  mshlp_decompressor
 TODO. More...
struct  msszddd_header
 A structure which represents an SZDD compressed file. More...
struct  msszdd_compressor
 A compressor for the SZDD file format. More...
struct  msszdd_decompressor
 A decompressor for SZDD compressed files. More...
struct  mskwajd_header
 A structure which represents an KWAJ compressed file. More...
struct  mskwaj_compressor
 A compressor for the KWAJ file format. More...
struct  mskwaj_decompressor
 A decompressor for KWAJ compressed files. More...

Defines

#define MSPACK_SYS_SELFTEST(result)
 System self-test function, to ensure both library and calling program can use one another.
#define MSPACK_VER_LIBRARY   (0)
 Pass to mspack_version() to get the overall library version.
#define MSPACK_VER_SYSTEM   (1)
 Pass to mspack_version() to get the mspack_system version.
#define MSPACK_VER_MSCABD   (2)
 Pass to mspack_version() to get the mscab_decompressor version.
#define MSPACK_VER_MSCABC   (3)
 Pass to mspack_version() to get the mscab_compressor version.
#define MSPACK_VER_MSCHMD   (4)
 Pass to mspack_version() to get the mschm_decompressor version.
#define MSPACK_VER_MSCHMC   (5)
 Pass to mspack_version() to get the mschm_compressor version.
#define MSPACK_VER_MSLITD   (6)
 Pass to mspack_version() to get the mslit_decompressor version.
#define MSPACK_VER_MSLITC   (7)
 Pass to mspack_version() to get the mslit_compressor version.
#define MSPACK_VER_MSHLPD   (8)
 Pass to mspack_version() to get the mshlp_decompressor version.
#define MSPACK_VER_MSHLPC   (9)
 Pass to mspack_version() to get the mshlp_compressor version.
#define MSPACK_VER_MSSZDDD   (10)
 Pass to mspack_version() to get the msszdd_decompressor version.
#define MSPACK_VER_MSSZDDC   (11)
 Pass to mspack_version() to get the msszdd_compressor version.
#define MSPACK_VER_MSKWAJD   (12)
 Pass to mspack_version() to get the mskwaj_decompressor version.
#define MSPACK_VER_MSKWAJC   (13)
 Pass to mspack_version() to get the mskwaj_compressor version.
#define MSPACK_SYS_OPEN_READ   (0)
 mspack_system::open() mode: open existing file for reading.
#define MSPACK_SYS_OPEN_WRITE   (1)
 mspack_system::open() mode: open new file for writing
#define MSPACK_SYS_OPEN_UPDATE   (2)
 mspack_system::open() mode: open existing file for writing
#define MSPACK_SYS_OPEN_APPEND   (3)
 mspack_system::open() mode: open existing file for writing
#define MSPACK_SYS_SEEK_START   (0)
 mspack_system::seek() mode: seek relative to start of file
#define MSPACK_SYS_SEEK_CUR   (1)
 mspack_system::seek() mode: seek relative to current offset
#define MSPACK_SYS_SEEK_END   (2)
 mspack_system::seek() mode: seek relative to end of file
#define MSPACK_ERR_OK   (0)
 Error code: no error.
#define MSPACK_ERR_ARGS   (1)
 Error code: bad arguments to method.
#define MSPACK_ERR_OPEN   (2)
 Error code: error opening file.
#define MSPACK_ERR_READ   (3)
 Error code: error reading file.
#define MSPACK_ERR_WRITE   (4)
 Error code: error writing file.
#define MSPACK_ERR_SEEK   (5)
 Error code: seek error.
#define MSPACK_ERR_NOMEMORY   (6)
 Error code: out of memory.
#define MSPACK_ERR_SIGNATURE   (7)
 Error code: bad "magic id" in file.
#define MSPACK_ERR_DATAFORMAT   (8)
 Error code: bad or corrupt file format.
#define MSPACK_ERR_CHECKSUM   (9)
 Error code: bad checksum or CRC.
#define MSPACK_ERR_CRUNCH   (10)
 Error code: error during compression.
#define MSPACK_ERR_DECRUNCH   (11)
 Error code: error during decompression.
#define MSCAB_HDR_RESV_OFFSET   (0x28)
 Offset from start of cabinet to the reserved header data (if present).
#define MSCAB_HDR_PREVCAB   (0x01)
 Cabinet header flag: cabinet has a predecessor.
#define MSCAB_HDR_NEXTCAB   (0x02)
 Cabinet header flag: cabinet has a successor.
#define MSCAB_HDR_RESV   (0x04)
 Cabinet header flag: cabinet has reserved header space.
#define MSCABD_COMP_METHOD(comp_type)   ((comp_type) & 0x0F)
 Returns the compression method used by a folder.
#define MSCABD_COMP_LEVEL(comp_type)   (((comp_type) >> 8) & 0x1F)
 Returns the compression level used by a folder.
#define MSCAB_COMP_NONE   (0)
 Compression mode: no compression.
#define MSCAB_COMP_MSZIP   (1)
 Compression mode: MSZIP (deflate) compression.
#define MSCAB_COMP_QUANTUM   (2)
 Compression mode: Quantum compression.
#define MSCAB_COMP_LZX   (3)
 Compression mode: LZX compression.
#define MSCAB_ATTRIB_RDONLY   (0x01)
 mscabd_file::attribs attribute: file is read-only.
#define MSCAB_ATTRIB_HIDDEN   (0x02)
 mscabd_file::attribs attribute: file is hidden.
#define MSCAB_ATTRIB_SYSTEM   (0x04)
 mscabd_file::attribs attribute: file is an operating system file.
#define MSCAB_ATTRIB_ARCH   (0x20)
 mscabd_file::attribs attribute: file is "archived".
#define MSCAB_ATTRIB_EXEC   (0x40)
 mscabd_file::attribs attribute: file is an executable program.
#define MSCAB_ATTRIB_UTF_NAME   (0x80)
 mscabd_file::attribs attribute: filename is UTF8, not ISO-8859-1.
#define MSCABD_PARAM_SEARCHBUF   (0)
 mscab_decompressor::set_param() parameter: search buffer size.
#define MSCABD_PARAM_FIXMSZIP   (1)
 mscab_decompressor::set_param() parameter: repair MS-ZIP streams?
#define MSCABD_PARAM_DECOMPBUF   (2)
 mscab_decompressor::set_param() parameter: size of decompression buffer
#define MSCHMC_ENDLIST   (0)
 mschmc_file::section value: end of CHM file list
#define MSCHMC_UNCOMP   (1)
 mschmc_file::section value: this file is in the Uncompressed section
#define MSCHMC_MSCOMP   (2)
 mschmc_file::section value: this file is in the MSCompressed section
#define MSCHMC_PARAM_TIMESTAMP   (0)
 mschm_compressor::set_param() parameter: "timestamp" header
#define MSCHMC_PARAM_LANGUAGE   (1)
 mschm_compressor::set_param() parameter: "language" header
#define MSCHMC_PARAM_LZXWINDOW   (2)
 mschm_compressor::set_param() parameter: LZX window size
#define MSCHMC_PARAM_DENSITY   (3)
 mschm_compressor::set_param() parameter: intra-chunk quickref density
#define MSCHMC_PARAM_INDEX   (4)
 mschm_compressor::set_param() parameter: whether to create indices
#define MSSZDDC_PARAM_MISSINGCHAR   (0)
 msszdd_compressor::set_param() parameter: the missing character
#define MSSZDD_FMT_NORMAL   (0)
 msszddd_header::format value - a regular SZDD file
#define MSSZDD_FMT_QBASIC   (1)
 msszddd_header::format value - a special QBasic SZDD file
#define MSKWAJC_PARAM_COMP_TYPE   (0)
 mskwaj_compressor::set_param() parameter: compression type
#define MSKWAJC_PARAM_INCLUDE_LENGTH   (1)
 mskwaj_compressor::set_param() parameter: include the length of the uncompressed file in the header?
#define MSKWAJ_COMP_NONE   (0)
 KWAJ compression type: no compression.
#define MSKWAJ_COMP_XOR   (1)
 KWAJ compression type: no compression, 0xFF XOR "encryption".
#define MSKWAJ_COMP_SZDD   (2)
 KWAJ compression type: LZSS (same method as SZDD)
#define MSKWAJ_COMP_LZH   (3)
 KWAJ compression type: LZ+Huffman compression.
#define MSKWAJ_HDR_HASLENGTH   (0x01)
 KWAJ optional header flag: decompressed file length is included.
#define MSKWAJ_HDR_HASUNKNOWN1   (0x02)
 KWAJ optional header flag: unknown 2-byte structure is included.
#define MSKWAJ_HDR_HASUNKNOWN2   (0x04)
 KWAJ optional header flag: unknown multi-sized structure is included.
#define MSKWAJ_HDR_HASFILENAME   (0x08)
 KWAJ optional header flag: file name (no extension) is included.
#define MSKWAJ_HDR_HASFILEEXT   (0x10)
 KWAJ optional header flag: file extension is included.
#define MSKWAJ_HDR_HASEXTRATEXT   (0x20)
 KWAJ optional header flag: extra text is included.

Functions

int mspack_sys_selftest_internal (int)
 Part of the MSPACK_SYS_SELFTEST() macro, must not be used directly.
int mspack_version (int entity)
 Enquire about the binary compatibility version of a specific interface in the library.
struct mscab_compressormspack_create_cab_compressor (struct mspack_system *sys)
 Creates a new CAB compressor.
struct mscab_decompressormspack_create_cab_decompressor (struct mspack_system *sys)
 Creates a new CAB decompressor.
void mspack_destroy_cab_compressor (struct mscab_compressor *self)
 Destroys an existing CAB compressor.
void mspack_destroy_cab_decompressor (struct mscab_decompressor *self)
 Destroys an existing CAB decompressor.
struct mschm_compressormspack_create_chm_compressor (struct mspack_system *sys)
 Creates a new CHM compressor.
struct mschm_decompressormspack_create_chm_decompressor (struct mspack_system *sys)
 Creates a new CHM decompressor.
void mspack_destroy_chm_compressor (struct mschm_compressor *self)
 Destroys an existing CHM compressor.
void mspack_destroy_chm_decompressor (struct mschm_decompressor *self)
 Destroys an existing CHM decompressor.
struct mslit_compressormspack_create_lit_compressor (struct mspack_system *sys)
 Creates a new LIT compressor.
struct mslit_decompressormspack_create_lit_decompressor (struct mspack_system *sys)
 Creates a new LIT decompressor.
void mspack_destroy_lit_compressor (struct mslit_compressor *self)
 Destroys an existing LIT compressor.
void mspack_destroy_lit_decompressor (struct mslit_decompressor *self)
 Destroys an existing LIT decompressor.
struct mshlp_compressormspack_create_hlp_compressor (struct mspack_system *sys)
 Creates a new HLP compressor.
struct mshlp_decompressormspack_create_hlp_decompressor (struct mspack_system *sys)
 Creates a new HLP decompressor.
void mspack_destroy_hlp_compressor (struct mshlp_compressor *self)
 Destroys an existing hlp compressor.
void mspack_destroy_hlp_decompressor (struct mshlp_decompressor *self)
 Destroys an existing hlp decompressor.
struct msszdd_compressormspack_create_szdd_compressor (struct mspack_system *sys)
 Creates a new SZDD compressor.
struct msszdd_decompressormspack_create_szdd_decompressor (struct mspack_system *sys)
 Creates a new SZDD decompressor.
void mspack_destroy_szdd_compressor (struct msszdd_compressor *self)
 Destroys an existing SZDD compressor.
void mspack_destroy_szdd_decompressor (struct msszdd_decompressor *self)
 Destroys an existing SZDD decompressor.
struct mskwaj_compressormspack_create_kwaj_compressor (struct mspack_system *sys)
 Creates a new KWAJ compressor.
struct mskwaj_decompressormspack_create_kwaj_decompressor (struct mspack_system *sys)
 Creates a new KWAJ decompressor.
void mspack_destroy_kwaj_compressor (struct mskwaj_compressor *self)
 Destroys an existing KWAJ compressor.
void mspack_destroy_kwaj_decompressor (struct mskwaj_decompressor *self)
 Destroys an existing KWAJ decompressor.

Define Documentation

#define MSCAB_ATTRIB_ARCH   (0x20)

mscabd_file::attribs attribute: file is "archived".

#define MSCAB_ATTRIB_EXEC   (0x40)

mscabd_file::attribs attribute: file is an executable program.

#define MSCAB_ATTRIB_HIDDEN   (0x02)

mscabd_file::attribs attribute: file is hidden.

#define MSCAB_ATTRIB_RDONLY   (0x01)

mscabd_file::attribs attribute: file is read-only.

#define MSCAB_ATTRIB_SYSTEM   (0x04)

mscabd_file::attribs attribute: file is an operating system file.

#define MSCAB_ATTRIB_UTF_NAME   (0x80)

mscabd_file::attribs attribute: filename is UTF8, not ISO-8859-1.

#define MSCAB_COMP_LZX   (3)

Compression mode: LZX compression.

#define MSCAB_COMP_MSZIP   (1)

Compression mode: MSZIP (deflate) compression.

#define MSCAB_COMP_NONE   (0)

Compression mode: no compression.

#define MSCAB_COMP_QUANTUM   (2)

Compression mode: Quantum compression.

#define MSCAB_HDR_NEXTCAB   (0x02)

Cabinet header flag: cabinet has a successor.

#define MSCAB_HDR_PREVCAB   (0x01)

Cabinet header flag: cabinet has a predecessor.

#define MSCAB_HDR_RESV   (0x04)

Cabinet header flag: cabinet has reserved header space.

#define MSCAB_HDR_RESV_OFFSET   (0x28)

Offset from start of cabinet to the reserved header data (if present).

#define MSCABD_COMP_LEVEL (   comp_type)    (((comp_type) >> 8) & 0x1F)

Returns the compression level used by a folder.

Parameters:
comp_typea mscabd_folder::comp_type value
Returns:
the compression level. This is only defined by LZX and Quantum compression
#define MSCABD_COMP_METHOD (   comp_type)    ((comp_type) & 0x0F)

Returns the compression method used by a folder.

Parameters:
comp_typea mscabd_folder::comp_type value
Returns:
one of MSCAB_COMP_NONE, MSCAB_COMP_MSZIP, MSCAB_COMP_QUANTUM or MSCAB_COMP_LZX
#define MSCABD_PARAM_DECOMPBUF   (2)

mscab_decompressor::set_param() parameter: size of decompression buffer

#define MSCABD_PARAM_FIXMSZIP   (1)

mscab_decompressor::set_param() parameter: repair MS-ZIP streams?

#define MSCABD_PARAM_SEARCHBUF   (0)

mscab_decompressor::set_param() parameter: search buffer size.

#define MSCHMC_ENDLIST   (0)

mschmc_file::section value: end of CHM file list

#define MSCHMC_MSCOMP   (2)

mschmc_file::section value: this file is in the MSCompressed section

#define MSCHMC_PARAM_DENSITY   (3)

mschm_compressor::set_param() parameter: intra-chunk quickref density

#define MSCHMC_PARAM_INDEX   (4)

mschm_compressor::set_param() parameter: whether to create indices

#define MSCHMC_PARAM_LANGUAGE   (1)

mschm_compressor::set_param() parameter: "language" header

#define MSCHMC_PARAM_LZXWINDOW   (2)

mschm_compressor::set_param() parameter: LZX window size

#define MSCHMC_PARAM_TIMESTAMP   (0)

mschm_compressor::set_param() parameter: "timestamp" header

#define MSCHMC_UNCOMP   (1)

mschmc_file::section value: this file is in the Uncompressed section

#define MSKWAJ_COMP_LZH   (3)

KWAJ compression type: LZ+Huffman compression.

#define MSKWAJ_COMP_NONE   (0)

KWAJ compression type: no compression.

#define MSKWAJ_COMP_SZDD   (2)

KWAJ compression type: LZSS (same method as SZDD)

#define MSKWAJ_COMP_XOR   (1)

KWAJ compression type: no compression, 0xFF XOR "encryption".

#define MSKWAJ_HDR_HASEXTRATEXT   (0x20)

KWAJ optional header flag: extra text is included.

#define MSKWAJ_HDR_HASFILEEXT   (0x10)

KWAJ optional header flag: file extension is included.

#define MSKWAJ_HDR_HASFILENAME   (0x08)

KWAJ optional header flag: file name (no extension) is included.

#define MSKWAJ_HDR_HASLENGTH   (0x01)

KWAJ optional header flag: decompressed file length is included.

#define MSKWAJ_HDR_HASUNKNOWN1   (0x02)

KWAJ optional header flag: unknown 2-byte structure is included.

#define MSKWAJ_HDR_HASUNKNOWN2   (0x04)

KWAJ optional header flag: unknown multi-sized structure is included.

#define MSKWAJC_PARAM_COMP_TYPE   (0)

mskwaj_compressor::set_param() parameter: compression type

#define MSKWAJC_PARAM_INCLUDE_LENGTH   (1)

mskwaj_compressor::set_param() parameter: include the length of the uncompressed file in the header?

#define MSPACK_ERR_ARGS   (1)

Error code: bad arguments to method.

#define MSPACK_ERR_CHECKSUM   (9)

Error code: bad checksum or CRC.

#define MSPACK_ERR_CRUNCH   (10)

Error code: error during compression.

#define MSPACK_ERR_DATAFORMAT   (8)

Error code: bad or corrupt file format.

#define MSPACK_ERR_DECRUNCH   (11)

Error code: error during decompression.

#define MSPACK_ERR_NOMEMORY   (6)

Error code: out of memory.

#define MSPACK_ERR_OK   (0)

Error code: no error.

#define MSPACK_ERR_OPEN   (2)

Error code: error opening file.

#define MSPACK_ERR_READ   (3)

Error code: error reading file.

#define MSPACK_ERR_SEEK   (5)

Error code: seek error.

#define MSPACK_ERR_SIGNATURE   (7)

Error code: bad "magic id" in file.

#define MSPACK_ERR_WRITE   (4)

Error code: error writing file.

#define MSPACK_SYS_OPEN_APPEND   (3)

mspack_system::open() mode: open existing file for writing

#define MSPACK_SYS_OPEN_READ   (0)

mspack_system::open() mode: open existing file for reading.

#define MSPACK_SYS_OPEN_UPDATE   (2)

mspack_system::open() mode: open existing file for writing

#define MSPACK_SYS_OPEN_WRITE   (1)

mspack_system::open() mode: open new file for writing

#define MSPACK_SYS_SEEK_CUR   (1)

mspack_system::seek() mode: seek relative to current offset

#define MSPACK_SYS_SEEK_END   (2)

mspack_system::seek() mode: seek relative to end of file

#define MSPACK_SYS_SEEK_START   (0)

mspack_system::seek() mode: seek relative to start of file

#define MSPACK_SYS_SELFTEST (   result)
Value:
do { \
  (result) = mspack_sys_selftest_internal(sizeof(off_t)); \
} while (0)

System self-test function, to ensure both library and calling program can use one another.

A result of MSPACK_ERR_OK means the library and caller are compatible. Any other result indicates that the library and caller are not compatible and should not be used. In particular, a value of MSPACK_ERR_SEEK means the library and caller use different off_t datatypes.

It should be used like so:

 int selftest_result;
 MSPACK_SYS_SELFTEST(selftest_result);
 if (selftest_result != MSPACK_ERR_OK) {
   fprintf(stderr, "incompatible with this build of libmspack\n");
   exit(0);
 }
Parameters:
resultan int variable to store the result of the self-test
#define MSPACK_VER_LIBRARY   (0)

Pass to mspack_version() to get the overall library version.

#define MSPACK_VER_MSCABC   (3)

Pass to mspack_version() to get the mscab_compressor version.

#define MSPACK_VER_MSCABD   (2)

Pass to mspack_version() to get the mscab_decompressor version.

#define MSPACK_VER_MSCHMC   (5)

Pass to mspack_version() to get the mschm_compressor version.

#define MSPACK_VER_MSCHMD   (4)

Pass to mspack_version() to get the mschm_decompressor version.

#define MSPACK_VER_MSHLPC   (9)

Pass to mspack_version() to get the mshlp_compressor version.

#define MSPACK_VER_MSHLPD   (8)

Pass to mspack_version() to get the mshlp_decompressor version.

#define MSPACK_VER_MSKWAJC   (13)

Pass to mspack_version() to get the mskwaj_compressor version.

#define MSPACK_VER_MSKWAJD   (12)

Pass to mspack_version() to get the mskwaj_decompressor version.

#define MSPACK_VER_MSLITC   (7)

Pass to mspack_version() to get the mslit_compressor version.

#define MSPACK_VER_MSLITD   (6)

Pass to mspack_version() to get the mslit_decompressor version.

#define MSPACK_VER_MSSZDDC   (11)

Pass to mspack_version() to get the msszdd_compressor version.

#define MSPACK_VER_MSSZDDD   (10)

Pass to mspack_version() to get the msszdd_decompressor version.

#define MSPACK_VER_SYSTEM   (1)

Pass to mspack_version() to get the mspack_system version.

#define MSSZDD_FMT_NORMAL   (0)

msszddd_header::format value - a regular SZDD file

#define MSSZDD_FMT_QBASIC   (1)

msszddd_header::format value - a special QBasic SZDD file

#define MSSZDDC_PARAM_MISSINGCHAR   (0)

msszdd_compressor::set_param() parameter: the missing character


Function Documentation

struct mscab_compressor* mspack_create_cab_compressor ( struct mspack_system sys) [read]

Creates a new CAB compressor.

Parameters:
sysa custom mspack_system structure, or NULL to use the default
Returns:
a mscab_compressor or NULL
struct mscab_decompressor* mspack_create_cab_decompressor ( struct mspack_system sys) [read]

Creates a new CAB decompressor.

Parameters:
sysa custom mspack_system structure, or NULL to use the default
Returns:
a mscab_decompressor or NULL
struct mschm_compressor* mspack_create_chm_compressor ( struct mspack_system sys) [read]

Creates a new CHM compressor.

Parameters:
sysa custom mspack_system structure, or NULL to use the default
Returns:
a mschm_compressor or NULL
struct mschm_decompressor* mspack_create_chm_decompressor ( struct mspack_system sys) [read]

Creates a new CHM decompressor.

Parameters:
sysa custom mspack_system structure, or NULL to use the default
Returns:
a mschm_decompressor or NULL
struct mshlp_compressor* mspack_create_hlp_compressor ( struct mspack_system sys) [read]

Creates a new HLP compressor.

Parameters:
sysa custom mspack_system structure, or NULL to use the default
Returns:
a mshlp_compressor or NULL
struct mshlp_decompressor* mspack_create_hlp_decompressor ( struct mspack_system sys) [read]

Creates a new HLP decompressor.

Parameters:
sysa custom mspack_system structure, or NULL to use the default
Returns:
a mshlp_decompressor or NULL
struct mskwaj_compressor* mspack_create_kwaj_compressor ( struct mspack_system sys) [read]

Creates a new KWAJ compressor.

Parameters:
sysa custom mspack_system structure, or NULL to use the default
Returns:
a mskwaj_compressor or NULL
struct mskwaj_decompressor* mspack_create_kwaj_decompressor ( struct mspack_system sys) [read]

Creates a new KWAJ decompressor.

Parameters:
sysa custom mspack_system structure, or NULL to use the default
Returns:
a mskwaj_decompressor or NULL
struct mslit_compressor* mspack_create_lit_compressor ( struct mspack_system sys) [read]

Creates a new LIT compressor.

Parameters:
sysa custom mspack_system structure, or NULL to use the default
Returns:
a mslit_compressor or NULL
struct mslit_decompressor* mspack_create_lit_decompressor ( struct mspack_system sys) [read]

Creates a new LIT decompressor.

Parameters:
sysa custom mspack_system structure, or NULL to use the default
Returns:
a mslit_decompressor or NULL
struct msszdd_compressor* mspack_create_szdd_compressor ( struct mspack_system sys) [read]

Creates a new SZDD compressor.

Parameters:
sysa custom mspack_system structure, or NULL to use the default
Returns:
a msszdd_compressor or NULL
struct msszdd_decompressor* mspack_create_szdd_decompressor ( struct mspack_system sys) [read]

Creates a new SZDD decompressor.

Parameters:
sysa custom mspack_system structure, or NULL to use the default
Returns:
a msszdd_decompressor or NULL
void mspack_destroy_cab_compressor ( struct mscab_compressor self)

Destroys an existing CAB compressor.

Parameters:
selfthe mscab_compressor to destroy
void mspack_destroy_cab_decompressor ( struct mscab_decompressor self)

Destroys an existing CAB decompressor.

Parameters:
selfthe mscab_decompressor to destroy
void mspack_destroy_chm_compressor ( struct mschm_compressor self)

Destroys an existing CHM compressor.

Parameters:
selfthe mschm_compressor to destroy
void mspack_destroy_chm_decompressor ( struct mschm_decompressor self)

Destroys an existing CHM decompressor.

Parameters:
selfthe mschm_decompressor to destroy
void mspack_destroy_hlp_compressor ( struct mshlp_compressor self)

Destroys an existing hlp compressor.

Parameters:
selfthe mshlp_compressor to destroy
void mspack_destroy_hlp_decompressor ( struct mshlp_decompressor self)

Destroys an existing hlp decompressor.

Parameters:
selfthe mshlp_decompressor to destroy
void mspack_destroy_kwaj_compressor ( struct mskwaj_compressor self)

Destroys an existing KWAJ compressor.

Parameters:
selfthe mskwaj_compressor to destroy
void mspack_destroy_kwaj_decompressor ( struct mskwaj_decompressor self)

Destroys an existing KWAJ decompressor.

Parameters:
selfthe mskwaj_decompressor to destroy
void mspack_destroy_lit_compressor ( struct mslit_compressor self)

Destroys an existing LIT compressor.

Parameters:
selfthe mslit_compressor to destroy
void mspack_destroy_lit_decompressor ( struct mslit_decompressor self)

Destroys an existing LIT decompressor.

Parameters:
selfthe mslit_decompressor to destroy
void mspack_destroy_szdd_compressor ( struct msszdd_compressor self)

Destroys an existing SZDD compressor.

Parameters:
selfthe msszdd_compressor to destroy
void mspack_destroy_szdd_decompressor ( struct msszdd_decompressor self)

Destroys an existing SZDD decompressor.

Parameters:
selfthe msszdd_decompressor to destroy
int mspack_sys_selftest_internal ( int  )

Part of the MSPACK_SYS_SELFTEST() macro, must not be used directly.

int mspack_version ( int  entity)

Enquire about the binary compatibility version of a specific interface in the library.

Currently, the following interfaces are defined:

The result of the function should be interpreted as follows:

  • -1: this interface is completely unknown to the library
  • 0: this interface is known, but non-functioning
  • 1: this interface has all basic functionality
  • 2, 3, ...: this interface has additional functionality, clearly marked in the documentation as "version 2", "version 3" and so on.
Parameters:
entitythe interface to request current version of
Returns:
the version of the requested interface
 All Data Structures Files Functions Variables Defines