enstools.encoding.api.DatasetEncoding

class enstools.encoding.api.DatasetEncoding(dataset: Dataset, compression: str | Dict[str, str] | Path | None)

Class to encapsulate compression specification parameters corresponding to a full dataset. The kind of encoding that xarray expects is a mapping between the variables and their corresponding h5py encoding.

Methods

add_metadata()

Add the corresponding compression metadata to the dataset.

chunk(encodings[, chunk_memory_size])

Add a variable "chunksizes" to each variable encoding with the corresponding

encoding()

Generate the encoding dictionary for all variables in the dataset.

get(k[,d])

get_a_single_compression_string(compression)

Converts the compression parameter into a single compression specification string.

items()

keys()

values()

__init__(dataset: Dataset, compression: str | Dict[str, str] | Path | None)

Methods

__init__(dataset, compression)

add_metadata()

Add the corresponding compression metadata to the dataset.

chunk(encodings[, chunk_memory_size])

Add a variable "chunksizes" to each variable encoding with the corresponding

encoding()

Generate the encoding dictionary for all variables in the dataset.

get(k[,d])

get_a_single_compression_string(compression)

Converts the compression parameter into a single compression specification string.

items()

keys()

values()