--- id: compressed-rtf version: "1.0.7" license: MIT license_treatment: permissive maintenance: aging --- # compressed-rtf — Compressed Rich Text Format (RTF) compression and decompression package License: permissive · Maintenance: aging · Downloads: 6.7M/mo ## What it is and what it does compressed_rtf is a Python implementation of the LZFu compression algorithm used by Microsoft for Rich Text Format data. It provides two functions—compress() and decompress()—to encode and decode RTF streams according to the Microsoft RTF Compression Algorithm specification. The package has no runtime dependencies and works on both Windows and POSIX systems. The library is useful when working with RTF data that has been compressed using the Microsoft format, such as email attachments or Office document streams. It implements both the compressed (LZFu) and raw (MELA) encoding variants, allowing round-trip conversion between compressed and decompressed RTF representations. Use it for: - Decompress RTF data embedded in Microsoft Exchange or Outlook email messages - Convert between compressed and uncompressed RTF formats for document processing - Extract readable RTF content from binary streams that use LZFu compression - Integrate RTF compression/decompression into document conversion pipelines ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Compresses and decompresses Rich Text Format (RTF) data using the LZFu compression algorithm, implementing the Microsoft RTF Compression format. Yes, if you need to work with Microsoft-compressed RTF data. The package is stable, has no dependencies, and carries permissive licensing. However, maintenance is aging with no recent updates; verify that it meets your RTF variant requirements before relying on it for new projects. ## Install pip install compressed-rtf uv add compressed-rtf poetry add compressed-rtf ## Installing compressed-rtf Before you install: Low install friction with no runtime dependencies. Maintenance is aging—last commit was 2025-06-29, but the package remains in production/stable status with no recent activity. License in practice: MIT license permits commercial and private use with minimal restrictions, requiring only attribution and inclusion of the license notice. Quickstart: from compressed_rtf import compress, decompress data = '{\\rtf1\\ansi\\ansicpg1252\\pard test}' compressed = compress(data, compressed=True) original = decompress(compressed) Verify before relying: - Whether the package handles edge cases or malformed RTF data gracefully - Performance characteristics on large RTF documents - Compatibility with modern RTF variants beyond the MSDN specification ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: aging - Downloads: 6.7M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags rtf compression decompression, lzfu compression, compressed rtf format, rtf lzfu encoder decoder, microsoft rtf compression, mela rtf compression, rtf-compression, lzfu-codec, document-processing [View on SkillFed](https://skillfed.io/packages/compressed-rtf) · [View on PyPI](https://pypi.org/project/compressed-rtf/)