pyvista_zstd.read

Contents

pyvista_zstd.read#

pyvista_zstd.read(filename: Path | str, n_threads: int | None = None, *, backend: str | None = None) DataSet#

Decompress a pyvista-zstd file.

This is a convenience function that uses Reader. Use that class to finely tune reading in a file.

Parameters:
filenamepathlib.Path | str

Path to the file.

n_threadsNone | int, optional

Workers to spread the frames over. If omitted, the count is chosen from the total size being decompressed. -1 uses all available cores and 0 disables multi-threading. Frames are independent, so this changes how long the read takes and nothing about its result.

backendstr, optional

Deprecated and ignored; passing it raises a DeprecationWarning.

Returns:
pyvista.DataSet
Raises:
pyvista.LocalFileRequiredError

If filename is a remote URI. When called via pyvista.read(), this triggers an automatic download and retry with a local path.

Examples

>>> import pyvista_zstd
>>> ds = pyvista_zstd.read("dataset.pv")