numcodecs_combinators

numcodecs_combinators

Combinator codecs for the numcodecs buffer compression API.

The following combinators, implementing the CodecCombinatorMixin are provided:

Modules:

  • abc

    This module defines the CodecCombinatorMixin mixin, a common interface for all codec combinator classes.

  • best

    This module defines the PickBestCodec class, which picks the codec that encoded the data best.

  • framed

    This module defines the FramedCodecStack class, which exposes a framed stack of codecs as a combined codec.

  • stack

    This module defines the CodecStack class, which exposes a stack of codecs as a combined codec.

Functions:

  • map_codec

    Apply the mapper callable to the codec and return the mapped codec.

map_codec

map_codec(
    codec: Codec, mapper: Callable[[Codec], Codec]
) -> Codec

Apply the mapper callable to the codec and return the mapped codec.

If the codec implements the CodecCombinatorMixin mixin, the mapper is applied to its inner codecs recursively.

Parameters:
Returns:
  • mapped( Codec ) –

    The mapped codec.