- blosc2.pack_array2(arr, chunksize=None, **kwargs)#
Pack (compress) a NumPy array. This is faster, and it does not have a 2 GB limitation.
out – The serialized version (cframe) of the array. If urlpath is provided, the number of bytes in file is returned instead.
- Return type:
bytes | int
>>> import numpy as np >>> a = np.arange(1e6) >>> cframe = blosc2.pack_array2(a) >>> len(cframe) < a.size * a.itemsize True