You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

compressed-rtf

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

compressed-rtf

Compressed Rich Text Format (RTF) compression and decompression package

1.0.7
PyPI
Maintainers
1

compressed_rtf

PyPI Build Status Coverage Status MIT license

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.

Keywords

compressed-rtf

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts