This class implements the regular chunk grid for Zarr arrays. It manages reading from and writing to Zarr stores, using the codecs for data transformation.
Super classes
zarr_extension -> chunking -> chunk_grid_regular
Active bindings
codecsThe list of codecs used by the chunking scheme. These are set by the array when starting to use chunking for file I/O. Upon reading, the list of registered codecs.
Methods
Inherited methods
chunk_grid_regular$new()
Initialize a new chunking scheme for an array.
Usage
chunk_grid_regular$new(array_shape, chunk_shape)chunk_grid_regular$metadata_fragment()
Return the metadata fragment that describes this chunking scheme.
chunk_grid_regular$read()
Read data from the Zarr array into an R object. The read can
span multiple chunks. Reads will be parallelised if
future::plan(multisession) is set; by default the reading is
sequential.
chunk_grid_regular$write()
Write data to the array. Writing data always uses a sequential plan.
Arguments
dataAn R object with the same dimensionality as the Zarr array.
start, stopInteger vectors of the same length as the dimensionality of the Zarr array, indicating the starting and ending (inclusive) indices of the data along each axis. Ignored for a scalar array.
flushLogical, default is
TRUE. Should the chunks that have been written to be flushed to the store (TRUE), or should they be left stale for further writes to the same chunk (FALSE). Leaving the chunks stale for further writing leads to better performance when chunks are written to multiple times. Call theflush()method to persist data in stale chunks.