Trait zarrs::array::codec::ArrayToArrayCodecTraits

source ·
pub trait ArrayToArrayCodecTraits: ArrayCodecTraits + DynClone + Debug {
    // Required methods
    fn compute_encoded_size(
        &self,
        decoded_representation: &ChunkRepresentation
    ) -> Result<ChunkRepresentation, CodecError>;
    fn partial_decoder<'a>(
        &'a self,
        input_handle: Box<dyn ArrayPartialDecoderTraits + 'a>,
        decoded_representation: &ChunkRepresentation,
        options: &CodecOptions
    ) -> Result<Box<dyn ArrayPartialDecoderTraits + 'a>, CodecError>;
    fn async_partial_decoder<'a, 'life0, 'life1, 'async_trait>(
        &'a self,
        input_handle: Box<dyn AsyncArrayPartialDecoderTraits + 'a>,
        decoded_representation: &'life0 ChunkRepresentation,
        options: &'life1 CodecOptions
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncArrayPartialDecoderTraits + 'a>, CodecError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Traits for array to array codecs.

Required Methods§

source

fn compute_encoded_size( &self, decoded_representation: &ChunkRepresentation ) -> Result<ChunkRepresentation, CodecError>

Returns the size of the encoded representation given a size of the decoded representation.

§Errors

Returns a CodecError if the decoded representation is not supported by this codec.

source

fn partial_decoder<'a>( &'a self, input_handle: Box<dyn ArrayPartialDecoderTraits + 'a>, decoded_representation: &ChunkRepresentation, options: &CodecOptions ) -> Result<Box<dyn ArrayPartialDecoderTraits + 'a>, CodecError>

Initialise a partial decoder.

parallel only affects parallelism on initialisation, which is irrelevant for most codecs. Parallel partial decoding support is independent of how the partial decoder is initialised.

§Errors

Returns a CodecError if initialisation fails.

source

fn async_partial_decoder<'a, 'life0, 'life1, 'async_trait>( &'a self, input_handle: Box<dyn AsyncArrayPartialDecoderTraits + 'a>, decoded_representation: &'life0 ChunkRepresentation, options: &'life1 CodecOptions ) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncArrayPartialDecoderTraits + 'a>, CodecError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Available on crate feature async only.

Initialise an asynchronous partial decoder.

parallel only affects parallelism on initialisation, which is irrelevant for most codecs. Parallel partial decoding support is independent of how the partial decoder is initialised.

§Errors

Returns a CodecError if initialisation fails.

Implementors§

source§

impl ArrayToArrayCodecTraits for BitroundCodec

Available on crate feature bitround only.
source§

impl ArrayToArrayCodecTraits for TransposeCodec

Available on crate feature transpose only.