'LibPst'
lzfu.c File Reference
#include "define.h"
#include "lzfu.h"
Include dependency graph for lzfu.c:

Go to the source code of this file.

Data Structures

struct  _lzfuheader
 

Macros

#define LZFU_COMPRESSED   0x75465a4c
 
#define LZFU_UNCOMPRESSED   0x414c454d
 
#define LZFU_INITDICT
 
#define LZFU_INITLENGTH   207
 

Typedefs

typedef struct _lzfuheader lzfuheader
 

Functions

char * pst_lzfu_decompress (char *rtfcomp, uint32_t compsize, size_t *size)
 decompress lz compressed rtf data. More...
 

Macro Definition Documentation

◆ LZFU_COMPRESSED

#define LZFU_COMPRESSED   0x75465a4c

Definition at line 16 of file lzfu.c.

◆ LZFU_INITDICT

#define LZFU_INITDICT
Value:
"{\\rtf1\\ansi\\mac\\deff0\\deftab720{\\fonttbl;}" \
"{\\f0\\fnil \\froman \\fswiss \\fmodern \\fscrip" \
"t \\fdecor MS Sans SerifSymbolArialTimes Ne" \
"w RomanCourier{\\colortbl\\red0\\green0\\blue0" \
"\r\n\\par \\pard\\plain\\f0\\fs20\\b\\i\\u\\tab" \
"\\tx"

Definition at line 20 of file lzfu.c.

Referenced by pst_lzfu_decompress().

◆ LZFU_INITLENGTH

#define LZFU_INITLENGTH   207

Definition at line 27 of file lzfu.c.

Referenced by pst_lzfu_decompress().

◆ LZFU_UNCOMPRESSED

#define LZFU_UNCOMPRESSED   0x414c454d

Definition at line 17 of file lzfu.c.

Typedef Documentation

◆ lzfuheader

typedef struct _lzfuheader lzfuheader

Function Documentation

◆ pst_lzfu_decompress()

char* pst_lzfu_decompress ( char *  rtfcomp,
uint32_t  compsize,
size_t *  size 
)

decompress lz compressed rtf data.

The initial lz dictionary is preloaded with rtf specific data.

Parameters
rtfcomppointer to the rtf compressed data
compsizesize of the compressed data buffer
sizepointer to location to return size of the output buffer
Returns
pointer to the output buffer containing the decompressed data. The caller must free this buffer.

Definition at line 38 of file lzfu.c.

References _lzfuheader::cbRawSize, _lzfuheader::cbSize, _lzfuheader::dwCRC, _lzfuheader::dwMagic, LE16_CPU, LE32_CPU, LZFU_INITDICT, LZFU_INITLENGTH, and pst_malloc().

Referenced by write_normal_email().

Here is the call graph for this function: