GMimeFilterRtfCompressed

GMimeFilterRtfCompressed — Compress or decompress RTF streams

Functions

Types and Values

Description

Functions

g_mime_filter_rtf_compressed_new ()

GMimeFilter *
g_mime_filter_rtf_compressed_new (void);

Creates a filter for compressed or uncompressed [MS-OXRTFCP] data.

Returns

the filter.

[transfer full]


g_mime_filter_rtf_compressed_get_compression_mode ()

GMimeRtfCompressionMode
g_mime_filter_rtf_compressed_get_compression_mode
                               (GMimeFilterRtfCompressed *filter);

Gets the raw COMPTYPE field after at least twelve header bytes have been processed. Unknown wire values are preserved.

Parameters

filter

an RTF decompression filter

 

Returns

the compression mode, or Unknown before the field is available


g_mime_filter_rtf_compressed_is_valid_crc32 ()

gboolean
g_mime_filter_rtf_compressed_is_valid_crc32
                               (GMimeFilterRtfCompressed *filter);

Checks the CRC once the header and content have been processed. Uncompressed content requires a zero CRC. Unknown modes are invalid. A matching CRC alone does not validate the RTF document or its raw size.

Parameters

filter

an RTF decompression filter

 

Returns

whether the completed content has the required CRC

Types and Values

enum GMimeRtfCompressionMode

Compression modes defined by [MS-OXRTFCP].

Members

GMIME_RTF_COMPRESSION_MODE_UNKNOWN

No compression header has been read.

 

GMIME_RTF_COMPRESSION_MODE_COMPRESSED

LZFu compression.

 

GMIME_RTF_COMPRESSION_MODE_UNCOMPRESSED

Uncompressed RTF with a MELA header.

 

GMimeFilterRtfCompressed

typedef struct _GMimeFilterRtfCompressed GMimeFilterRtfCompressed;

Incrementally decompresses an RtfCompressed MAPI property. Unknown compression modes are discarded. Bytes beyond the declared content length or LZFu end marker are ignored. Check the CRC after completion; a truncated or corrupt stream may have produced partial output.