Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

unlzw3

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unlzw3

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

  • 0.2.2
  • PyPI
  • Socket score

Maintainers
1

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

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc