What Is Blosc2?
Blosc2 is a high-performance meta-compressor, open data container format, and compressed compute engine optimized for binary data. As the successor to the original Blosc library, it is designed for speed by leveraging multi-threading and SIMD instructions (SSE2, AVX2, AVX512, NEON, ALTIVEC). It uses a blocking technique to divide datasets into blocks that fit in CPU caches, dramatically reducing memory bus activity and breaking down memory walls.
With a large diversity of lossless and lossy codecs and filters, Blosc2 lets developers fine-tune the balance between compression speed and ratio. It is a mature, BSD-licensed open-source project seeing 2–4 million monthly downloads in Python, and is integrated into foundational scientific and AI tools including PyTables, h5py (via hdf5plugin), Zarr, and deep-learning pipelines such as DKFZ's nnU-Net.
Watch this introductory video to learn more about the foundations of Blosc2:
Core Compression & Storage
-
Optimized for Binary Data: Uses shuffle, bit-shuffle, byte-delta, and precision-truncation (
TRUNC_PREC,INT_TRUNC) filters that leverage data type information to improve compression ratios, with minimal overhead (max 32 bytes per chunk) on non-compressible data. Supports both lossless and lossy compression, including ZFP for multidimensional data and Grok/OpenHTJ2K (JPEG 2000) for scientific imaging. -
Multi-platform C Core: Written in C (C-Blosc2 3.x) for Linux, macOS, Windows, and WebAssembly (WASM), with rich Python bindings and smart thread scheduling that eliminates unnecessary parallel startup overhead on small compression requests.
-
Large Persistent Containers: Supports datasets up to 2^59 bytes (1/2 exabyte) via 64-bit super-chunks, backward-compatible variable-length super-chunks, memory-mapped (
mmap) access, and Frames for serializing data in memory or on disk.
Modern Data Containers
-
Multi-Dimensional Arrays (
NDim/NDArray): Native support for n-dimensional datasets through its NDim container, using a two-level partitioning scheme (chunks and blocks) for fast slicing—even on sparse datasets—along with near-NumPy fancy indexing, compressed transposition, and concatenation.
-
Columnar Tables (
CTable) & Indexed Queries: CTable is a compressed columnar table built onNDArrayandListArray, supporting typed schemas, nullable columns, Arrow-compatibleutf8()strings, nested lists/structs, virtual and materialized columns, and zero-copy mask-basedwhere()views. Automatic block-level min/max statistics and explicit indexes (FULL,BUCKET,PARTIAL) prune irrelevant blocks so selective queries in.b2zfiles dramatically cut both I/O and CPU work.
-
Hierarchical Stores (
TreeStore/.b2z): Organize multiple arrays, tables, indexes, and variable-length metadata (vlmeta) in a filesystem-like hierarchy via TreeStore, stored in compact single-file.b2zarchives or.b2ddirectories.
Computing Directly on Compressed Data
-
High-Speed Lazy Compute Engine: Python-Blosc2 is far more than a compression wrapper. Its lazy evaluation engine—accelerated by
miniexprin Python-Blosc2 4.0—streams cache-sized blocks directly through the CPU without decompressing entire datasets into RAM. It supports broadcasting, reductions, cumulative operations, out-of-core linear algebra (matmulandtensordot), and persistent lazy expressions saved on disk. -
Universal Compute Backend: Using
blosc2.evaluate()andlazyexpr, the same out-of-core compute engine operates directly across NumPy, HDF5, Zarr, Xarray, and TileDB arrays—even mixing formats in a single expression—and can also serve as a JIT engine for pandas (engine=blosc2.jit).
Ecosystem Interoperability & Cloud Access
-
Array & Tabular Standards: Python-Blosc2 aligns closely with the Python Array API and implements the Arrow PyCapsule protocol, enabling DuckDB, Polars, pandas 3+, and PyArrow to stream data directly from compressed
CTablefiles without conversion—and allowing zero-friction ingestion viaCTable.from_arrow()andfrom_csv(). -
Unified Local & Remote Interface:
blosc2.open()provides a single streaming and persistent local-caching (cache_dir) interface across local and remote Parquet, Zarr, HDF5, PyTables, and native Blosc2 datasets over HTTP, S3, or anyfsspecfilesystem. Queries fetch only the chunks or row groups they touch and automatically leverage persisted remote indexes without full downloads. -
Cloud-Native Services: Blosc2 also supports accessing cloud data directly via
C2Array, the Caterva2 library, or Cat2Cloud, enabling efficient remote analysis without downloading entire datasets locally.
|
|
Open, Extensible, and Evolving
-
Open Format & Dynamic Plugins: Blosc2 is an open, fully documented format, ensuring you are never locked into a proprietary solution. You can register custom codecs and filters as dynamic plugins—such as the OpenZL codec plugin—while Btune uses machine learning to automatically select optimal compression parameters for your data.
-
Hardening C-Blosc2 (Sovereign Tech Agency Roadmap): Backed by a €286,000 award from the Sovereign Tech Agency, we are bringing Blosc2's advanced capabilities directly into the foundational C-Blosc2 library: formal open binary RFC specifications, native C containers (
DictStore,EmbedStore,CTable), embedded zero-dependencyminiexprcomputation, intelligent slicing and chunk pruning, built-in data encryption, continuous OSS-Fuzz/security hardening, and open governance through the reactivated Blosc Steering Council—making the full Blosc2 stack natively accessible from C/C++, Rust, Julia, Go, and WebAssembly.
For full technical plans, please refer to our C-Blosc2 ROADMAP.
Get Involved
The home for all Blosc-related libraries is on GitHub. You can download the source code, file tickets, ask questions, and contribute to the project there.
- GitHub: https://github.com/Blosc
- C-Blosc2 Documentation: https://www.blosc.org/c-blosc2/c-blosc2.html
- Python-Blosc2 Documentation: https://www.blosc.org/python-blosc2/python-blosc2.html
- PyData Global 2025 Tutorial: Notebooks and Video Recording
- GitHub Discussions: https://github.com/Blosc/python-blosc2/discussions
Stay informed about the latest developments by following us on our social networks:
- LinkedIn: https://www.linkedin.com/company/blosc
- Mastodon: https://fosstodon.org/@Blosc2
- BlueSky: https://bsky.app/profile/blosc.org
- Mailing List: http://groups.google.com/group/blosc
Support Blosc for a Sustainable Future
Blosc is the result of countless hours of effort by dedicated developers and the generous backing of organizations like NumFOCUS, ironArray SLU, and the Sovereign Tech Agency. Financial contributions are critical for the long-term sustainability of open-source projects like Blosc.
Your support helps us continue development, maintenance, and innovation. Here are some ways you can contribute financially:
- NumFOCUS: Blosc is a fiscally sponsored project of NumFOCUS, a nonprofit supporting open-source scientific computing.
- ironArray: ironArray SLU drives Blosc2 development and offers commercial support and consulting services.
- GitHub Sponsorship: You can support us directly by clicking the "Sponsor" button on GitHub.
Thank you for helping us build a sustainable future for the Blosc ecosystem!
-- The Blosc Development Team

