The Zarr "bytes" codec encodes an R data object to a raw byte string, and decodes a raw byte string to a R object, possibly inverting the endianness of the data in the operation.
Super classes
zarr::zarr_extension -> zarr::zarr_codec -> zarr_codec_bytes
Active bindings
endianSet or retrieve the endianness of the storage of the data with this codec. A string with value of "big" or "little".
Methods
Inherited methods
Method new()
Create a new "bytes" codec object.
Usage
zarr_codec_bytes$new(data_type, chunk_shape, configuration = NULL)Arguments
data_typeThe zarr_data_type instance of the Zarr array that this codec is used for.
chunk_shapeThe shape of a chunk of data of the array, an integer vector.
configurationOptional. A list with the configuration parameters for this codec. The element
endianspecifies the byte ordering of the data type of the Zarr array. A string with value "big" or "little". If not given, the default endianness of the platform is used.
Method encode()
This method writes an R object to a raw vector in the data
type of the Zarr array. Prior to writing, any NA values are assigned
the fill_value of the data_type of the Zarr array. Note that the
logical type cannot encode NA in Zarr and any NA values are set to
FALSE.