skillfed

unlzw3

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

unlzw3 v0.2.3 328.9K downloads/30d#7,552 on PyPI
Permissive license DORMANT released

What it is and what it does

unlzw3 is a pure Python decompressor for .Z files created by the Unix compress utility. It takes LZW-compressed binary data and returns a UTF-8 decoded string of the decompressed contents. Because it is written entirely in Python rather than wrapping compiled C code, it runs on any platform Python supports—including Windows—but at the cost of being slower than native utilities or CFFI-based alternatives.

The package has no runtime dependencies and installs with low friction. It is maintained sporadically (last release December 2024 after a 602-day gap), so it is suitable for stable, occasional use rather than active development. The implementation is based on Mark Adler's reference C code and has been modernized with testing and PyPI packaging.

Use it for:

  • Decompress legacy .Z archives on Windows or macOS where native compress utilities are unavailable
  • Read .Z-compressed data in a Python script without requiring system-level utilities or external C libraries
  • Process archived datasets in .Z format as part of a data pipeline on any supported Python platform
  • Integrate .Z decompression into a portable Python application without platform-specific build steps

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Decompresses .Z files (Unix compress format) using pure Python, working cross-platform without compiled dependencies.

Yes, if you need to read .Z files and cannot rely on platform-specific tools or compiled alternatives. The pure Python implementation trades speed for portability and zero dependencies. No known security issues. Suitable for occasional use; dormant maintenance means no active development but also no churn.

Install

unlzw3 on PyPI

pip

pip install unlzw3

uv

uv add unlzw3

poetry

poetry add unlzw3

Installing unlzw3

Before you install

Low friction install with no runtime dependencies. Dormant maintenance (602 days since last release) but recent release on 2024-12-20 suggests occasional updates.

License in practice

MIT license (permissive) allows free use, modification, and distribution with minimal restrictions.

Quickstart

import unlzw3
from pathlib import Path

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

Requires Python 3.9 or later

Verify before relying

  • Performance characteristics compared to platform-specific alternatives for large files
  • Whether UTF-8 decoding assumption matches all real-world .Z file contents

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance dormant — 602 days since the last release
First released
Downloads 328,872/month — #7,552 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: unlzw3-0.2.3-py3-none-any.whl

Keywords: lzw

Development Status :: 4 - BetaEnvironment :: ConsoleLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Topic :: System :: Archiving :: CompressionTopic :: Utilities

Tags

.Z file decompressionunix compress decompressorlzw decompression pythondecompress .Z filescross-platform z file reader
compressioncross-platformlegacy-format

More Utilities packages