zarr.codecs.numcodecs
=====================

.. py:module:: zarr.codecs.numcodecs


Classes
-------

.. autoapisummary::

   zarr.codecs.numcodecs.Adler32
   zarr.codecs.numcodecs.AsType
   zarr.codecs.numcodecs.BZ2
   zarr.codecs.numcodecs.BitRound
   zarr.codecs.numcodecs.Blosc
   zarr.codecs.numcodecs.CRC32
   zarr.codecs.numcodecs.CRC32C
   zarr.codecs.numcodecs.Delta
   zarr.codecs.numcodecs.FixedScaleOffset
   zarr.codecs.numcodecs.Fletcher32
   zarr.codecs.numcodecs.GZip
   zarr.codecs.numcodecs.JenkinsLookup3
   zarr.codecs.numcodecs.LZ4
   zarr.codecs.numcodecs.LZMA
   zarr.codecs.numcodecs.PCodec
   zarr.codecs.numcodecs.PackBits
   zarr.codecs.numcodecs.Quantize
   zarr.codecs.numcodecs.Shuffle
   zarr.codecs.numcodecs.ZFPY
   zarr.codecs.numcodecs.Zlib
   zarr.codecs.numcodecs.Zstd


Package Contents
----------------

.. py:class:: Adler32(**codec_config: zarr.core.common.JSON)

   Bases: :py:obj:`_NumcodecsChecksumCodec`


   
   Base class for bytes-to-bytes codecs.
















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_encoded_size(input_byte_length: int, chunk_spec: zarr.core.array_spec.ArraySpec) -> int

      
      Given an input byte length, this method returns the output byte length.
      Raises a NotImplementedError for codecs with variable-sized outputs (e.g. compressors).


      :Parameters:

          **input_byte_length** : int
              ..

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          int
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: decode(chunks_and_specs: collections.abc.Iterable[tuple[CodecOutput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecInput | None]
      :async:


      
      Decodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecOutput | None, ArraySpec]]
              Ordered set of encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecInput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: encode(chunks_and_specs: collections.abc.Iterable[tuple[CodecInput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecOutput | None]
      :async:


      
      Encodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecInput | None, ArraySpec]]
              Ordered set of to-be-encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecOutput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: evolve_from_array_spec(array_spec: zarr.core.array_spec.ArraySpec) -> Self

      
      Fills in codec configuration parameters that can be automatically
      inferred from the array metadata.


      :Parameters:

          **array_spec** : ArraySpec
              ..



      :Returns:

          Self
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: from_dict(data: dict[str, zarr.core.common.JSON]) -> Self
      :classmethod:


      
      Create an instance of the model from a dictionary
















      ..
          !! processed by numpydoc !!


   .. py:method:: resolve_metadata(chunk_spec: zarr.core.array_spec.ArraySpec) -> zarr.core.array_spec.ArraySpec

      
      Computed the spec of the chunk after it has been encoded by the codec.
      This is important for codecs that change the shape, data type or fill value of a chunk.
      The spec will then be used for subsequent codecs in the pipeline.


      :Parameters:

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          ArraySpec
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: to_dict() -> dict[str, zarr.core.common.JSON]

      
      Recursively serialize this model to a dictionary.
      This method inspects the fields of self and calls `x.to_dict()` for any fields that
      are instances of `Metadata`. Sequences of `Metadata` are similarly recursed into, and
      the output of that recursion is collected in a list.
















      ..
          !! processed by numpydoc !!


   .. py:method:: validate(*, shape: tuple[int, Ellipsis], dtype: zarr.core.dtype.wrapper.ZDType[zarr.core.dtype.wrapper.TBaseDType, zarr.core.dtype.wrapper.TBaseScalar], chunk_grid: zarr.core.chunk_grids.ChunkGrid) -> None

      
      Validates that the codec configuration is compatible with the array metadata.
      Raises errors when the codec configuration is not compatible.


      :Parameters:

          **shape** : tuple[int, ...]
              The array shape

          **dtype** : np.dtype[Any]
              The array data type

          **chunk_grid** : ChunkGrid
              The array chunk grid














      ..
          !! processed by numpydoc !!


   .. py:attribute:: codec_config
      :type:  dict[str, zarr.core.common.JSON]


   .. py:attribute:: codec_name
      :type:  str


   .. py:attribute:: is_fixed_size
      :type:  bool


.. py:class:: AsType(**codec_config: zarr.core.common.JSON)

   Bases: :py:obj:`_NumcodecsArrayArrayCodec`


   
   Base class for array-to-array codecs.
















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_encoded_size(input_byte_length: int, chunk_spec: zarr.core.array_spec.ArraySpec) -> int
      :abstractmethod:


      
      Given an input byte length, this method returns the output byte length.
      Raises a NotImplementedError for codecs with variable-sized outputs (e.g. compressors).


      :Parameters:

          **input_byte_length** : int
              ..

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          int
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: decode(chunks_and_specs: collections.abc.Iterable[tuple[CodecOutput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecInput | None]
      :async:


      
      Decodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecOutput | None, ArraySpec]]
              Ordered set of encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecInput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: encode(chunks_and_specs: collections.abc.Iterable[tuple[CodecInput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecOutput | None]
      :async:


      
      Encodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecInput | None, ArraySpec]]
              Ordered set of to-be-encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecOutput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: evolve_from_array_spec(array_spec: zarr.core.array_spec.ArraySpec) -> AsType

      
      Fills in codec configuration parameters that can be automatically
      inferred from the array metadata.


      :Parameters:

          **array_spec** : ArraySpec
              ..



      :Returns:

          Self
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: from_dict(data: dict[str, zarr.core.common.JSON]) -> Self
      :classmethod:


      
      Create an instance of the model from a dictionary
















      ..
          !! processed by numpydoc !!


   .. py:method:: resolve_metadata(chunk_spec: zarr.core.array_spec.ArraySpec) -> zarr.core.array_spec.ArraySpec

      
      Computed the spec of the chunk after it has been encoded by the codec.
      This is important for codecs that change the shape, data type or fill value of a chunk.
      The spec will then be used for subsequent codecs in the pipeline.


      :Parameters:

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          ArraySpec
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: to_dict() -> dict[str, zarr.core.common.JSON]

      
      Recursively serialize this model to a dictionary.
      This method inspects the fields of self and calls `x.to_dict()` for any fields that
      are instances of `Metadata`. Sequences of `Metadata` are similarly recursed into, and
      the output of that recursion is collected in a list.
















      ..
          !! processed by numpydoc !!


   .. py:method:: validate(*, shape: tuple[int, Ellipsis], dtype: zarr.core.dtype.wrapper.ZDType[zarr.core.dtype.wrapper.TBaseDType, zarr.core.dtype.wrapper.TBaseScalar], chunk_grid: zarr.core.chunk_grids.ChunkGrid) -> None

      
      Validates that the codec configuration is compatible with the array metadata.
      Raises errors when the codec configuration is not compatible.


      :Parameters:

          **shape** : tuple[int, ...]
              The array shape

          **dtype** : np.dtype[Any]
              The array data type

          **chunk_grid** : ChunkGrid
              The array chunk grid














      ..
          !! processed by numpydoc !!


   .. py:attribute:: codec_config
      :type:  dict[str, zarr.core.common.JSON]


   .. py:attribute:: codec_name
      :type:  str


   .. py:attribute:: is_fixed_size
      :type:  bool


.. py:class:: BZ2(**codec_config: zarr.core.common.JSON)

   Bases: :py:obj:`_NumcodecsBytesBytesCodec`


   
   Base class for bytes-to-bytes codecs.
















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_encoded_size(input_byte_length: int, chunk_spec: zarr.core.array_spec.ArraySpec) -> int
      :abstractmethod:


      
      Given an input byte length, this method returns the output byte length.
      Raises a NotImplementedError for codecs with variable-sized outputs (e.g. compressors).


      :Parameters:

          **input_byte_length** : int
              ..

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          int
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: decode(chunks_and_specs: collections.abc.Iterable[tuple[CodecOutput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecInput | None]
      :async:


      
      Decodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecOutput | None, ArraySpec]]
              Ordered set of encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecInput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: encode(chunks_and_specs: collections.abc.Iterable[tuple[CodecInput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecOutput | None]
      :async:


      
      Encodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecInput | None, ArraySpec]]
              Ordered set of to-be-encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecOutput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: evolve_from_array_spec(array_spec: zarr.core.array_spec.ArraySpec) -> Self

      
      Fills in codec configuration parameters that can be automatically
      inferred from the array metadata.


      :Parameters:

          **array_spec** : ArraySpec
              ..



      :Returns:

          Self
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: from_dict(data: dict[str, zarr.core.common.JSON]) -> Self
      :classmethod:


      
      Create an instance of the model from a dictionary
















      ..
          !! processed by numpydoc !!


   .. py:method:: resolve_metadata(chunk_spec: zarr.core.array_spec.ArraySpec) -> zarr.core.array_spec.ArraySpec

      
      Computed the spec of the chunk after it has been encoded by the codec.
      This is important for codecs that change the shape, data type or fill value of a chunk.
      The spec will then be used for subsequent codecs in the pipeline.


      :Parameters:

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          ArraySpec
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: to_dict() -> dict[str, zarr.core.common.JSON]

      
      Recursively serialize this model to a dictionary.
      This method inspects the fields of self and calls `x.to_dict()` for any fields that
      are instances of `Metadata`. Sequences of `Metadata` are similarly recursed into, and
      the output of that recursion is collected in a list.
















      ..
          !! processed by numpydoc !!


   .. py:method:: validate(*, shape: tuple[int, Ellipsis], dtype: zarr.core.dtype.wrapper.ZDType[zarr.core.dtype.wrapper.TBaseDType, zarr.core.dtype.wrapper.TBaseScalar], chunk_grid: zarr.core.chunk_grids.ChunkGrid) -> None

      
      Validates that the codec configuration is compatible with the array metadata.
      Raises errors when the codec configuration is not compatible.


      :Parameters:

          **shape** : tuple[int, ...]
              The array shape

          **dtype** : np.dtype[Any]
              The array data type

          **chunk_grid** : ChunkGrid
              The array chunk grid














      ..
          !! processed by numpydoc !!


   .. py:attribute:: codec_config
      :type:  dict[str, zarr.core.common.JSON]


   .. py:attribute:: codec_name
      :type:  str


   .. py:attribute:: is_fixed_size
      :type:  bool


.. py:class:: BitRound(**codec_config: zarr.core.common.JSON)

   Bases: :py:obj:`_NumcodecsArrayArrayCodec`


   
   Base class for array-to-array codecs.
















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_encoded_size(input_byte_length: int, chunk_spec: zarr.core.array_spec.ArraySpec) -> int
      :abstractmethod:


      
      Given an input byte length, this method returns the output byte length.
      Raises a NotImplementedError for codecs with variable-sized outputs (e.g. compressors).


      :Parameters:

          **input_byte_length** : int
              ..

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          int
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: decode(chunks_and_specs: collections.abc.Iterable[tuple[CodecOutput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecInput | None]
      :async:


      
      Decodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecOutput | None, ArraySpec]]
              Ordered set of encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecInput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: encode(chunks_and_specs: collections.abc.Iterable[tuple[CodecInput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecOutput | None]
      :async:


      
      Encodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecInput | None, ArraySpec]]
              Ordered set of to-be-encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecOutput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: evolve_from_array_spec(array_spec: zarr.core.array_spec.ArraySpec) -> Self

      
      Fills in codec configuration parameters that can be automatically
      inferred from the array metadata.


      :Parameters:

          **array_spec** : ArraySpec
              ..



      :Returns:

          Self
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: from_dict(data: dict[str, zarr.core.common.JSON]) -> Self
      :classmethod:


      
      Create an instance of the model from a dictionary
















      ..
          !! processed by numpydoc !!


   .. py:method:: resolve_metadata(chunk_spec: zarr.core.array_spec.ArraySpec) -> zarr.core.array_spec.ArraySpec

      
      Computed the spec of the chunk after it has been encoded by the codec.
      This is important for codecs that change the shape, data type or fill value of a chunk.
      The spec will then be used for subsequent codecs in the pipeline.


      :Parameters:

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          ArraySpec
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: to_dict() -> dict[str, zarr.core.common.JSON]

      
      Recursively serialize this model to a dictionary.
      This method inspects the fields of self and calls `x.to_dict()` for any fields that
      are instances of `Metadata`. Sequences of `Metadata` are similarly recursed into, and
      the output of that recursion is collected in a list.
















      ..
          !! processed by numpydoc !!


   .. py:method:: validate(*, shape: tuple[int, Ellipsis], dtype: zarr.core.dtype.wrapper.ZDType[zarr.core.dtype.wrapper.TBaseDType, zarr.core.dtype.wrapper.TBaseScalar], chunk_grid: zarr.core.chunk_grids.ChunkGrid) -> None

      
      Validates that the codec configuration is compatible with the array metadata.
      Raises errors when the codec configuration is not compatible.


      :Parameters:

          **shape** : tuple[int, ...]
              The array shape

          **dtype** : np.dtype[Any]
              The array data type

          **chunk_grid** : ChunkGrid
              The array chunk grid














      ..
          !! processed by numpydoc !!


   .. py:attribute:: codec_config
      :type:  dict[str, zarr.core.common.JSON]


   .. py:attribute:: codec_name
      :type:  str


   .. py:attribute:: is_fixed_size
      :type:  bool


.. py:class:: Blosc(**codec_config: zarr.core.common.JSON)

   Bases: :py:obj:`_NumcodecsBytesBytesCodec`


   
   Base class for bytes-to-bytes codecs.
















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_encoded_size(input_byte_length: int, chunk_spec: zarr.core.array_spec.ArraySpec) -> int
      :abstractmethod:


      
      Given an input byte length, this method returns the output byte length.
      Raises a NotImplementedError for codecs with variable-sized outputs (e.g. compressors).


      :Parameters:

          **input_byte_length** : int
              ..

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          int
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: decode(chunks_and_specs: collections.abc.Iterable[tuple[CodecOutput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecInput | None]
      :async:


      
      Decodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecOutput | None, ArraySpec]]
              Ordered set of encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecInput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: encode(chunks_and_specs: collections.abc.Iterable[tuple[CodecInput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecOutput | None]
      :async:


      
      Encodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecInput | None, ArraySpec]]
              Ordered set of to-be-encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecOutput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: evolve_from_array_spec(array_spec: zarr.core.array_spec.ArraySpec) -> Self

      
      Fills in codec configuration parameters that can be automatically
      inferred from the array metadata.


      :Parameters:

          **array_spec** : ArraySpec
              ..



      :Returns:

          Self
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: from_dict(data: dict[str, zarr.core.common.JSON]) -> Self
      :classmethod:


      
      Create an instance of the model from a dictionary
















      ..
          !! processed by numpydoc !!


   .. py:method:: resolve_metadata(chunk_spec: zarr.core.array_spec.ArraySpec) -> zarr.core.array_spec.ArraySpec

      
      Computed the spec of the chunk after it has been encoded by the codec.
      This is important for codecs that change the shape, data type or fill value of a chunk.
      The spec will then be used for subsequent codecs in the pipeline.


      :Parameters:

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          ArraySpec
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: to_dict() -> dict[str, zarr.core.common.JSON]

      
      Recursively serialize this model to a dictionary.
      This method inspects the fields of self and calls `x.to_dict()` for any fields that
      are instances of `Metadata`. Sequences of `Metadata` are similarly recursed into, and
      the output of that recursion is collected in a list.
















      ..
          !! processed by numpydoc !!


   .. py:method:: validate(*, shape: tuple[int, Ellipsis], dtype: zarr.core.dtype.wrapper.ZDType[zarr.core.dtype.wrapper.TBaseDType, zarr.core.dtype.wrapper.TBaseScalar], chunk_grid: zarr.core.chunk_grids.ChunkGrid) -> None

      
      Validates that the codec configuration is compatible with the array metadata.
      Raises errors when the codec configuration is not compatible.


      :Parameters:

          **shape** : tuple[int, ...]
              The array shape

          **dtype** : np.dtype[Any]
              The array data type

          **chunk_grid** : ChunkGrid
              The array chunk grid














      ..
          !! processed by numpydoc !!


   .. py:attribute:: codec_config
      :type:  dict[str, zarr.core.common.JSON]


   .. py:attribute:: codec_name
      :type:  str


   .. py:attribute:: is_fixed_size
      :type:  bool


.. py:class:: CRC32(**codec_config: zarr.core.common.JSON)

   Bases: :py:obj:`_NumcodecsChecksumCodec`


   
   Base class for bytes-to-bytes codecs.
















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_encoded_size(input_byte_length: int, chunk_spec: zarr.core.array_spec.ArraySpec) -> int

      
      Given an input byte length, this method returns the output byte length.
      Raises a NotImplementedError for codecs with variable-sized outputs (e.g. compressors).


      :Parameters:

          **input_byte_length** : int
              ..

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          int
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: decode(chunks_and_specs: collections.abc.Iterable[tuple[CodecOutput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecInput | None]
      :async:


      
      Decodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecOutput | None, ArraySpec]]
              Ordered set of encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecInput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: encode(chunks_and_specs: collections.abc.Iterable[tuple[CodecInput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecOutput | None]
      :async:


      
      Encodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecInput | None, ArraySpec]]
              Ordered set of to-be-encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecOutput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: evolve_from_array_spec(array_spec: zarr.core.array_spec.ArraySpec) -> Self

      
      Fills in codec configuration parameters that can be automatically
      inferred from the array metadata.


      :Parameters:

          **array_spec** : ArraySpec
              ..



      :Returns:

          Self
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: from_dict(data: dict[str, zarr.core.common.JSON]) -> Self
      :classmethod:


      
      Create an instance of the model from a dictionary
















      ..
          !! processed by numpydoc !!


   .. py:method:: resolve_metadata(chunk_spec: zarr.core.array_spec.ArraySpec) -> zarr.core.array_spec.ArraySpec

      
      Computed the spec of the chunk after it has been encoded by the codec.
      This is important for codecs that change the shape, data type or fill value of a chunk.
      The spec will then be used for subsequent codecs in the pipeline.


      :Parameters:

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          ArraySpec
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: to_dict() -> dict[str, zarr.core.common.JSON]

      
      Recursively serialize this model to a dictionary.
      This method inspects the fields of self and calls `x.to_dict()` for any fields that
      are instances of `Metadata`. Sequences of `Metadata` are similarly recursed into, and
      the output of that recursion is collected in a list.
















      ..
          !! processed by numpydoc !!


   .. py:method:: validate(*, shape: tuple[int, Ellipsis], dtype: zarr.core.dtype.wrapper.ZDType[zarr.core.dtype.wrapper.TBaseDType, zarr.core.dtype.wrapper.TBaseScalar], chunk_grid: zarr.core.chunk_grids.ChunkGrid) -> None

      
      Validates that the codec configuration is compatible with the array metadata.
      Raises errors when the codec configuration is not compatible.


      :Parameters:

          **shape** : tuple[int, ...]
              The array shape

          **dtype** : np.dtype[Any]
              The array data type

          **chunk_grid** : ChunkGrid
              The array chunk grid














      ..
          !! processed by numpydoc !!


   .. py:attribute:: codec_config
      :type:  dict[str, zarr.core.common.JSON]


   .. py:attribute:: codec_name
      :type:  str


   .. py:attribute:: is_fixed_size
      :type:  bool


.. py:class:: CRC32C(**codec_config: zarr.core.common.JSON)

   Bases: :py:obj:`_NumcodecsChecksumCodec`


   
   Base class for bytes-to-bytes codecs.
















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_encoded_size(input_byte_length: int, chunk_spec: zarr.core.array_spec.ArraySpec) -> int

      
      Given an input byte length, this method returns the output byte length.
      Raises a NotImplementedError for codecs with variable-sized outputs (e.g. compressors).


      :Parameters:

          **input_byte_length** : int
              ..

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          int
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: decode(chunks_and_specs: collections.abc.Iterable[tuple[CodecOutput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecInput | None]
      :async:


      
      Decodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecOutput | None, ArraySpec]]
              Ordered set of encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecInput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: encode(chunks_and_specs: collections.abc.Iterable[tuple[CodecInput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecOutput | None]
      :async:


      
      Encodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecInput | None, ArraySpec]]
              Ordered set of to-be-encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecOutput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: evolve_from_array_spec(array_spec: zarr.core.array_spec.ArraySpec) -> Self

      
      Fills in codec configuration parameters that can be automatically
      inferred from the array metadata.


      :Parameters:

          **array_spec** : ArraySpec
              ..



      :Returns:

          Self
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: from_dict(data: dict[str, zarr.core.common.JSON]) -> Self
      :classmethod:


      
      Create an instance of the model from a dictionary
















      ..
          !! processed by numpydoc !!


   .. py:method:: resolve_metadata(chunk_spec: zarr.core.array_spec.ArraySpec) -> zarr.core.array_spec.ArraySpec

      
      Computed the spec of the chunk after it has been encoded by the codec.
      This is important for codecs that change the shape, data type or fill value of a chunk.
      The spec will then be used for subsequent codecs in the pipeline.


      :Parameters:

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          ArraySpec
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: to_dict() -> dict[str, zarr.core.common.JSON]

      
      Recursively serialize this model to a dictionary.
      This method inspects the fields of self and calls `x.to_dict()` for any fields that
      are instances of `Metadata`. Sequences of `Metadata` are similarly recursed into, and
      the output of that recursion is collected in a list.
















      ..
          !! processed by numpydoc !!


   .. py:method:: validate(*, shape: tuple[int, Ellipsis], dtype: zarr.core.dtype.wrapper.ZDType[zarr.core.dtype.wrapper.TBaseDType, zarr.core.dtype.wrapper.TBaseScalar], chunk_grid: zarr.core.chunk_grids.ChunkGrid) -> None

      
      Validates that the codec configuration is compatible with the array metadata.
      Raises errors when the codec configuration is not compatible.


      :Parameters:

          **shape** : tuple[int, ...]
              The array shape

          **dtype** : np.dtype[Any]
              The array data type

          **chunk_grid** : ChunkGrid
              The array chunk grid














      ..
          !! processed by numpydoc !!


   .. py:attribute:: codec_config
      :type:  dict[str, zarr.core.common.JSON]


   .. py:attribute:: codec_name
      :type:  str


   .. py:attribute:: is_fixed_size
      :type:  bool


.. py:class:: Delta(**codec_config: zarr.core.common.JSON)

   Bases: :py:obj:`_NumcodecsArrayArrayCodec`


   
   Base class for array-to-array codecs.
















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_encoded_size(input_byte_length: int, chunk_spec: zarr.core.array_spec.ArraySpec) -> int
      :abstractmethod:


      
      Given an input byte length, this method returns the output byte length.
      Raises a NotImplementedError for codecs with variable-sized outputs (e.g. compressors).


      :Parameters:

          **input_byte_length** : int
              ..

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          int
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: decode(chunks_and_specs: collections.abc.Iterable[tuple[CodecOutput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecInput | None]
      :async:


      
      Decodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecOutput | None, ArraySpec]]
              Ordered set of encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecInput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: encode(chunks_and_specs: collections.abc.Iterable[tuple[CodecInput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecOutput | None]
      :async:


      
      Encodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecInput | None, ArraySpec]]
              Ordered set of to-be-encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecOutput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: evolve_from_array_spec(array_spec: zarr.core.array_spec.ArraySpec) -> Self

      
      Fills in codec configuration parameters that can be automatically
      inferred from the array metadata.


      :Parameters:

          **array_spec** : ArraySpec
              ..



      :Returns:

          Self
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: from_dict(data: dict[str, zarr.core.common.JSON]) -> Self
      :classmethod:


      
      Create an instance of the model from a dictionary
















      ..
          !! processed by numpydoc !!


   .. py:method:: resolve_metadata(chunk_spec: zarr.core.array_spec.ArraySpec) -> zarr.core.array_spec.ArraySpec

      
      Computed the spec of the chunk after it has been encoded by the codec.
      This is important for codecs that change the shape, data type or fill value of a chunk.
      The spec will then be used for subsequent codecs in the pipeline.


      :Parameters:

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          ArraySpec
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: to_dict() -> dict[str, zarr.core.common.JSON]

      
      Recursively serialize this model to a dictionary.
      This method inspects the fields of self and calls `x.to_dict()` for any fields that
      are instances of `Metadata`. Sequences of `Metadata` are similarly recursed into, and
      the output of that recursion is collected in a list.
















      ..
          !! processed by numpydoc !!


   .. py:method:: validate(*, shape: tuple[int, Ellipsis], dtype: zarr.core.dtype.wrapper.ZDType[zarr.core.dtype.wrapper.TBaseDType, zarr.core.dtype.wrapper.TBaseScalar], chunk_grid: zarr.core.chunk_grids.ChunkGrid) -> None

      
      Validates that the codec configuration is compatible with the array metadata.
      Raises errors when the codec configuration is not compatible.


      :Parameters:

          **shape** : tuple[int, ...]
              The array shape

          **dtype** : np.dtype[Any]
              The array data type

          **chunk_grid** : ChunkGrid
              The array chunk grid














      ..
          !! processed by numpydoc !!


   .. py:attribute:: codec_config
      :type:  dict[str, zarr.core.common.JSON]


   .. py:attribute:: codec_name
      :type:  str


   .. py:attribute:: is_fixed_size
      :type:  bool


.. py:class:: FixedScaleOffset(**codec_config: zarr.core.common.JSON)

   Bases: :py:obj:`_NumcodecsArrayArrayCodec`


   
   Base class for array-to-array codecs.
















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_encoded_size(input_byte_length: int, chunk_spec: zarr.core.array_spec.ArraySpec) -> int
      :abstractmethod:


      
      Given an input byte length, this method returns the output byte length.
      Raises a NotImplementedError for codecs with variable-sized outputs (e.g. compressors).


      :Parameters:

          **input_byte_length** : int
              ..

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          int
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: decode(chunks_and_specs: collections.abc.Iterable[tuple[CodecOutput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecInput | None]
      :async:


      
      Decodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecOutput | None, ArraySpec]]
              Ordered set of encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecInput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: encode(chunks_and_specs: collections.abc.Iterable[tuple[CodecInput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecOutput | None]
      :async:


      
      Encodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecInput | None, ArraySpec]]
              Ordered set of to-be-encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecOutput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: evolve_from_array_spec(array_spec: zarr.core.array_spec.ArraySpec) -> FixedScaleOffset

      
      Fills in codec configuration parameters that can be automatically
      inferred from the array metadata.


      :Parameters:

          **array_spec** : ArraySpec
              ..



      :Returns:

          Self
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: from_dict(data: dict[str, zarr.core.common.JSON]) -> Self
      :classmethod:


      
      Create an instance of the model from a dictionary
















      ..
          !! processed by numpydoc !!


   .. py:method:: resolve_metadata(chunk_spec: zarr.core.array_spec.ArraySpec) -> zarr.core.array_spec.ArraySpec

      
      Computed the spec of the chunk after it has been encoded by the codec.
      This is important for codecs that change the shape, data type or fill value of a chunk.
      The spec will then be used for subsequent codecs in the pipeline.


      :Parameters:

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          ArraySpec
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: to_dict() -> dict[str, zarr.core.common.JSON]

      
      Recursively serialize this model to a dictionary.
      This method inspects the fields of self and calls `x.to_dict()` for any fields that
      are instances of `Metadata`. Sequences of `Metadata` are similarly recursed into, and
      the output of that recursion is collected in a list.
















      ..
          !! processed by numpydoc !!


   .. py:method:: validate(*, shape: tuple[int, Ellipsis], dtype: zarr.core.dtype.wrapper.ZDType[zarr.core.dtype.wrapper.TBaseDType, zarr.core.dtype.wrapper.TBaseScalar], chunk_grid: zarr.core.chunk_grids.ChunkGrid) -> None

      
      Validates that the codec configuration is compatible with the array metadata.
      Raises errors when the codec configuration is not compatible.


      :Parameters:

          **shape** : tuple[int, ...]
              The array shape

          **dtype** : np.dtype[Any]
              The array data type

          **chunk_grid** : ChunkGrid
              The array chunk grid














      ..
          !! processed by numpydoc !!


   .. py:attribute:: codec_config
      :type:  dict[str, zarr.core.common.JSON]


   .. py:attribute:: codec_name
      :type:  str


   .. py:attribute:: is_fixed_size
      :type:  bool


.. py:class:: Fletcher32(**codec_config: zarr.core.common.JSON)

   Bases: :py:obj:`_NumcodecsChecksumCodec`


   
   Base class for bytes-to-bytes codecs.
















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_encoded_size(input_byte_length: int, chunk_spec: zarr.core.array_spec.ArraySpec) -> int

      
      Given an input byte length, this method returns the output byte length.
      Raises a NotImplementedError for codecs with variable-sized outputs (e.g. compressors).


      :Parameters:

          **input_byte_length** : int
              ..

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          int
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: decode(chunks_and_specs: collections.abc.Iterable[tuple[CodecOutput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecInput | None]
      :async:


      
      Decodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecOutput | None, ArraySpec]]
              Ordered set of encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecInput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: encode(chunks_and_specs: collections.abc.Iterable[tuple[CodecInput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecOutput | None]
      :async:


      
      Encodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecInput | None, ArraySpec]]
              Ordered set of to-be-encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecOutput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: evolve_from_array_spec(array_spec: zarr.core.array_spec.ArraySpec) -> Self

      
      Fills in codec configuration parameters that can be automatically
      inferred from the array metadata.


      :Parameters:

          **array_spec** : ArraySpec
              ..



      :Returns:

          Self
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: from_dict(data: dict[str, zarr.core.common.JSON]) -> Self
      :classmethod:


      
      Create an instance of the model from a dictionary
















      ..
          !! processed by numpydoc !!


   .. py:method:: resolve_metadata(chunk_spec: zarr.core.array_spec.ArraySpec) -> zarr.core.array_spec.ArraySpec

      
      Computed the spec of the chunk after it has been encoded by the codec.
      This is important for codecs that change the shape, data type or fill value of a chunk.
      The spec will then be used for subsequent codecs in the pipeline.


      :Parameters:

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          ArraySpec
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: to_dict() -> dict[str, zarr.core.common.JSON]

      
      Recursively serialize this model to a dictionary.
      This method inspects the fields of self and calls `x.to_dict()` for any fields that
      are instances of `Metadata`. Sequences of `Metadata` are similarly recursed into, and
      the output of that recursion is collected in a list.
















      ..
          !! processed by numpydoc !!


   .. py:method:: validate(*, shape: tuple[int, Ellipsis], dtype: zarr.core.dtype.wrapper.ZDType[zarr.core.dtype.wrapper.TBaseDType, zarr.core.dtype.wrapper.TBaseScalar], chunk_grid: zarr.core.chunk_grids.ChunkGrid) -> None

      
      Validates that the codec configuration is compatible with the array metadata.
      Raises errors when the codec configuration is not compatible.


      :Parameters:

          **shape** : tuple[int, ...]
              The array shape

          **dtype** : np.dtype[Any]
              The array data type

          **chunk_grid** : ChunkGrid
              The array chunk grid














      ..
          !! processed by numpydoc !!


   .. py:attribute:: codec_config
      :type:  dict[str, zarr.core.common.JSON]


   .. py:attribute:: codec_name
      :type:  str


   .. py:attribute:: is_fixed_size
      :type:  bool


.. py:class:: GZip(**codec_config: zarr.core.common.JSON)

   Bases: :py:obj:`_NumcodecsBytesBytesCodec`


   
   Base class for bytes-to-bytes codecs.
















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_encoded_size(input_byte_length: int, chunk_spec: zarr.core.array_spec.ArraySpec) -> int
      :abstractmethod:


      
      Given an input byte length, this method returns the output byte length.
      Raises a NotImplementedError for codecs with variable-sized outputs (e.g. compressors).


      :Parameters:

          **input_byte_length** : int
              ..

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          int
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: decode(chunks_and_specs: collections.abc.Iterable[tuple[CodecOutput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecInput | None]
      :async:


      
      Decodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecOutput | None, ArraySpec]]
              Ordered set of encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecInput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: encode(chunks_and_specs: collections.abc.Iterable[tuple[CodecInput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecOutput | None]
      :async:


      
      Encodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecInput | None, ArraySpec]]
              Ordered set of to-be-encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecOutput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: evolve_from_array_spec(array_spec: zarr.core.array_spec.ArraySpec) -> Self

      
      Fills in codec configuration parameters that can be automatically
      inferred from the array metadata.


      :Parameters:

          **array_spec** : ArraySpec
              ..



      :Returns:

          Self
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: from_dict(data: dict[str, zarr.core.common.JSON]) -> Self
      :classmethod:


      
      Create an instance of the model from a dictionary
















      ..
          !! processed by numpydoc !!


   .. py:method:: resolve_metadata(chunk_spec: zarr.core.array_spec.ArraySpec) -> zarr.core.array_spec.ArraySpec

      
      Computed the spec of the chunk after it has been encoded by the codec.
      This is important for codecs that change the shape, data type or fill value of a chunk.
      The spec will then be used for subsequent codecs in the pipeline.


      :Parameters:

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          ArraySpec
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: to_dict() -> dict[str, zarr.core.common.JSON]

      
      Recursively serialize this model to a dictionary.
      This method inspects the fields of self and calls `x.to_dict()` for any fields that
      are instances of `Metadata`. Sequences of `Metadata` are similarly recursed into, and
      the output of that recursion is collected in a list.
















      ..
          !! processed by numpydoc !!


   .. py:method:: validate(*, shape: tuple[int, Ellipsis], dtype: zarr.core.dtype.wrapper.ZDType[zarr.core.dtype.wrapper.TBaseDType, zarr.core.dtype.wrapper.TBaseScalar], chunk_grid: zarr.core.chunk_grids.ChunkGrid) -> None

      
      Validates that the codec configuration is compatible with the array metadata.
      Raises errors when the codec configuration is not compatible.


      :Parameters:

          **shape** : tuple[int, ...]
              The array shape

          **dtype** : np.dtype[Any]
              The array data type

          **chunk_grid** : ChunkGrid
              The array chunk grid














      ..
          !! processed by numpydoc !!


   .. py:attribute:: codec_config
      :type:  dict[str, zarr.core.common.JSON]


   .. py:attribute:: codec_name
      :type:  str


   .. py:attribute:: is_fixed_size
      :type:  bool


.. py:class:: JenkinsLookup3(**codec_config: zarr.core.common.JSON)

   Bases: :py:obj:`_NumcodecsChecksumCodec`


   
   Base class for bytes-to-bytes codecs.
















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_encoded_size(input_byte_length: int, chunk_spec: zarr.core.array_spec.ArraySpec) -> int

      
      Given an input byte length, this method returns the output byte length.
      Raises a NotImplementedError for codecs with variable-sized outputs (e.g. compressors).


      :Parameters:

          **input_byte_length** : int
              ..

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          int
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: decode(chunks_and_specs: collections.abc.Iterable[tuple[CodecOutput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecInput | None]
      :async:


      
      Decodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecOutput | None, ArraySpec]]
              Ordered set of encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecInput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: encode(chunks_and_specs: collections.abc.Iterable[tuple[CodecInput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecOutput | None]
      :async:


      
      Encodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecInput | None, ArraySpec]]
              Ordered set of to-be-encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecOutput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: evolve_from_array_spec(array_spec: zarr.core.array_spec.ArraySpec) -> Self

      
      Fills in codec configuration parameters that can be automatically
      inferred from the array metadata.


      :Parameters:

          **array_spec** : ArraySpec
              ..



      :Returns:

          Self
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: from_dict(data: dict[str, zarr.core.common.JSON]) -> Self
      :classmethod:


      
      Create an instance of the model from a dictionary
















      ..
          !! processed by numpydoc !!


   .. py:method:: resolve_metadata(chunk_spec: zarr.core.array_spec.ArraySpec) -> zarr.core.array_spec.ArraySpec

      
      Computed the spec of the chunk after it has been encoded by the codec.
      This is important for codecs that change the shape, data type or fill value of a chunk.
      The spec will then be used for subsequent codecs in the pipeline.


      :Parameters:

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          ArraySpec
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: to_dict() -> dict[str, zarr.core.common.JSON]

      
      Recursively serialize this model to a dictionary.
      This method inspects the fields of self and calls `x.to_dict()` for any fields that
      are instances of `Metadata`. Sequences of `Metadata` are similarly recursed into, and
      the output of that recursion is collected in a list.
















      ..
          !! processed by numpydoc !!


   .. py:method:: validate(*, shape: tuple[int, Ellipsis], dtype: zarr.core.dtype.wrapper.ZDType[zarr.core.dtype.wrapper.TBaseDType, zarr.core.dtype.wrapper.TBaseScalar], chunk_grid: zarr.core.chunk_grids.ChunkGrid) -> None

      
      Validates that the codec configuration is compatible with the array metadata.
      Raises errors when the codec configuration is not compatible.


      :Parameters:

          **shape** : tuple[int, ...]
              The array shape

          **dtype** : np.dtype[Any]
              The array data type

          **chunk_grid** : ChunkGrid
              The array chunk grid














      ..
          !! processed by numpydoc !!


   .. py:attribute:: codec_config
      :type:  dict[str, zarr.core.common.JSON]


   .. py:attribute:: codec_name
      :type:  str


   .. py:attribute:: is_fixed_size
      :type:  bool


.. py:class:: LZ4(**codec_config: zarr.core.common.JSON)

   Bases: :py:obj:`_NumcodecsBytesBytesCodec`


   
   Base class for bytes-to-bytes codecs.
















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_encoded_size(input_byte_length: int, chunk_spec: zarr.core.array_spec.ArraySpec) -> int
      :abstractmethod:


      
      Given an input byte length, this method returns the output byte length.
      Raises a NotImplementedError for codecs with variable-sized outputs (e.g. compressors).


      :Parameters:

          **input_byte_length** : int
              ..

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          int
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: decode(chunks_and_specs: collections.abc.Iterable[tuple[CodecOutput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecInput | None]
      :async:


      
      Decodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecOutput | None, ArraySpec]]
              Ordered set of encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecInput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: encode(chunks_and_specs: collections.abc.Iterable[tuple[CodecInput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecOutput | None]
      :async:


      
      Encodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecInput | None, ArraySpec]]
              Ordered set of to-be-encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecOutput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: evolve_from_array_spec(array_spec: zarr.core.array_spec.ArraySpec) -> Self

      
      Fills in codec configuration parameters that can be automatically
      inferred from the array metadata.


      :Parameters:

          **array_spec** : ArraySpec
              ..



      :Returns:

          Self
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: from_dict(data: dict[str, zarr.core.common.JSON]) -> Self
      :classmethod:


      
      Create an instance of the model from a dictionary
















      ..
          !! processed by numpydoc !!


   .. py:method:: resolve_metadata(chunk_spec: zarr.core.array_spec.ArraySpec) -> zarr.core.array_spec.ArraySpec

      
      Computed the spec of the chunk after it has been encoded by the codec.
      This is important for codecs that change the shape, data type or fill value of a chunk.
      The spec will then be used for subsequent codecs in the pipeline.


      :Parameters:

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          ArraySpec
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: to_dict() -> dict[str, zarr.core.common.JSON]

      
      Recursively serialize this model to a dictionary.
      This method inspects the fields of self and calls `x.to_dict()` for any fields that
      are instances of `Metadata`. Sequences of `Metadata` are similarly recursed into, and
      the output of that recursion is collected in a list.
















      ..
          !! processed by numpydoc !!


   .. py:method:: validate(*, shape: tuple[int, Ellipsis], dtype: zarr.core.dtype.wrapper.ZDType[zarr.core.dtype.wrapper.TBaseDType, zarr.core.dtype.wrapper.TBaseScalar], chunk_grid: zarr.core.chunk_grids.ChunkGrid) -> None

      
      Validates that the codec configuration is compatible with the array metadata.
      Raises errors when the codec configuration is not compatible.


      :Parameters:

          **shape** : tuple[int, ...]
              The array shape

          **dtype** : np.dtype[Any]
              The array data type

          **chunk_grid** : ChunkGrid
              The array chunk grid














      ..
          !! processed by numpydoc !!


   .. py:attribute:: codec_config
      :type:  dict[str, zarr.core.common.JSON]


   .. py:attribute:: codec_name
      :type:  str


   .. py:attribute:: is_fixed_size
      :type:  bool


.. py:class:: LZMA(**codec_config: zarr.core.common.JSON)

   Bases: :py:obj:`_NumcodecsBytesBytesCodec`


   
   Base class for bytes-to-bytes codecs.
















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_encoded_size(input_byte_length: int, chunk_spec: zarr.core.array_spec.ArraySpec) -> int
      :abstractmethod:


      
      Given an input byte length, this method returns the output byte length.
      Raises a NotImplementedError for codecs with variable-sized outputs (e.g. compressors).


      :Parameters:

          **input_byte_length** : int
              ..

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          int
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: decode(chunks_and_specs: collections.abc.Iterable[tuple[CodecOutput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecInput | None]
      :async:


      
      Decodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecOutput | None, ArraySpec]]
              Ordered set of encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecInput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: encode(chunks_and_specs: collections.abc.Iterable[tuple[CodecInput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecOutput | None]
      :async:


      
      Encodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecInput | None, ArraySpec]]
              Ordered set of to-be-encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecOutput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: evolve_from_array_spec(array_spec: zarr.core.array_spec.ArraySpec) -> Self

      
      Fills in codec configuration parameters that can be automatically
      inferred from the array metadata.


      :Parameters:

          **array_spec** : ArraySpec
              ..



      :Returns:

          Self
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: from_dict(data: dict[str, zarr.core.common.JSON]) -> Self
      :classmethod:


      
      Create an instance of the model from a dictionary
















      ..
          !! processed by numpydoc !!


   .. py:method:: resolve_metadata(chunk_spec: zarr.core.array_spec.ArraySpec) -> zarr.core.array_spec.ArraySpec

      
      Computed the spec of the chunk after it has been encoded by the codec.
      This is important for codecs that change the shape, data type or fill value of a chunk.
      The spec will then be used for subsequent codecs in the pipeline.


      :Parameters:

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          ArraySpec
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: to_dict() -> dict[str, zarr.core.common.JSON]

      
      Recursively serialize this model to a dictionary.
      This method inspects the fields of self and calls `x.to_dict()` for any fields that
      are instances of `Metadata`. Sequences of `Metadata` are similarly recursed into, and
      the output of that recursion is collected in a list.
















      ..
          !! processed by numpydoc !!


   .. py:method:: validate(*, shape: tuple[int, Ellipsis], dtype: zarr.core.dtype.wrapper.ZDType[zarr.core.dtype.wrapper.TBaseDType, zarr.core.dtype.wrapper.TBaseScalar], chunk_grid: zarr.core.chunk_grids.ChunkGrid) -> None

      
      Validates that the codec configuration is compatible with the array metadata.
      Raises errors when the codec configuration is not compatible.


      :Parameters:

          **shape** : tuple[int, ...]
              The array shape

          **dtype** : np.dtype[Any]
              The array data type

          **chunk_grid** : ChunkGrid
              The array chunk grid














      ..
          !! processed by numpydoc !!


   .. py:attribute:: codec_config
      :type:  dict[str, zarr.core.common.JSON]


   .. py:attribute:: codec_name
      :type:  str


   .. py:attribute:: is_fixed_size
      :type:  bool


.. py:class:: PCodec(**codec_config: zarr.core.common.JSON)

   Bases: :py:obj:`_NumcodecsArrayBytesCodec`


   
   Base class for array-to-bytes codecs.
















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_encoded_size(input_byte_length: int, chunk_spec: zarr.core.array_spec.ArraySpec) -> int
      :abstractmethod:


      
      Given an input byte length, this method returns the output byte length.
      Raises a NotImplementedError for codecs with variable-sized outputs (e.g. compressors).


      :Parameters:

          **input_byte_length** : int
              ..

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          int
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: decode(chunks_and_specs: collections.abc.Iterable[tuple[CodecOutput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecInput | None]
      :async:


      
      Decodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecOutput | None, ArraySpec]]
              Ordered set of encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecInput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: encode(chunks_and_specs: collections.abc.Iterable[tuple[CodecInput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecOutput | None]
      :async:


      
      Encodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecInput | None, ArraySpec]]
              Ordered set of to-be-encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecOutput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: evolve_from_array_spec(array_spec: zarr.core.array_spec.ArraySpec) -> Self

      
      Fills in codec configuration parameters that can be automatically
      inferred from the array metadata.


      :Parameters:

          **array_spec** : ArraySpec
              ..



      :Returns:

          Self
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: from_dict(data: dict[str, zarr.core.common.JSON]) -> Self
      :classmethod:


      
      Create an instance of the model from a dictionary
















      ..
          !! processed by numpydoc !!


   .. py:method:: resolve_metadata(chunk_spec: zarr.core.array_spec.ArraySpec) -> zarr.core.array_spec.ArraySpec

      
      Computed the spec of the chunk after it has been encoded by the codec.
      This is important for codecs that change the shape, data type or fill value of a chunk.
      The spec will then be used for subsequent codecs in the pipeline.


      :Parameters:

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          ArraySpec
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: to_dict() -> dict[str, zarr.core.common.JSON]

      
      Recursively serialize this model to a dictionary.
      This method inspects the fields of self and calls `x.to_dict()` for any fields that
      are instances of `Metadata`. Sequences of `Metadata` are similarly recursed into, and
      the output of that recursion is collected in a list.
















      ..
          !! processed by numpydoc !!


   .. py:method:: validate(*, shape: tuple[int, Ellipsis], dtype: zarr.core.dtype.wrapper.ZDType[zarr.core.dtype.wrapper.TBaseDType, zarr.core.dtype.wrapper.TBaseScalar], chunk_grid: zarr.core.chunk_grids.ChunkGrid) -> None

      
      Validates that the codec configuration is compatible with the array metadata.
      Raises errors when the codec configuration is not compatible.


      :Parameters:

          **shape** : tuple[int, ...]
              The array shape

          **dtype** : np.dtype[Any]
              The array data type

          **chunk_grid** : ChunkGrid
              The array chunk grid














      ..
          !! processed by numpydoc !!


   .. py:attribute:: codec_config
      :type:  dict[str, zarr.core.common.JSON]


   .. py:attribute:: codec_name
      :type:  str


   .. py:attribute:: is_fixed_size
      :type:  bool


.. py:class:: PackBits(**codec_config: zarr.core.common.JSON)

   Bases: :py:obj:`_NumcodecsArrayArrayCodec`


   
   Base class for array-to-array codecs.
















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_encoded_size(input_byte_length: int, chunk_spec: zarr.core.array_spec.ArraySpec) -> int
      :abstractmethod:


      
      Given an input byte length, this method returns the output byte length.
      Raises a NotImplementedError for codecs with variable-sized outputs (e.g. compressors).


      :Parameters:

          **input_byte_length** : int
              ..

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          int
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: decode(chunks_and_specs: collections.abc.Iterable[tuple[CodecOutput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecInput | None]
      :async:


      
      Decodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecOutput | None, ArraySpec]]
              Ordered set of encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecInput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: encode(chunks_and_specs: collections.abc.Iterable[tuple[CodecInput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecOutput | None]
      :async:


      
      Encodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecInput | None, ArraySpec]]
              Ordered set of to-be-encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecOutput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: evolve_from_array_spec(array_spec: zarr.core.array_spec.ArraySpec) -> Self

      
      Fills in codec configuration parameters that can be automatically
      inferred from the array metadata.


      :Parameters:

          **array_spec** : ArraySpec
              ..



      :Returns:

          Self
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: from_dict(data: dict[str, zarr.core.common.JSON]) -> Self
      :classmethod:


      
      Create an instance of the model from a dictionary
















      ..
          !! processed by numpydoc !!


   .. py:method:: resolve_metadata(chunk_spec: zarr.core.array_spec.ArraySpec) -> zarr.core.array_spec.ArraySpec

      
      Computed the spec of the chunk after it has been encoded by the codec.
      This is important for codecs that change the shape, data type or fill value of a chunk.
      The spec will then be used for subsequent codecs in the pipeline.


      :Parameters:

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          ArraySpec
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: to_dict() -> dict[str, zarr.core.common.JSON]

      
      Recursively serialize this model to a dictionary.
      This method inspects the fields of self and calls `x.to_dict()` for any fields that
      are instances of `Metadata`. Sequences of `Metadata` are similarly recursed into, and
      the output of that recursion is collected in a list.
















      ..
          !! processed by numpydoc !!


   .. py:method:: validate(*, dtype: zarr.dtype.ZDType[Any, Any], **_kwargs: Any) -> None

      
      Validates that the codec configuration is compatible with the array metadata.
      Raises errors when the codec configuration is not compatible.


      :Parameters:

          **shape** : tuple[int, ...]
              The array shape

          **dtype** : np.dtype[Any]
              The array data type

          **chunk_grid** : ChunkGrid
              The array chunk grid














      ..
          !! processed by numpydoc !!


   .. py:attribute:: codec_config
      :type:  dict[str, zarr.core.common.JSON]


   .. py:attribute:: codec_name
      :type:  str


   .. py:attribute:: is_fixed_size
      :type:  bool


.. py:class:: Quantize(**codec_config: zarr.core.common.JSON)

   Bases: :py:obj:`_NumcodecsArrayArrayCodec`


   
   Base class for array-to-array codecs.
















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_encoded_size(input_byte_length: int, chunk_spec: zarr.core.array_spec.ArraySpec) -> int
      :abstractmethod:


      
      Given an input byte length, this method returns the output byte length.
      Raises a NotImplementedError for codecs with variable-sized outputs (e.g. compressors).


      :Parameters:

          **input_byte_length** : int
              ..

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          int
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: decode(chunks_and_specs: collections.abc.Iterable[tuple[CodecOutput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecInput | None]
      :async:


      
      Decodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecOutput | None, ArraySpec]]
              Ordered set of encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecInput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: encode(chunks_and_specs: collections.abc.Iterable[tuple[CodecInput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecOutput | None]
      :async:


      
      Encodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecInput | None, ArraySpec]]
              Ordered set of to-be-encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecOutput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: evolve_from_array_spec(array_spec: zarr.core.array_spec.ArraySpec) -> Quantize

      
      Fills in codec configuration parameters that can be automatically
      inferred from the array metadata.


      :Parameters:

          **array_spec** : ArraySpec
              ..



      :Returns:

          Self
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: from_dict(data: dict[str, zarr.core.common.JSON]) -> Self
      :classmethod:


      
      Create an instance of the model from a dictionary
















      ..
          !! processed by numpydoc !!


   .. py:method:: resolve_metadata(chunk_spec: zarr.core.array_spec.ArraySpec) -> zarr.core.array_spec.ArraySpec

      
      Computed the spec of the chunk after it has been encoded by the codec.
      This is important for codecs that change the shape, data type or fill value of a chunk.
      The spec will then be used for subsequent codecs in the pipeline.


      :Parameters:

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          ArraySpec
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: to_dict() -> dict[str, zarr.core.common.JSON]

      
      Recursively serialize this model to a dictionary.
      This method inspects the fields of self and calls `x.to_dict()` for any fields that
      are instances of `Metadata`. Sequences of `Metadata` are similarly recursed into, and
      the output of that recursion is collected in a list.
















      ..
          !! processed by numpydoc !!


   .. py:method:: validate(*, shape: tuple[int, Ellipsis], dtype: zarr.core.dtype.wrapper.ZDType[zarr.core.dtype.wrapper.TBaseDType, zarr.core.dtype.wrapper.TBaseScalar], chunk_grid: zarr.core.chunk_grids.ChunkGrid) -> None

      
      Validates that the codec configuration is compatible with the array metadata.
      Raises errors when the codec configuration is not compatible.


      :Parameters:

          **shape** : tuple[int, ...]
              The array shape

          **dtype** : np.dtype[Any]
              The array data type

          **chunk_grid** : ChunkGrid
              The array chunk grid














      ..
          !! processed by numpydoc !!


   .. py:attribute:: codec_config
      :type:  dict[str, zarr.core.common.JSON]


   .. py:attribute:: codec_name
      :type:  str


   .. py:attribute:: is_fixed_size
      :type:  bool


.. py:class:: Shuffle(**codec_config: zarr.core.common.JSON)

   Bases: :py:obj:`_NumcodecsBytesBytesCodec`


   
   Base class for bytes-to-bytes codecs.
















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_encoded_size(input_byte_length: int, chunk_spec: zarr.core.array_spec.ArraySpec) -> int
      :abstractmethod:


      
      Given an input byte length, this method returns the output byte length.
      Raises a NotImplementedError for codecs with variable-sized outputs (e.g. compressors).


      :Parameters:

          **input_byte_length** : int
              ..

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          int
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: decode(chunks_and_specs: collections.abc.Iterable[tuple[CodecOutput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecInput | None]
      :async:


      
      Decodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecOutput | None, ArraySpec]]
              Ordered set of encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecInput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: encode(chunks_and_specs: collections.abc.Iterable[tuple[CodecInput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecOutput | None]
      :async:


      
      Encodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecInput | None, ArraySpec]]
              Ordered set of to-be-encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecOutput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: evolve_from_array_spec(array_spec: zarr.core.array_spec.ArraySpec) -> Shuffle

      
      Fills in codec configuration parameters that can be automatically
      inferred from the array metadata.


      :Parameters:

          **array_spec** : ArraySpec
              ..



      :Returns:

          Self
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: from_dict(data: dict[str, zarr.core.common.JSON]) -> Self
      :classmethod:


      
      Create an instance of the model from a dictionary
















      ..
          !! processed by numpydoc !!


   .. py:method:: resolve_metadata(chunk_spec: zarr.core.array_spec.ArraySpec) -> zarr.core.array_spec.ArraySpec

      
      Computed the spec of the chunk after it has been encoded by the codec.
      This is important for codecs that change the shape, data type or fill value of a chunk.
      The spec will then be used for subsequent codecs in the pipeline.


      :Parameters:

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          ArraySpec
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: to_dict() -> dict[str, zarr.core.common.JSON]

      
      Recursively serialize this model to a dictionary.
      This method inspects the fields of self and calls `x.to_dict()` for any fields that
      are instances of `Metadata`. Sequences of `Metadata` are similarly recursed into, and
      the output of that recursion is collected in a list.
















      ..
          !! processed by numpydoc !!


   .. py:method:: validate(*, shape: tuple[int, Ellipsis], dtype: zarr.core.dtype.wrapper.ZDType[zarr.core.dtype.wrapper.TBaseDType, zarr.core.dtype.wrapper.TBaseScalar], chunk_grid: zarr.core.chunk_grids.ChunkGrid) -> None

      
      Validates that the codec configuration is compatible with the array metadata.
      Raises errors when the codec configuration is not compatible.


      :Parameters:

          **shape** : tuple[int, ...]
              The array shape

          **dtype** : np.dtype[Any]
              The array data type

          **chunk_grid** : ChunkGrid
              The array chunk grid














      ..
          !! processed by numpydoc !!


   .. py:attribute:: codec_config
      :type:  dict[str, zarr.core.common.JSON]


   .. py:attribute:: codec_name
      :type:  str


   .. py:attribute:: is_fixed_size
      :type:  bool


.. py:class:: ZFPY(**codec_config: zarr.core.common.JSON)

   Bases: :py:obj:`_NumcodecsArrayBytesCodec`


   
   Base class for array-to-bytes codecs.
















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_encoded_size(input_byte_length: int, chunk_spec: zarr.core.array_spec.ArraySpec) -> int
      :abstractmethod:


      
      Given an input byte length, this method returns the output byte length.
      Raises a NotImplementedError for codecs with variable-sized outputs (e.g. compressors).


      :Parameters:

          **input_byte_length** : int
              ..

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          int
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: decode(chunks_and_specs: collections.abc.Iterable[tuple[CodecOutput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecInput | None]
      :async:


      
      Decodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecOutput | None, ArraySpec]]
              Ordered set of encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecInput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: encode(chunks_and_specs: collections.abc.Iterable[tuple[CodecInput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecOutput | None]
      :async:


      
      Encodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecInput | None, ArraySpec]]
              Ordered set of to-be-encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecOutput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: evolve_from_array_spec(array_spec: zarr.core.array_spec.ArraySpec) -> Self

      
      Fills in codec configuration parameters that can be automatically
      inferred from the array metadata.


      :Parameters:

          **array_spec** : ArraySpec
              ..



      :Returns:

          Self
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: from_dict(data: dict[str, zarr.core.common.JSON]) -> Self
      :classmethod:


      
      Create an instance of the model from a dictionary
















      ..
          !! processed by numpydoc !!


   .. py:method:: resolve_metadata(chunk_spec: zarr.core.array_spec.ArraySpec) -> zarr.core.array_spec.ArraySpec

      
      Computed the spec of the chunk after it has been encoded by the codec.
      This is important for codecs that change the shape, data type or fill value of a chunk.
      The spec will then be used for subsequent codecs in the pipeline.


      :Parameters:

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          ArraySpec
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: to_dict() -> dict[str, zarr.core.common.JSON]

      
      Recursively serialize this model to a dictionary.
      This method inspects the fields of self and calls `x.to_dict()` for any fields that
      are instances of `Metadata`. Sequences of `Metadata` are similarly recursed into, and
      the output of that recursion is collected in a list.
















      ..
          !! processed by numpydoc !!


   .. py:method:: validate(*, shape: tuple[int, Ellipsis], dtype: zarr.core.dtype.wrapper.ZDType[zarr.core.dtype.wrapper.TBaseDType, zarr.core.dtype.wrapper.TBaseScalar], chunk_grid: zarr.core.chunk_grids.ChunkGrid) -> None

      
      Validates that the codec configuration is compatible with the array metadata.
      Raises errors when the codec configuration is not compatible.


      :Parameters:

          **shape** : tuple[int, ...]
              The array shape

          **dtype** : np.dtype[Any]
              The array data type

          **chunk_grid** : ChunkGrid
              The array chunk grid














      ..
          !! processed by numpydoc !!


   .. py:attribute:: codec_config
      :type:  dict[str, zarr.core.common.JSON]


   .. py:attribute:: codec_name
      :type:  str


   .. py:attribute:: is_fixed_size
      :type:  bool


.. py:class:: Zlib(**codec_config: zarr.core.common.JSON)

   Bases: :py:obj:`_NumcodecsBytesBytesCodec`


   
   Base class for bytes-to-bytes codecs.
















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_encoded_size(input_byte_length: int, chunk_spec: zarr.core.array_spec.ArraySpec) -> int
      :abstractmethod:


      
      Given an input byte length, this method returns the output byte length.
      Raises a NotImplementedError for codecs with variable-sized outputs (e.g. compressors).


      :Parameters:

          **input_byte_length** : int
              ..

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          int
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: decode(chunks_and_specs: collections.abc.Iterable[tuple[CodecOutput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecInput | None]
      :async:


      
      Decodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecOutput | None, ArraySpec]]
              Ordered set of encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecInput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: encode(chunks_and_specs: collections.abc.Iterable[tuple[CodecInput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecOutput | None]
      :async:


      
      Encodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecInput | None, ArraySpec]]
              Ordered set of to-be-encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecOutput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: evolve_from_array_spec(array_spec: zarr.core.array_spec.ArraySpec) -> Self

      
      Fills in codec configuration parameters that can be automatically
      inferred from the array metadata.


      :Parameters:

          **array_spec** : ArraySpec
              ..



      :Returns:

          Self
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: from_dict(data: dict[str, zarr.core.common.JSON]) -> Self
      :classmethod:


      
      Create an instance of the model from a dictionary
















      ..
          !! processed by numpydoc !!


   .. py:method:: resolve_metadata(chunk_spec: zarr.core.array_spec.ArraySpec) -> zarr.core.array_spec.ArraySpec

      
      Computed the spec of the chunk after it has been encoded by the codec.
      This is important for codecs that change the shape, data type or fill value of a chunk.
      The spec will then be used for subsequent codecs in the pipeline.


      :Parameters:

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          ArraySpec
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: to_dict() -> dict[str, zarr.core.common.JSON]

      
      Recursively serialize this model to a dictionary.
      This method inspects the fields of self and calls `x.to_dict()` for any fields that
      are instances of `Metadata`. Sequences of `Metadata` are similarly recursed into, and
      the output of that recursion is collected in a list.
















      ..
          !! processed by numpydoc !!


   .. py:method:: validate(*, shape: tuple[int, Ellipsis], dtype: zarr.core.dtype.wrapper.ZDType[zarr.core.dtype.wrapper.TBaseDType, zarr.core.dtype.wrapper.TBaseScalar], chunk_grid: zarr.core.chunk_grids.ChunkGrid) -> None

      
      Validates that the codec configuration is compatible with the array metadata.
      Raises errors when the codec configuration is not compatible.


      :Parameters:

          **shape** : tuple[int, ...]
              The array shape

          **dtype** : np.dtype[Any]
              The array data type

          **chunk_grid** : ChunkGrid
              The array chunk grid














      ..
          !! processed by numpydoc !!


   .. py:attribute:: codec_config
      :type:  dict[str, zarr.core.common.JSON]


   .. py:attribute:: codec_name
      :type:  str


   .. py:attribute:: is_fixed_size
      :type:  bool


.. py:class:: Zstd(**codec_config: zarr.core.common.JSON)

   Bases: :py:obj:`_NumcodecsBytesBytesCodec`


   
   Base class for bytes-to-bytes codecs.
















   ..
       !! processed by numpydoc !!

   .. py:method:: compute_encoded_size(input_byte_length: int, chunk_spec: zarr.core.array_spec.ArraySpec) -> int
      :abstractmethod:


      
      Given an input byte length, this method returns the output byte length.
      Raises a NotImplementedError for codecs with variable-sized outputs (e.g. compressors).


      :Parameters:

          **input_byte_length** : int
              ..

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          int
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: decode(chunks_and_specs: collections.abc.Iterable[tuple[CodecOutput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecInput | None]
      :async:


      
      Decodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecOutput | None, ArraySpec]]
              Ordered set of encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecInput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: encode(chunks_and_specs: collections.abc.Iterable[tuple[CodecInput | None, zarr.core.array_spec.ArraySpec]]) -> collections.abc.Iterable[CodecOutput | None]
      :async:


      
      Encodes a batch of chunks.
      Chunks can be None in which case they are ignored by the codec.


      :Parameters:

          **chunks_and_specs** : Iterable[tuple[CodecInput | None, ArraySpec]]
              Ordered set of to-be-encoded chunks with their accompanying chunk spec.



      :Returns:

          Iterable[CodecOutput | None]
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: evolve_from_array_spec(array_spec: zarr.core.array_spec.ArraySpec) -> Self

      
      Fills in codec configuration parameters that can be automatically
      inferred from the array metadata.


      :Parameters:

          **array_spec** : ArraySpec
              ..



      :Returns:

          Self
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: from_dict(data: dict[str, zarr.core.common.JSON]) -> Self
      :classmethod:


      
      Create an instance of the model from a dictionary
















      ..
          !! processed by numpydoc !!


   .. py:method:: resolve_metadata(chunk_spec: zarr.core.array_spec.ArraySpec) -> zarr.core.array_spec.ArraySpec

      
      Computed the spec of the chunk after it has been encoded by the codec.
      This is important for codecs that change the shape, data type or fill value of a chunk.
      The spec will then be used for subsequent codecs in the pipeline.


      :Parameters:

          **chunk_spec** : ArraySpec
              ..



      :Returns:

          ArraySpec
              ..











      ..
          !! processed by numpydoc !!


   .. py:method:: to_dict() -> dict[str, zarr.core.common.JSON]

      
      Recursively serialize this model to a dictionary.
      This method inspects the fields of self and calls `x.to_dict()` for any fields that
      are instances of `Metadata`. Sequences of `Metadata` are similarly recursed into, and
      the output of that recursion is collected in a list.
















      ..
          !! processed by numpydoc !!


   .. py:method:: validate(*, shape: tuple[int, Ellipsis], dtype: zarr.core.dtype.wrapper.ZDType[zarr.core.dtype.wrapper.TBaseDType, zarr.core.dtype.wrapper.TBaseScalar], chunk_grid: zarr.core.chunk_grids.ChunkGrid) -> None

      
      Validates that the codec configuration is compatible with the array metadata.
      Raises errors when the codec configuration is not compatible.


      :Parameters:

          **shape** : tuple[int, ...]
              The array shape

          **dtype** : np.dtype[Any]
              The array data type

          **chunk_grid** : ChunkGrid
              The array chunk grid














      ..
          !! processed by numpydoc !!


   .. py:attribute:: codec_config
      :type:  dict[str, zarr.core.common.JSON]


   .. py:attribute:: codec_name
      :type:  str


   .. py:attribute:: is_fixed_size
      :type:  bool


