[ANN] python-blosc 1.0.1, a wrapper for the Blosc compression library

Francesc Alted faltet at pytables.org
Fri Oct 1 19:20:59 CEST 2010

 Announcing python-blosc 1.0.1
 A Python wrapper for the Blosc compression library

What is it?

Blosc (http://blosc.pytables.org) is a high performance compressor
optimized for binary data.  It has been designed to transmit data to
the processor cache faster than the traditional, non-compressed,
direct memory fetch approach via a memcpy() OS call.

Blosc works well for compressing numerical arrays that contains data
with relatively low entropy, like sparse data, time series, grids with
regular-spaced values, etc.

This is a Python package that wraps it.

What is new?

Everything.  This is the first public version of the Python wrapper
for Blosc (1.1.1).  It supports Python 2.6, 2.7 and 3.1.

The API is very simple and it loosely follows that of the zlib module.
There are two basic functions, `compress()` and `decompress()`, as
well as two additional calls specific for compressing NumPy arrays,
namely `pack_array()` and `unpack_array`.  There are also utilities
for changing dynamically the number of threads used or to release
resources when you are not going to need blosc for a while.

Basic Usage

>>> import numpy as np
>>> a = np.linspace(0, 100, 1e7)
>>> bytes_array = a.tostring()
>>> import blosc
>>> bpacked = blosc.compress(bytes_array, typesize=8)
>>> bytes_array2 = blosc.decompress(bpacked)
>>> print(bytes_array == bytes_array2)

More examples are available on python-blosc wiki page:



Please refer to docstrings.  Start by the main package:

>>> import blosc
>>> help(blosc)

and ask for more docstrings in the referenced functions.

Download sources

Go to:


and download the most recent release from here.

Blosc is distributed using the MIT license, see LICENSES/BLOSC.txt for

Mailing list

There is an official mailing list for Blosc at:

blosc at googlegroups.com


  **Enjoy data!**

Francesc Alted

More information about the Python-announce-list mailing list