h5_inspect: Inspect HDF5 Dataset Creation Properties

View source: R/inspect.r

h5_inspectR Documentation

Inspect HDF5 Dataset Creation Properties

Description

Retrieves the Dataset Creation Property List (DCPL) details including storage layout, chunk dimensions, and a detailed list of all applied filters.

Usage

h5_inspect(file, name)

Arguments

file

The path to the HDF5 file.

name

The full path of the dataset to inspect.

Value

An object of class inspect (a named list) containing:

layout

A string indicating storage layout (e.g., "chunked", "contiguous").

chunk_dims

A numeric vector of chunk dimensions, or NULL if not chunked.

filters

A list describing each filter applied.

Examples

file <- tempfile(fileext = ".h5")

compress <- h5_compression('lz4-9', int_packing = TRUE, checksum = TRUE)
h5_write(matrix(5001:5100, 10, 10), file, "packed_mtx", compress = compress)
h5_inspect(file, "packed_mtx")

mtx <- matrix(rnorm(1000), 100, 10)
h5_write(mtx, file, "float_mtx", compress = 'blosc2-zfp-prec-3')
res <- h5_inspect(file, "float_mtx")
print(res)

# Print the raw cd_values for blosc2
dput(res$filters[[1]]$cd_values)

unlink(file)

h5lite documentation built on May 19, 2026, 1:07 a.m.