Compressed RTF related functions. More...
#include <libmapi/libmapi.h>
Defines | |
#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 |
Typedefs | |
typedef struct _lzfuheader | lzfuheader |
Functions | |
_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 | ) |
x = ((((x) & 0xff00) >> 8) | \ (((x) & 0x00ff) << 8));
#define LE32_CPU | ( | x | ) |
x = ((((x) & 0xff000000) >> 24) | \ (((x) & 0x00ff0000) >> 8 ) | \ (((x) & 0x0000ff00) << 8 ) | \ (((x) & 0x000000ff) << 24));
Referenced by uncompress_rtf().
#define LZFU_COMPRESSED 0x75465a4c |
Referenced by uncompress_rtf().
#define LZFU_DICTLENGTH 0x1000 |
Referenced by uncompress_rtf().
#define LZFU_HEADERLENGTH 0x10 |
Referenced by uncompress_rtf().
#define LZFU_INITDICT |
"{\\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"
Referenced by uncompress_rtf().
#define LZFU_INITLENGTH 207 |
Referenced by uncompress_rtf().
#define LZFU_UNCOMPRESSED 0x414c454d |
Referenced by uncompress_rtf().
typedef struct _lzfuheader lzfuheader |
_PUBLIC_ enum MAPISTATUS uncompress_rtf | ( | TALLOC_CTX * | mem_ctx, | |
uint8_t * | rtfcomp, | |||
uint32_t | in_size, | |||
DATA_BLOB * | rtf | |||
) |
References LE32_CPU, LZFU_COMPRESSED, LZFU_DICTLENGTH, LZFU_HEADERLENGTH, LZFU_INITDICT, LZFU_INITLENGTH, 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(), global_mapi_ctx, mapi_ctx::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/ |