jhdf icon indicating copy to clipboard operation
jhdf copied to clipboard

Files with paged chunk storage cannot be read

Open jamesmudd opened this issue 3 years ago • 1 comments

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.

jamesmudd avatar Jun 16 '21 19:06 jamesmudd

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')

jamesmudd avatar Jun 16 '21 19:06 jamesmudd