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.1.0.tar.gz (7.5 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.1.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for uncompresspy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 82b0f2f7f333fd16a62c2488481c0fc172972e8a32ca1ef396a380fe10ee6c12
MD5 4a7ed71a65cc61685aaa86f9ee83fef0
BLAKE2b-256 f3b80baa01352e20b664e9ee2badd7b66e44a74b41b5ce0bce95dda6bf15d428

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uncompresspy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.8 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 df5b08f52fc10022d28e666b21598c686266414e47c3e910c9ac7bf4c6f3ab27
MD5 2102e1735feb9a74fabcdd9fd28fff68
BLAKE2b-256 6f6232858f57d8eff0cc28d0be0b5064cd3370ae71a2000dc46bf4aac0e31932

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