Compression is very easy to use in h5py. Check out the Wiki HowTo and Compression tutorials. Basically, it will be something like:
ds = myfile.create_dataset('ds', shape, dtype, compression='lzf')
There are also some problems with the way you select block sizes to optimize file / access size, see the compression guide I'm associated with.
I don’t remember which compression, if any, is enabled by default.
source
share