Skip to main content

Pure Python package for uncompressing LZW files (.Z), such as the ones created by Unix's shell tool compress

Project description

uncompresspy

uncompresspy is a pure Python package for uncompressing LZW files (.Z), such as the ones created by Unix's shell tool compress. It is available on PyPI for Python 3.10+.

Key features

While there are other Python packages for uncompressing LZW files, uncompresspy distinguishes itself from others on the following aspects:

  • It is implemented purely in Python and requires no external dependencies (thus fully cross-platform).
  • Full compatibility with all files created by compress (i.e., same output as uncompress).
  • Does not require holding the entire input file in memory (the file is read as necessary).
  • Faster than all other available pure Python implementations (compared to the next fastest you can expect a speedup of at least 1.5x in poorly compressed files, but upwards of 44x on extremely compressed files).
  • Allows partial/on-demand decompression and does not require holding the full decompressed stream in memory (only package to do so).
  • Provides a file-like interface (only package to do so).

Caveats

  • uncompresspy only provides an implementation for decompression, other packages may provide compression features.
  • Although extremely optimized, uncompresspy still lags behind C/C++ based implementations when decompressing most files, due to the inherent speed disadvantages of the language.
  • To speed up the decompression, uncompresspy stores dynamically-sized bytearrays in its dictionary, rather than the classic technique of building a stack and then reversing it. This means that in some scenarios (particularly highly compressed files) memory usage may be higher than in other packages (though this is usually offset by the other memory management techniques mentioned above).

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

uncompresspy-0.3.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uncompresspy-0.3.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file uncompresspy-0.3.0.tar.gz.

File metadata

  • Download URL: uncompresspy-0.3.0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for uncompresspy-0.3.0.tar.gz
Algorithm Hash digest
SHA256 d6b3acfde8dd03a3db2dad9e9c36a5b91d37d2bfa42a0990886ad8a176b8e395
MD5 a75606aab3276a78831e5a4f204be628
BLAKE2b-256 50886b44a4b8c6f81474989245c0fd79391df3406dc064de067a806bbed2eba5

See more details on using hashes here.

File details

Details for the file uncompresspy-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: uncompresspy-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for uncompresspy-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9b317ccf7e68cbb1b985a61de73b3f108cd002a9e5bfe683c559c196804be0da
MD5 ef30f3da86a84668f99ed98f7cac71db
BLAKE2b-256 7052f391fc3f21a2b614c7a9cd009a38f796531069ad982a8bc3bd0846fb6830

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