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

pcodec

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pcodec

Good compression for numerical sequences

  • 0.3.1
  • PyPI
  • Socket score

Maintainers
1
Pco logo: a pico-scale, compressed version of the Pyramid of Khafre in the palm of your hand

pypi.org

Pcodec Python API

Pcodec is a codec for numerical sequences. Example usage:

>>> from pcodec import standalone, ChunkConfig
>>> import numpy as np
>>> 
>>> np.random.seed(0)
>>> nums = np.random.normal(size=1000000)
>>> 
>>> # compress
>>> compressed = standalone.simple_compress(nums, ChunkConfig())
>>> print(f'compressed to {len(compressed)} bytes')
compressed to 6946258 bytes
>>> 
>>> # decompress
>>> recovered = standalone.simple_decompress(compressed)
>>> 
>>> np.testing.assert_array_equal(recovered, nums)

For pcodec's uses, design, and benchmarks, see the main repo.

At the moment, we don't have sphinx + a website set up, so run help(pcodec) (or whatever module name) in Python to read pcodec's documentation.

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