Compressed Rich Text Format (RTF) compression and decompression package
Project Links
Meta
Author: Dmitry Alimov
Classifiers
Development Status
- 5 - Production/Stable
Environment
- Console
- Win32 (MS Windows)
Operating System
- Microsoft :: Windows
- POSIX :: Linux
Programming Language
- Python :: 2.7
- Python :: 3
Topic
- System :: Archiving :: Compression
- Text Processing
compressed_rtf
Compressed Rich Text Format (RTF) compression worker in Python
Description:
Compressed RTF also known as "LZFu" compression format
Based on Rich Text Format (RTF) Compression Algorithm:
https://msdn.microsoft.com/en-us/library/cc463890(v=exchg.80).aspx
Usage example:
>>> from compressed_rtf import compress, decompress
>>>
>>> data = '{\\rtf1\\ansi\\ansicpg1252\\pard test}'
>>> comp = compress(data, compressed=True) # compressed
>>> comp
'#\x00\x00\x00"\x00\x00\x00LZFu3\\\xe8t\x03\x00\n\x00rcpg125\x922\n\xf3 t\x07\x90t}\x0f\x10'
>>>
>>> raw = compress(data, compressed=False) # raw/uncompressed
>>> raw
'.\x00\x00\x00"\x00\x00\x00MELA \xdf\x12\xce{\\rtf1\\ansi\\ansicpg1252\\pard test}'
>>>
>>> decompress(comp)
'{\\rtf1\\ansi\\ansicpg1252\\pard test}'
>>>
>>> decompress(raw)
'{\\rtf1\\ansi\\ansicpg1252\\pard test}'
>>>
License:
Released under The MIT License.
1.0.7
Mar 24, 2025
1.0.6
Feb 16, 2020
1.0.5
Apr 29, 2018
1.0.4
Apr 29, 2018
1.0.3
Apr 23, 2018
1.0.2
Apr 23, 2018
1.0.1
Apr 23, 2018
1.0.0
Apr 23, 2018
Wheel compatibility matrix
Files in release
No dependencies