Skip to main content

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.

Metadata

Release files for compressed-rtf 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for compressed-rtf 1.0.7
File Size Uploaded
compressed_rtf-1.0.7.tar.gz 8.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for compressed-rtf 1.0.7
File Interpreter ABI Platform
compressed_rtf-1.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 16.1 kB

Release files / compressed_rtf-1.0.7.tar.gz

Download URL compressed_rtf-1.0.7.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7c30859334839f3cdc7d10796af5b434bb326b9df7cb5a65e95a8eacb2951b0e
BLAKE2b-256 checksum
How to use checksums
b70c929a4e8ef9d7143f54d77dadb5f370cc7b98534b1bd6e1124d0abe8efb24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.19

Release files / compressed_rtf-1.0.7-py3-none-any.whl

Download URL compressed_rtf-1.0.7-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b7904921d78c67a0a4b7fff9fb361a00ae2b447b6edca010ce321cd98fa0fcc0
BLAKE2b-256 checksum
How to use checksums
071d62f5bf92e12335eb63517f42671ed78512d48bbc69e02a942dd7b90f03f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.19

Release history Release notifications | RSS feed

This release

1.0.7 This release

2 release files

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page