Skip to main content

Pure Python decompression module for .Z files compressed using Unix compress utility

Project description

unlzw3

ci PyPi Download stats

Pure Python decompression module for .Z files compressed using Unix compress utility. Unlike the faster but Linux-specific unlzw using Python CFFI, unlzw3 is slower but works on any platform that runs Python including Windows.

This is a purely Python adaptation of Mark Adler's 'unlzw' C function on Stackoverflow. Python can be much slower than using any compiled utility for the same purpose.

Usage

unlzw3.unlzw(data) takes LZW .Z compressed data as any type which can be converted to a bytearray (generally a string). It returns a UTF-8 decoded string containing the decompressed data.

import unlzw3
from pathlib import Path

uncompressed_data = unlzw3.unlzw(Path('file.Z').read_bytes())

# or

uncompressed_data = unlzw3.unlzw(Path('file.Z'))

Contributions

  • reference C code: Mark Adler
  • pure Python implemetation: Brandon Owen
  • modernization, test / CI and PyPi: Michael Hirsch

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

unlzw3-0.2.3.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

unlzw3-0.2.3-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file unlzw3-0.2.3.tar.gz.

File metadata

  • Download URL: unlzw3-0.2.3.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for unlzw3-0.2.3.tar.gz
Algorithm Hash digest
SHA256 ede5d928c792fff9da406f20334f9739693327f448f383ae1df1774627197bbb
MD5 dc81be3d2626567b50241b611df1c4b7
BLAKE2b-256 08f172b313366285263aaba21a17714fbef597d7662a8737a928b2b4784eb46e

See more details on using hashes here.

Provenance

The following attestation bundles were made for unlzw3-0.2.3.tar.gz:

Publisher: publish-python-package.yml on scivision/unlzw3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file unlzw3-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: unlzw3-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for unlzw3-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7760fb4f3afa1225623944c061991d89a061f7fb78665dbc4cddfdb562bb4a8b
MD5 5410ab8f100e1f6dc0058902ad492269
BLAKE2b-256 4dfb617af9b317ac75f5663285d3a3cc38903a76d63c6e7397768307545f4ff4

See more details on using hashes here.

Provenance

The following attestation bundles were made for unlzw3-0.2.3-py3-none-any.whl:

Publisher: publish-python-package.yml on scivision/unlzw3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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