Compressed RTF related functions. More...
Macros | |
#define | LE16_CPU(x) |
#define | LE32_CPU(x) |
#define | LZFU_COMPRESSED 0x75465a4c |
#define | LZFU_DICTLENGTH 0x1000 |
#define | LZFU_HEADERLENGTH 0x10 |
#define | LZFU_INITDICT |
#define | LZFU_INITLENGTH 207 |
#define | LZFU_UNCOMPRESSED 0x414c454d |
#define | MIN(a, b) ((a) < (b) ? (a) : (b)) |
Typedefs | |
typedef struct _decompression_state | decompression_state |
typedef struct _dictionaryref | dictionaryref |
typedef struct _lzfuheader | lzfuheader |
typedef struct _output_state | output_state |
Functions | |
uint32_t | calculateCRC (uint8_t *input, uint32_t offset, uint32_t length) |
_PUBLIC_ enum MAPISTATUS | compress_rtf (TALLOC_CTX *mem_ctx, const char *rtf, const size_t rtf_size, uint8_t **rtfcomp, size_t *rtfcomp_size) |
_PUBLIC_ enum MAPISTATUS | uncompress_rtf (TALLOC_CTX *mem_ctx, uint8_t *rtfcomp, uint32_t in_size, DATA_BLOB *rtf) |
_PUBLIC_ enum MAPISTATUS | WrapCompressedRTFStream (mapi_object_t *obj_stream, DATA_BLOB *rtf) |
Compressed RTF related functions.
#define LE16_CPU | ( | x) |
#define LE32_CPU | ( | x) |
#define LZFU_COMPRESSED 0x75465a4c |
Referenced by compress_rtf().
#define LZFU_DICTLENGTH 0x1000 |
Referenced by compress_rtf().
#define LZFU_HEADERLENGTH 0x10 |
#define LZFU_INITDICT |
Referenced by compress_rtf().
#define LZFU_INITLENGTH 207 |
Referenced by compress_rtf().
#define LZFU_UNCOMPRESSED 0x414c454d |
Referenced by uncompress_rtf().
#define MIN | ( | a, | |
b | |||
) | ((a) < (b) ? (a) : (b)) |
typedef struct _decompression_state decompression_state |
typedef struct _dictionaryref dictionaryref |
typedef struct _lzfuheader lzfuheader |
typedef struct _output_state output_state |
uint32_t calculateCRC | ( | uint8_t * | input, |
uint32_t | offset, | ||
uint32_t | length | ||
) |
Referenced by compress_rtf().
_PUBLIC_ enum MAPISTATUS compress_rtf | ( | TALLOC_CTX * | mem_ctx, |
const char * | rtf, | ||
const size_t | rtf_size, | ||
uint8_t ** | rtfcomp, | ||
size_t * | rtfcomp_size | ||
) |
References calculateCRC(), LZFU_COMPRESSED, LZFU_DICTLENGTH, LZFU_INITDICT, and LZFU_INITLENGTH.
_PUBLIC_ enum MAPISTATUS uncompress_rtf | ( | TALLOC_CTX * | mem_ctx, |
uint8_t * | rtfcomp, | ||
uint32_t | in_size, | ||
DATA_BLOB * | rtf | ||
) |
References LZFU_UNCOMPRESSED, and OPENCHANGE_RETVAL_ERR.
Referenced by WrapCompressedRTFStream().
_PUBLIC_ enum MAPISTATUS WrapCompressedRTFStream | ( | mapi_object_t * | obj_stream, |
DATA_BLOB * | rtf | ||
) |
creates a DATA_BLOB in uncompressed Rich Text Format (RTF) from the compressed format used in the PR_RTF_COMPRESSED property opened in the stream.
obj_stream | stream object with RTF stream content |
rtf | the output blob with uncompressed content |
References GetLastError(), mapi_session::mapi_ctx, mapi_object_get_session(), mapi_context::mem_ctx, OPENCHANGE_RETVAL_IF, ReadStream(), and uncompress_rtf().
![]() ![]() ![]() |
This content is licensed under the Creative Commons Attribution ShareAlike License v. 3.0: http://creativecommons.org/licenses/by-sa/3.0/ |