---
title: "Supported Zarr features in Rarr"
date: "`r BiocStyle::doc_date()`"
package: "`r BiocStyle::pkg_ver('Rarr')`"
vignette: >
  %\VignetteIndexEntry{"Supported Zarr features in Rarr"}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
output:
  BiocStyle::html_document
---

```{css, echo=FALSE}
.main-container {
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
}
```

## Zarr version

Rarr supports both Zarr version 2 and Zarr version 3.

## Reading and Writing

Reading Zarr arrays is reasonably well supported. Writing is available, but is more limited.  Both aspects are under active development.

### Stores

| Store Type       | Status<br/>(reading / writing) | Notes |
|------------------|:------------------------------:|-------|
|`FilesystemStore` | &#x2714; / &#x2714;            |       |
|`S3Store`         | &#x2714; / &#x274C;            | Read more in the [S3 vignette](vignettes/S3.html) |

### Data Types

Currently there is only support for reading and writing a subset of the possible datatypes
that can be found in a Zarr array.  In some instances there are also limitations on the
datatypes natively supported by R, requiring conversion from the Zarr datatype.  The table below summarises the current status of
datatype support.  It will be updated as progress is made.

| Zarr Data Type | Status<br/>(reading / writing) | Notes |
|----------------|:------------------------------:|-------|
|`boolean`       | &#x2714; / &#x2714;            | (via `{grumpy}`) |
|`int8`          | &#x2714; / &#x2714;            | (via `{grumpy}`) |
|`uint8`         | &#x2714; / &#x2714;            | (via `{grumpy}`) |
|`int16`         | &#x2714; / &#x2714;            | (via `{grumpy}`) |
|`uint16`        | &#x2714; / &#x2714;            | (via `{grumpy}`) |
|`int32`         | &#x2714; / &#x2714;            | (via `{grumpy}`) |
|`uint32`        | &#x2714; / &#x2714;            | (via `{grumpy}`) |
|`int64`         | &#x2714; / &#x2714;            | (via `{grumpy}`) |
|`uint64`        | &#x2714; / &#x2714;            | (via `{grumpy}`) |
|`half` / `float16`   | &#x2714; / &#x274C; | (via `{grumpy}`) |
|`single` / `float32` | &#x2714; / &#x2714; | (via `{grumpy}`) |
|`double` / `float64` | &#x2714; / &#x2714; | (via `{grumpy}`) |
|`complex`            | &#x274C; / &#x274C; | |
|`timedelta`          | &#x274C; / &#x274C; | |
|`datetime`           | &#x274C; / &#x274C; | |
| V2 `string`             | &#x2714; / &#x2714; | (via `{grumpy}`) |
| V3 `null_terminated_bytes` | &#x2714; / &#x2714; | (via `{grumpy}`) |
| V2 `Unicode`            | &#x2714; / &#x2714; | (via `{grumpy}`) |
| V3 `fixed_length_utf32` | &#x2714; / &#x2714; | (via `{grumpy}`) |
|`void *`             | &#x274C; / &#x274C; | |
| V2 structured data types | &#x2714; / &#x274C; | (via `{grumpy}`) |
| V3 structured data types | &#x2714; / &#x274C; | This type is superseded by V3 struct data types.and the specification says implementation MUST NOT implement writing. (via `{grumpy}`) |
| V3 struct data types | &#x2714; / &#x274C; | (via `{grumpy}`) |

### Codecs

#### Compression codecs

| Library     | Status<br/>(reading / writing) | Notes |
|-------------|:-------------------:|-------|
|`zlib / gzip`| &#x2714; / &#x2714; | |
|`bzip2`      | &#x2714; / &#x2714; | |
|`blosc`      | &#x2714; / &#x2714; | |
|`LZMA `      | &#x2714; / &#x2714; | |
|`LZ4`        | &#x2714; / &#x2714; | |
|`Zstd`       | &#x2714; / &#x2714; | |

Please open an [issue](https://github.com/Huber-group-EMBL/Rarr/issues) if support for a required compression codec is missing.

#### Other codecs

| Codec     | Status<br/>(reading / writing) | Notes |
|-----------|:------------------------------:|-------|
|`endian`   | &#x2714; / &#x274C;            | (via `{grumpy}`) |
|`transpose`| &#x2714; / &#x2714;            |       |
|`VLen-UTF8`| &#x2714; / &#x2714; *          | Writing supported only via `update_zarr_array()` |
|`sharding_indexed` | &#x2714; / &#x274C;    |  |

### Optional fields or features

| Feature    | Status<br/>(reading / writing) | Notes |
|------------|:------------------------------:|-------|
|`dimension_names` | &#x2714; / &#x2714; | Corresponds to `names(dimnames(x))` in R |
