Skip to content

Decoder

async_tiff.Decoder

Bases: Protocol

A custom Python-provided decompression algorithm.

__call__ staticmethod

__call__(buffer: Buffer) -> Buffer

A callback to decode compressed data.

async_tiff.DecoderRegistry

A registry holding multiple decoder methods.

__init__

__init__(
    custom_decoders: dict[CompressionMethod | int, Decoder] | None = None,
) -> None

Construct a new decoder registry.

By default, pure-Rust decoders will be used for any recognized and supported compression types. Only the supplied decoders will override Rust-native decoders.

Parameters:

  • custom_decoders (dict[CompressionMethod | int, Decoder] | None, default: None ) –

    any custom decoder methods to use. This will be applied after (and override) any default provided Rust decoders. Defaults to None.