xdas.io.utils.compress#
- xdas.io.utils.compress(src_path: str, dst_path: str, dataset_location: str, encoding: dict)[source]#
Compress a specific dataset in an HDF5 file while preserving the rest of the file structure and metadata.
- Parameters:
src_path (str) – Path to the original .hdf5 file.
dst_path (str) – Path to save the compressed .hdf5 file.
dataset_location (str) – Path to the dataset to compress inside the HDF5 file.
encoding (dict) – Dictionary of encoding options for the dataset. Should contain the following keys: - ‘compression’: the compression algorithm to use and its parameters, part of the hdf5plugin library - ‘chunks’: the chunk size for the dataset, should be a tuple of integers, default to False for no chunking