I am currently compressing a numpy array using blosc with the following:
view = memoryview(large_np_arr)
compressed = blosc.compress(view, typesize=8)
and decompressing like so:
decompressed = blosc.decompress(compressed_view)
decompressed_arr = np.frombuffer(decompressed, dtype=np.float64)
np.frombuffer() returns a 1-d array. Is there anyway or standard pattern for including the array's metadata (e.g. shape, type) in the compressed view?
[I know there is blosc.pack_array(), but this make a copy of the data when pickling, which I would like to avoid.]