Trait zarrs::array::codec::CodecTraits
source · pub trait CodecTraits: Send + Sync {
// Required methods
fn create_metadata_opt(
&self,
options: &ArrayMetadataOptions
) -> Option<Metadata>;
fn partial_decoder_should_cache_input(&self) -> bool;
fn partial_decoder_decodes_all(&self) -> bool;
// Provided method
fn create_metadata(&self) -> Option<Metadata> { ... }
}
Expand description
Codec traits.
Required Methods§
sourcefn create_metadata_opt(
&self,
options: &ArrayMetadataOptions
) -> Option<Metadata>
fn create_metadata_opt( &self, options: &ArrayMetadataOptions ) -> Option<Metadata>
Create metadata.
A hidden codec (e.g. a cache) will return None
, since it will not have any associated metadata.
sourcefn partial_decoder_should_cache_input(&self) -> bool
fn partial_decoder_should_cache_input(&self) -> bool
Indicates if the input to a codecs partial decoder should be cached for optimal performance.
If true, a cache may be inserted before it in a CodecChain
partial decoder.
sourcefn partial_decoder_decodes_all(&self) -> bool
fn partial_decoder_decodes_all(&self) -> bool
Indicates if a partial decoder decodes all bytes from its input handle and its output should be cached for optimal performance.
If true, a cache will be inserted at some point after it in a CodecChain
partial decoder.
Provided Methods§
sourcefn create_metadata(&self) -> Option<Metadata>
fn create_metadata(&self) -> Option<Metadata>
Create metadata with default options.
A hidden codec (e.g. a cache) will return None
, since it will not have any associated metadata.
Implementors§
impl CodecTraits for BitroundCodec
Available on crate feature
bitround
only.impl CodecTraits for TransposeCodec
Available on crate feature
transpose
only.impl CodecTraits for BytesCodec
impl CodecTraits for CodecChain
impl CodecTraits for PcodecCodec
Available on crate feature
pcodec
only.impl CodecTraits for ShardingCodec
Available on crate feature
sharding
only.impl CodecTraits for ZfpCodec
Available on crate feature
zfp
only.impl CodecTraits for BloscCodec
Available on crate feature
blosc
only.impl CodecTraits for Bz2Codec
Available on crate feature
bz2
only.impl CodecTraits for Crc32cCodec
Available on crate feature
crc32c
only.impl CodecTraits for GzipCodec
Available on crate feature
gzip
only.impl CodecTraits for ZstdCodec
Available on crate feature
zstd
only.