libmspack
Data Fields
msoab_decompressor Struct Reference

A decompressor for .LZX (Offline Address Book) files. More...

#include <mspack.h>

Data Fields

int(* decompress )(struct msoab_decompressor *self, const char *input, const char *output)
 Decompresses a full Offline Address Book file. More...
 
int(* decompress_incremental )(struct msoab_decompressor *self, const char *input, const char *base, const char *output)
 Decompresses an Offline Address Book with an incremental patch file. More...
 
int(* set_param )(struct msoab_decompressor *self, int param, int value)
 Sets an OAB decompression engine parameter. More...
 

Detailed Description

A decompressor for .LZX (Offline Address Book) files.

All fields are READ ONLY.

See also
mspack_create_oab_decompressor(), mspack_destroy_oab_decompressor()

Field Documentation

◆ decompress

int(* msoab_decompressor::decompress) (struct msoab_decompressor *self, const char *input, const char *output)

Decompresses a full Offline Address Book file.

If the input file is a valid compressed Offline Address Book file, it will be read and the decompressed contents will be written to the output file.

Parameters
selfa self-referential pointer to the msoab_decompressor instance being called
inputthe filename of the input file. This is passed directly to mspack_system::open().
outputthe filename of the output file. This is passed directly to mspack_system::open().
Returns
an error code, or MSPACK_ERR_OK if successful

◆ decompress_incremental

int(* msoab_decompressor::decompress_incremental) (struct msoab_decompressor *self, const char *input, const char *base, const char *output)

Decompresses an Offline Address Book with an incremental patch file.

This requires both a full UNCOMPRESSED Offline Address Book file to act as the "base", and a compressed incremental patch file as input. If the input file is valid, it will be decompressed with reference to the base file, and the decompressed contents will be written to the output file.

There is no way to tell what the right base file is for the given incremental patch, but if you get it wrong, this will usually result in incorrect data being decompressed, which will then fail a checksum test.

Parameters
selfa self-referential pointer to the msoab_decompressor instance being called
inputthe filename of the input file. This is passed directly to mspack_system::open().
basethe filename of the base file to which the incremental patch shall be applied. This is passed directly to mspack_system::open().
outputthe filename of the output file. This is passed directly to mspack_system::open().
Returns
an error code, or MSPACK_ERR_OK if successful

◆ set_param

int(* msoab_decompressor::set_param) (struct msoab_decompressor *self, int param, int value)

Sets an OAB decompression engine parameter.

Available only in OAB decompressor version 2 and above.

  • MSOABD_PARAM_DECOMPBUF: How many bytes should be used as an input buffer by decompressors? The minimum value is 16. The default value is 4096.
Parameters
selfa self-referential pointer to the msoab_decompressor instance being called
paramthe parameter to set
valuethe value to set the parameter to
Returns
MSPACK_ERR_OK if all is OK, or MSPACK_ERR_ARGS if there is a problem with either parameter or value.

The documentation for this struct was generated from the following file: