Reclaim storage space when deleting a large dataset in hdf5 file


Is there anyway to reclaim the storage space when deleting a large datasets in HDF5 file.

I have read the file space management strategy in HDF5 but when i tried it didn’t worked. Can you please help me?


You can use h5repack to get rid of unused space in a file. h5repack is a command-line tool that comes with the binary distribution of HDF5. This page shows some of the things you can change in a file with the command-line tools:


Thanks bljones… But H5Repack utility is taking more time when I execute it. It depends on the file size. I believe It reads and writes it into a new file. Is there any default behaviour in HDF5, like if i delete a dataset in H5 file, it should automatically release the storage.