/** * Compressed RTF (LZFu) decompression per MS-OXRTFCP * ("Rich Text Format (RTF) Compression Algorithm"). * * Algorithm ported from the MIT-licensed `compressed_rtf` Python package by * delimitry (https://github.com/delimitry/compressed_rtf), which implements * the same specification. */ export declare const RTF_MAGIC_COMPRESSED = "LZFu"; export declare const RTF_MAGIC_UNCOMPRESSED = "MELA"; /** Max accepted decompressed RTF size (256 MiB) — guards corrupt headers. */ export declare const MAX_RTF_SIZE: number; export interface CompressedRtfHeader { /** Total size of the data following this field structure, +12. */ compressedSize: number; /** Size of the decompressed RTF body in bytes. */ uncompressedSize: number; /** 'LZFu' (compressed) or 'MELA' (stored raw). */ magic: string; /** CRC-32 of the compressed payload (0 for uncompressed). */ crc: number; } export interface DecompressRtfOptions { /** * Verify the payload CRC-32 (LZFu) / zero CRC (MELA). Defaults to true. * Disable to salvage data from files with a corrupt checksum. */ verifyCrc?: boolean; } /** * Decompresses a `__substg1.0_10090102` (PidTagRtfCompressed) payload. * Returns the raw (still RTF-markup) bytes. */ export declare function decompressRtf(data: Uint8Array, options?: DecompressRtfOptions): Uint8Array; /** * Decompresses a PidTagRtfCompressed payload and decodes it to a string. * RTF bodies are single-byte (ANSI) text; windows-1252 is the default * decoding, matching Outlook's typical code page. */ export declare function decompressRtfToString(data: Uint8Array, encoding?: string, options?: DecompressRtfOptions): string; //# sourceMappingURL=rtf.d.ts.map