silx-kit / h5web

React components for data visualization and exploration
https://h5web.panosc.eu/
MIT License
161 stars 17 forks source link

Load compression plugins for virtual datasets with h5wasm #1662

Closed axelboc closed 3 weeks ago

axelboc commented 3 weeks ago

To address https://github.com/silx-kit/vscode-h5web/issues/43

Compression plugins required to read virtual datasets, which have compressed datasets as sources, are now loaded automatically in both H5WasmProvider and H5WasmLocalFileProvider.

h5wasm now exposes a virtual_sources array in the Metadata object, which I parse and store in our Dataset model. I then get the filters of every virtual source dataset located within the same file (file: '.') and load the corresponding compression plugins.

By storing the virtual sources in the Dataset model, we open the door to showing this information in the MetadataViewer in the future if the provider supports it.

image