Struct zarrs::array::codec::bytes_to_bytes::blosc::BloscCodec
source · pub struct BloscCodec { /* private fields */ }
Available on crate feature
blosc
only.Expand description
A blosc
codec implementation.
Implementations§
source§impl BloscCodec
impl BloscCodec
sourcepub fn new(
cname: BloscCompressor,
clevel: BloscCompressionLevel,
blocksize: Option<usize>,
shuffle_mode: BloscShuffleMode,
typesize: Option<usize>
) -> Result<Self, PluginCreateError>
pub fn new( cname: BloscCompressor, clevel: BloscCompressionLevel, blocksize: Option<usize>, shuffle_mode: BloscShuffleMode, typesize: Option<usize> ) -> Result<Self, PluginCreateError>
Create a new blosc
codec.
The block size is chosen automatically if blocksize
is none or zero.
typesize
must be a positive integer if shuffling is enabled.
§Errors
Returns PluginCreateError
if
- the compressor is not supported, or
typesize
isNone
and shuffling is enabled.
sourcepub fn new_with_configuration(
configuration: &BloscCodecConfiguration
) -> Result<Self, PluginCreateError>
pub fn new_with_configuration( configuration: &BloscCodecConfiguration ) -> Result<Self, PluginCreateError>
Create a new blosc
codec from configuration.
§Errors
Returns PluginCreateError
if the configuration is not supported.
Trait Implementations§
source§impl BytesToBytesCodecTraits for BloscCodec
impl BytesToBytesCodecTraits for BloscCodec
source§fn recommended_concurrency(
&self,
_decoded_representation: &BytesRepresentation
) -> Result<RecommendedConcurrency, CodecError>
fn recommended_concurrency( &self, _decoded_representation: &BytesRepresentation ) -> Result<RecommendedConcurrency, CodecError>
Return the maximum internal concurrency supported for the requested decoded representation. Read more
source§fn encode(
&self,
decoded_value: Vec<u8>,
_options: &CodecOptions
) -> Result<Vec<u8>, CodecError>
fn encode( &self, decoded_value: Vec<u8>, _options: &CodecOptions ) -> Result<Vec<u8>, CodecError>
Encode chunk bytes. Read more
source§fn decode(
&self,
encoded_value: Vec<u8>,
_decoded_representation: &BytesRepresentation,
_options: &CodecOptions
) -> Result<Vec<u8>, CodecError>
fn decode( &self, encoded_value: Vec<u8>, _decoded_representation: &BytesRepresentation, _options: &CodecOptions ) -> Result<Vec<u8>, CodecError>
Decode chunk bytes. Read more
source§fn partial_decoder<'a>(
&'a self,
input_handle: Box<dyn BytesPartialDecoderTraits + 'a>,
_decoded_representation: &BytesRepresentation,
_parallel: &CodecOptions
) -> Result<Box<dyn BytesPartialDecoderTraits + 'a>, CodecError>
fn partial_decoder<'a>( &'a self, input_handle: Box<dyn BytesPartialDecoderTraits + 'a>, _decoded_representation: &BytesRepresentation, _parallel: &CodecOptions ) -> Result<Box<dyn BytesPartialDecoderTraits + 'a>, CodecError>
Initialises a partial decoder. Read more
source§fn async_partial_decoder<'a, 'life0, 'life1, 'async_trait>(
&'a self,
input_handle: Box<dyn AsyncBytesPartialDecoderTraits + 'a>,
_decoded_representation: &'life0 BytesRepresentation,
_parallel: &'life1 CodecOptions
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncBytesPartialDecoderTraits + 'a>, CodecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn async_partial_decoder<'a, 'life0, 'life1, 'async_trait>(
&'a self,
input_handle: Box<dyn AsyncBytesPartialDecoderTraits + 'a>,
_decoded_representation: &'life0 BytesRepresentation,
_parallel: &'life1 CodecOptions
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncBytesPartialDecoderTraits + 'a>, CodecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Available on crate feature
async
only.Initialises an asynchronous partial decoder. Read more
source§fn compute_encoded_size(
&self,
decoded_representation: &BytesRepresentation
) -> BytesRepresentation
fn compute_encoded_size( &self, decoded_representation: &BytesRepresentation ) -> BytesRepresentation
Returns the size of the encoded representation given a size of the decoded representation.
source§impl Clone for BloscCodec
impl Clone for BloscCodec
source§fn clone(&self) -> BloscCodec
fn clone(&self) -> BloscCodec
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl CodecTraits for BloscCodec
impl CodecTraits for BloscCodec
source§fn create_metadata_opt(
&self,
_options: &ArrayMetadataOptions
) -> Option<Metadata>
fn create_metadata_opt( &self, _options: &ArrayMetadataOptions ) -> Option<Metadata>
Create metadata. Read more
source§fn 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.source§fn 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.Auto Trait Implementations§
impl Freeze for BloscCodec
impl RefUnwindSafe for BloscCodec
impl Send for BloscCodec
impl Sync for BloscCodec
impl Unpin for BloscCodec
impl UnwindSafe for BloscCodec
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more