Socket
Socket
Sign inDemoInstall

ncompress

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ncompress

LZW compression and decompression


Maintainers
1

ncompress PyPI Build PyPI - Downloads

LZW compression and decompression in Python and C++.

Ported with minimal changes from the (N)compress CLI tool.

Installation

Wheels are available for Python 3.8+ and all operating systems on PyPI.

pip install ncompress

Usage

Functions compress() and decompress() are available with the following inputs/outputs:

  • bytesbytes
  • BytesIObytes
  • BytesIO, BytesIONone
  • bytes, BytesIONone

The BytesIO-based functions are slightly (about 15%) faster due to avoiding a copy of the contents on bytesstd::string conversion.

Authors

The core functionality has been adapted from vapier/ncompress.

License

All modifications and additions are released under the Unlicense.

The base (N)compress code has been released into the public domain.

The BytesIO wrapper in pystreambuf.h has been adapted from the cctbx project and is licensed under the Lawrence Berkeley National Labs BSD variant license. See the linked file for details.

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