jhdf
jhdf copied to clipboard
Files with paged chunk storage cannot be read
Describe the bug
Opening this file fails chunked_v4_datasets.hdf5.zip
Additional context Add any other context about the problem here, or possible solutions/workarounds.
Generate test file
import h5py
import numpy as np
def write_chunked_datasets(f):
data = np.arange(1024)
f.create_dataset('1024', data=data, dtype='i4', chunks=(1,))
f.create_dataset('1024_zip', data=data, dtype='i4', chunks=(1,), compression="gzip")
data = np.arange(1025)
f.create_dataset('1025', data=data, dtype='i4', chunks=(1,))
f.create_dataset('1025_zip', data=data, dtype='i4', chunks=(1,), compression="gzip")
f.flush()
f.close()
if __name__ == '__main__':
print('Making odd test files...')
f = h5py.File('test_paging_latest.hdf5', 'w', libver='latest')
write_chunked_datasets(f)
print('created test_paging_latest.hdf5')