Skip to contents

The "categorize" filter encodes character strings as the 1-based index into a vector of labels. Strings that are not a label are encoded as 0, which decodes to an empty string, like with Numcodecs.

Super classes

zarr_extension -> zarr_codec -> zarr_filter -> zarr_filter_categorize

Methods

Inherited methods


zarr_filter_categorize$new()

Create a new "categorize" filter.

Usage

zarr_filter_categorize$new(configuration)

Arguments

configuration

A list with elements labels, dtype and, optionally, astype.

Returns

An instance of this class.


zarr_filter_categorize$decode()

Decode the data.

Usage

zarr_filter_categorize$decode(data)

Arguments

data

The encoded data.

Returns

A character vector with the decoded data.