@@ -9,8 +9,11 @@ in the following ways:
99Custom codecs
1010-------------
1111
12- There are three types of codecs in Zarr: array-to-array, array-to-bytes, and bytes-to-bytes.
13- Array-to-array codecs are used to transform the n-dimensional array data before serializing
12+ There are three types of codecs in Zarr:
13+ - array-to-array
14+ - array-to-bytes
15+ - bytes-to-bytes.
16+ Array-to-array codecs are used to transform the array data before serializing
1417to bytes. Examples include delta encoding or scaling codecs. Array-to-bytes codecs are used
1518for serializing the array data to bytes. In Zarr, the main codec to use for numeric arrays
1619is the :class: `zarr.codecs.BytesCodec `. Bytes-to-bytes transform the serialized bytestreams
@@ -32,7 +35,7 @@ Custom codecs should also implement the following methods:
3235- ``compute_encoded_size ``, which returns the byte size of the encoded data given the byte
3336 size of the original data. It should raise ``NotImplementedError `` for codecs with
3437 variable-sized outputs, such as compression codecs.
35- - ``validate ``, which can be used to check that the codec metadata is compatible with the
38+ - ``validate `` (optional) , which can be used to check that the codec metadata is compatible with the
3639 array metadata. It should raise errors if not.
3740- ``resolve_metadata `` (optional), which is important for codecs that change the shape,
3841 dtype or fill value of a chunk.
@@ -65,7 +68,7 @@ multiple codecs, the :mod:`zarr.core.config` mechanism can be used to select the
6568implementation.
6669
6770.. note ::
68- This sections explains how custom codecs can be created for Zarr version 3. For Zarr
71+ This section explains how custom codecs can be created for Zarr version 3 data . For Zarr
6972 version 2, codecs should subclass the
7073 `numcodecs.abc.Codec <https://numcodecs.readthedocs.io/en/stable/abc.html#numcodecs.abc.Codec >`_
7174 base class and register through
0 commit comments