unlzw3
Pure Python decompression module for .Z files compressed using Unix compress utility
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 unlzw3uv
uv add unlzw3poetry
poetry add unlzw3Installing 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
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
ncompressProvides LZW compression and decompression…
permissive · top 15,000 on PyPI
python-neo-lzfProvides fast compression and decompression of…
permissive · top 15,000 on PyPI
compressed-rtfCompresses and decompresses Rich Text Format…
permissive · top 5,000 on PyPI
lzfsePython bindings for the LZFSE reference…
permissive · top 5,000 on PyPI
lzstringCompresses and decompresses text using the…
permissive · top 15,000 on PyPI
python-lzfProvides Python bindings to the liblzf…
permissive · top 15,000 on PyPI
lzallrightlzallright provides Python bindings to compress…
permissive · top 15,000 on PyPI
pylzsspylzss decodes and encodes data compressed with…
copyleft · top 15,000 on PyPI
brotlicffiProvides Python CFFI bindings to the Brotli…
permissive · top 5,000 on PyPI
py7zrpy7zr is a pure-Python library for reading,…
copyleft · top 5,000 on PyPI