skillfed

pcodec

Good compression for numerical sequences

pcodec v1.0.3 120.4K downloads/30d#12,027 on PyPI495
License unclear Active released

What it is and what it does

Pcodec is a Python binding to a Rust-based codec designed specifically for compressing numerical sequences. It takes numpy arrays, applies a specialized compression algorithm tuned for numerical data patterns, and produces a byte string that can be decompressed back to the original array. The package exposes a minimal API: `simple_compress()` and `simple_decompress()` functions that handle the core workflow, plus configuration options via `ChunkConfig`.

The package depends only on numpy and is distributed as precompiled wheels for modern Python versions (3.10–3.12) across common platforms. Maintenance is active, with recent releases and repository commits. However, the license status is undeclared in the package metadata, which is a significant gap for adoption in commercial or legally sensitive contexts.

Use it for:

  • Compress large numpy arrays of floating-point or integer data for storage or transmission.
  • Reduce memory footprint of time-series or sensor data in data pipelines.
  • Archive numerical datasets with better compression than generic algorithms.
  • Embed numerical compression in scientific computing workflows that already use numpy.
  • Benchmark or compare specialized numerical codecs against standard compression libraries.

Worth the install?

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

Pcodec compresses and decompresses numerical sequences using a specialized codec optimized for numerical data, exposing a simple Python API backed by Rust.

Yes, with conditions. Install if you need specialized compression for numerical sequences and can verify the license terms in the repository. The package is actively maintained, has no known vulnerabilities, and offers a clean API. However, the undeclared license is a blocker for any project with legal compliance requirements; resolve that first. Also confirm that Python 3.10–3.12 wheels cover your deployment targets.

Install

pcodec on PyPI

pip

pip install pcodec

uv

uv add pcodec

poetry

poetry add pcodec

Installing pcodec

Before you install

Medium install friction due to compiled wheels; prebuilt binaries available for Python 3.10–3.12 across macOS, Linux (x86_64, ARM, ARMv7, i686), and Windows. Active maintenance with a release 13 days old and recent commits.

License in practice

License status is unclear—no SPDX identifier or raw license text is declared in package metadata. Verify the actual license terms in the repository before adopting in proprietary or copyleft-sensitive projects.

Quickstart

import numpy as np
from pcodec import standalone, ChunkConfig

nums = np.random.normal(size=1000000)
compressed = standalone.simple_compress(nums, ChunkConfig())
recovered = standalone.simple_decompress(compressed)

Requires numpy; compiled extension wheels are provided for Python 3.10–3.12 only.

Verify before relying

  • Actual license terms and conditions—metadata declares neither SPDX nor raw license text.
  • Python version support beyond 3.10–3.12 (wheels not listed for 3.9 or 3.13+).
  • Compression ratio and speed benchmarks relative to standard codecs (zlib, lz4, etc.).
  • Whether lossless recovery is guaranteed for all numerical types or only specific dtypes.

Package facts

License not declared (unclear)
Python support not specified
Install friction medium — platform-specific wheel
Runtime dependencies 1 — numpy
Maintenance actively maintained — 13 days since the last release
Last repo commit
First released
Downloads 120,385/month — #12,027 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pcodec-1.0.3-cp310-cp310-macosx_10_12_x86_64.whl; pcodec-1.0.3-cp310-cp310-macosx_11_0_arm64.whl; pcodec-1.0.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; pcodec-1.0.3-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; pcodec-1.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pcodec-1.0.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl; pcodec-1.0.3-cp310-cp310-win_amd64.whl; pcodec-1.0.3-cp311-cp311-macosx_10_12_x86_64.whl; pcodec-1.0.3-cp311-cp311-macosx_11_0_arm64.whl; pcodec-1.0.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; pcodec-1.0.3-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; pcodec-1.0.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pcodec-1.0.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl; pcodec-1.0.3-cp311-cp311-win_amd64.whl; pcodec-1.0.3-cp312-cp312-macosx_10_12_x86_64.whl; pcodec-1.0.3-cp312-cp312-macosx_11_0_arm64.whl; pcodec-1.0.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; pcodec-1.0.3-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; pcodec-1.0.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pcodec-1.0.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl

Keywords: compression, numerical

Tags

numerical data compressioncompress numpy arrayscodec for time serieslossless numerical compressionsequence compression libraryfast array compressionnumpy compression codec
compressionnumerical-datarust-binding

More Scientific/Engineering packages