numcodecs
A Python package providing buffer compression and transformation codecs for use in data storage and communication applications.
What it is and what it does
Numcodecs is a Python library for encoding and decoding data buffers using various compression and transformation algorithms. It sits between raw data and storage or transmission layers, allowing you to compress arrays and binary data efficiently. The package wraps multiple codec implementations and provides a consistent interface for applying them.
Typically used in data science and storage applications where you need to reduce data size or apply reversible transformations before persisting or transmitting arrays. It depends on numpy for array handling and typing_extensions for type hints, and supports modern Python versions from 3.11 onward. The library is actively maintained and available as precompiled wheels for common platforms.
Use it for:
- Compress large numerical arrays before writing to disk in data pipelines
- Apply reversible data transformations in zarr-based storage systems
- Reduce network bandwidth when transmitting binary data between services
- Implement custom codec chains for specialized data encoding workflows
- Integrate compression into HDF5 or other hierarchical data formats
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Numcodecs provides buffer compression and transformation codecs for efficient data storage and communication, with support for multiple compression algorithms and data transformations.
Yes. Numcodecs is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and ranks in the top 5000 PyPI packages by download volume. Medium install friction is acceptable for a compiled library. Install it if you need flexible buffer compression or data transformation codecs in storage or communication applications.
Install
numcodecs on PyPI
pip
pip install numcodecsuv
uv add numcodecspoetry
poetry add numcodecsInstalling numcodecs
Before you install
Medium install friction due to compiled wheels for multiple Python versions and platforms. Active maintenance with recent commits; last release 266 days ago and repository shows ongoing development.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
pip install numcodecs
import numcodecs
codec = numcodecs.Blosc(cname='zstd', clevel=5)
compressed = codec.encode(data)
decompressed = codec.decode(compressed)
Requires Python 3.11 or later; numpy and typing_extensions are runtime dependencies.
Verify before relying
- Specific compression algorithms and codecs available beyond what the fact sheet describes
- Performance characteristics or compression ratio benchmarks for different codec types
- Integration patterns with zarr or other storage systems mentioned in repository URL
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 2 — numpy, typing_extensions |
| Maintenance | actively maintained — 266 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 9,611,399/month — #1,518 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: numcodecs-0.16.5-cp311-cp311-macosx_10_13_x86_64.whl; numcodecs-0.16.5-cp311-cp311-macosx_11_0_arm64.whl; numcodecs-0.16.5-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; numcodecs-0.16.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; numcodecs-0.16.5-cp311-cp311-win_amd64.whl; numcodecs-0.16.5-cp312-cp312-macosx_10_13_x86_64.whl; numcodecs-0.16.5-cp312-cp312-macosx_11_0_arm64.whl; numcodecs-0.16.5-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; numcodecs-0.16.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; numcodecs-0.16.5-cp312-cp312-win_amd64.whl; numcodecs-0.16.5-cp313-cp313-macosx_10_13_x86_64.whl; numcodecs-0.16.5-cp313-cp313-macosx_11_0_arm64.whl; numcodecs-0.16.5-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; numcodecs-0.16.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; numcodecs-0.16.5-cp313-cp313-win_amd64.whl; numcodecs-0.16.5-cp314-cp314-macosx_10_13_x86_64.whl; numcodecs-0.16.5-cp314-cp314-macosx_11_0_arm64.whl; numcodecs-0.16.5-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; numcodecs-0.16.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; numcodecs-0.16.5-cp314-cp314-win_amd64.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
ebcdicRegisters additional EBCDIC character encoding…
permissive · top 5,000 on PyPI
pylercpylerc encodes and decodes raster image data…
permissive · top 15,000 on PyPI
pcodecPcodec compresses and decompresses numerical…
unclear · top 15,000 on PyPI
descript-audio-codecCompresses audio into discrete codes at 8 kbps…
permissive · top 15,000 on PyPI
partdPartd is a key-value byte store that appends…
permissive · top 1,000 on PyPI
encodecEnCodec is a neural audio codec that compresses…
noncommercial · top 15,000 on PyPI
pynvvideocodecPyNvVideoCodec provides hardware-accelerated…
permissive · top 15,000 on PyPI
pyasn1Pyasn1 encodes and decodes ASN.1 data…
permissive · top 100 on PyPI
simplejpegEncodes and decodes JPEG images directly to and…
permissive · top 15,000 on PyPI