I'm using np.savez_compressed() to compress and save a single large 4D NumPy array, but it uses only one CPU core. Is there an alternative, which can use many cores? Preferably something simple without need to code array split and compression of its pieces in multiple processes.
.npzformat is a ZIPed archive, which implies the compression algorithm is DEFLATE, aka LZ77, same asgzip/ zlib implement. It is possible to split data into blocks you compress separately with only a small loss of compression ratio, and still get a valid stream thatgunzipcan decompress (that's whatpigzdoes; zlib.net/pigz), so in theory it should be possible without breaking file-format compatibility.np.savez_compressed, rather than just 8x.