Skip to main content

Compressed Rich Text Format (RTF) compression and decompression package

Project description

# compressed_rtf

[![Build Status](https://travis-ci.org/delimitry/compressed_rtf.svg?branch=master)](https://travis-ci.org/delimitry/compressed_rtf) [![Coverage Status](https://coveralls.io/repos/github/delimitry/compressed_rtf/badge.svg?branch=master)](https://coveralls.io/github/delimitry/compressed_rtf?branch=master) [![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](https://github.com/delimitry/compressed_rtf/blob/master/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:

`python >>> 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](https://github.com/delimitry/compressed_rtf/blob/master/LICENSE).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

compressed_rtf-1.0.2.tar.gz (6.0 kB view details)

Uploaded Source

File details

Details for the file compressed_rtf-1.0.2.tar.gz.

File metadata

File hashes

Hashes for compressed_rtf-1.0.2.tar.gz
Algorithm Hash digest
SHA256 51ff4a8d42cf84ced064248eeb1dcc887a03f8ee352ed2de248e24b8ab2ac8fa
MD5 83304eedebc2e1148b2edd14a98a5048
BLAKE2b-256 fd5c6aff13b6cb28fd29c3af52a59f7e5d78b577d1178814a483c527d00ea567

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page