Skip to contents

The "fixedscaleoffset" filter encodes data as round((x - offset) * scale), typically in a smaller integer data type. Decoding computes x / scale + offset, truncated towards zero when the decoded data type is an integer type, like Numpy does.

Super classes

zarr_extension -> zarr_codec -> zarr_filter -> zarr_filter_fixedscaleoffset

Methods

Inherited methods


zarr_filter_fixedscaleoffset$new()

Create a new "fixedscaleoffset" filter.

Usage

zarr_filter_fixedscaleoffset$new(configuration)

Arguments

configuration

A list with elements scale, offset, dtype and, optionally, astype.

Returns

An instance of this class.


zarr_filter_fixedscaleoffset$decode()

Decode the data.

Usage

zarr_filter_fixedscaleoffset$decode(data)

Arguments

data

The encoded data.

Returns

The decoded data.