Struct zarrs::array::codec::array_to_array::bitround::BitroundCodec
source · pub struct BitroundCodec { /* private fields */ }Available on crate feature
bitround only.Expand description
A bitround codec implementation.
Implementations§
source§impl BitroundCodec
impl BitroundCodec
sourcepub const fn new(keepbits: u32) -> Self
pub const fn new(keepbits: u32) -> Self
Create a new bitround codec.
keepbits is the number of bits to round to in the floating point mantissa.
sourcepub const fn new_with_configuration(
configuration: &BitroundCodecConfiguration
) -> Self
pub const fn new_with_configuration( configuration: &BitroundCodecConfiguration ) -> Self
Create a new bitround codec from a configuration.
Trait Implementations§
source§impl ArrayCodecTraits for BitroundCodec
impl ArrayCodecTraits for BitroundCodec
source§fn encode_opt(
&self,
decoded_value: Vec<u8>,
decoded_representation: &ChunkRepresentation,
_parallel: bool
) -> Result<Vec<u8>, CodecError>
fn encode_opt( &self, decoded_value: Vec<u8>, decoded_representation: &ChunkRepresentation, _parallel: bool ) -> Result<Vec<u8>, CodecError>
Encode array with optional parallelism. Read more
source§fn decode_opt(
&self,
encoded_value: Vec<u8>,
_decoded_representation: &ChunkRepresentation,
_parallel: bool
) -> Result<Vec<u8>, CodecError>
fn decode_opt( &self, encoded_value: Vec<u8>, _decoded_representation: &ChunkRepresentation, _parallel: bool ) -> Result<Vec<u8>, CodecError>
Decode array with optional parallelism. Read more
source§fn async_encode_opt<'life0, 'life1, 'async_trait>(
&'life0 self,
decoded_value: Vec<u8>,
decoded_representation: &'life1 ChunkRepresentation,
_parallel: bool
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, CodecError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn async_encode_opt<'life0, 'life1, 'async_trait>(
&'life0 self,
decoded_value: Vec<u8>,
decoded_representation: &'life1 ChunkRepresentation,
_parallel: bool
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, CodecError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Available on crate feature
async only.Asynchronously encode array with optional parallelism. Read more
source§fn async_decode_opt<'life0, 'life1, 'async_trait>(
&'life0 self,
encoded_value: Vec<u8>,
decoded_representation: &'life1 ChunkRepresentation,
_parallel: bool
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, CodecError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn async_decode_opt<'life0, 'life1, 'async_trait>(
&'life0 self,
encoded_value: Vec<u8>,
decoded_representation: &'life1 ChunkRepresentation,
_parallel: bool
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, CodecError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Available on crate feature
async only.Asynchronously decode array with optional parallelism. Read more
source§fn encode(
&self,
decoded_value: Vec<u8>,
decoded_representation: &ChunkRepresentation
) -> Result<Vec<u8>, CodecError>
fn encode( &self, decoded_value: Vec<u8>, decoded_representation: &ChunkRepresentation ) -> Result<Vec<u8>, CodecError>
Encode array. Read more
source§fn par_encode(
&self,
decoded_value: Vec<u8>,
decoded_representation: &ChunkRepresentation
) -> Result<Vec<u8>, CodecError>
fn par_encode( &self, decoded_value: Vec<u8>, decoded_representation: &ChunkRepresentation ) -> Result<Vec<u8>, CodecError>
Encode array using multithreading (if supported). Read more
source§fn decode(
&self,
encoded_value: Vec<u8>,
decoded_representation: &ChunkRepresentation
) -> Result<Vec<u8>, CodecError>
fn decode( &self, encoded_value: Vec<u8>, decoded_representation: &ChunkRepresentation ) -> Result<Vec<u8>, CodecError>
Decode array. Read more
source§fn par_decode(
&self,
encoded_value: Vec<u8>,
decoded_representation: &ChunkRepresentation
) -> Result<Vec<u8>, CodecError>
fn par_decode( &self, encoded_value: Vec<u8>, decoded_representation: &ChunkRepresentation ) -> Result<Vec<u8>, CodecError>
Decode array using multithreading (if supported). Read more
source§impl ArrayToArrayCodecTraits for BitroundCodec
impl ArrayToArrayCodecTraits for BitroundCodec
source§fn partial_decoder_opt<'a>(
&'a self,
input_handle: Box<dyn ArrayPartialDecoderTraits + 'a>,
decoded_representation: &ChunkRepresentation,
_parallel: bool
) -> Result<Box<dyn ArrayPartialDecoderTraits + 'a>, CodecError>
fn partial_decoder_opt<'a>( &'a self, input_handle: Box<dyn ArrayPartialDecoderTraits + 'a>, decoded_representation: &ChunkRepresentation, _parallel: bool ) -> Result<Box<dyn ArrayPartialDecoderTraits + 'a>, CodecError>
Initialise a partial decoder with optional parallelism. Read more
source§fn async_partial_decoder_opt<'a, 'life0, 'async_trait>(
&'a self,
input_handle: Box<dyn AsyncArrayPartialDecoderTraits + 'a>,
decoded_representation: &'life0 ChunkRepresentation,
_parallel: bool
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncArrayPartialDecoderTraits + 'a>, CodecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
fn async_partial_decoder_opt<'a, 'life0, 'async_trait>(
&'a self,
input_handle: Box<dyn AsyncArrayPartialDecoderTraits + 'a>,
decoded_representation: &'life0 ChunkRepresentation,
_parallel: bool
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncArrayPartialDecoderTraits + 'a>, CodecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
Available on crate feature
async only.Initialise an asynchronous partial decoder with optional parallelism. Read more
source§fn compute_encoded_size(
&self,
decoded_representation: &ChunkRepresentation
) -> Result<ChunkRepresentation, CodecError>
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. Read more
source§fn partial_decoder<'a>(
&'a self,
input_handle: Box<dyn ArrayPartialDecoderTraits + 'a>,
decoded_representation: &ChunkRepresentation
) -> Result<Box<dyn ArrayPartialDecoderTraits + 'a>, CodecError>
fn partial_decoder<'a>( &'a self, input_handle: Box<dyn ArrayPartialDecoderTraits + 'a>, decoded_representation: &ChunkRepresentation ) -> Result<Box<dyn ArrayPartialDecoderTraits + 'a>, CodecError>
Initialise a partial decoder. Read more
source§fn par_partial_decoder<'a>(
&'a self,
input_handle: Box<dyn ArrayPartialDecoderTraits + 'a>,
decoded_representation: &ChunkRepresentation
) -> Result<Box<dyn ArrayPartialDecoderTraits + 'a>, CodecError>
fn par_partial_decoder<'a>( &'a self, input_handle: Box<dyn ArrayPartialDecoderTraits + 'a>, decoded_representation: &ChunkRepresentation ) -> Result<Box<dyn ArrayPartialDecoderTraits + 'a>, CodecError>
Initialise a partial decoder with multithreading (where supported). Read more
source§fn async_partial_decoder<'a, 'life0, 'async_trait>(
&'a self,
input_handle: Box<dyn AsyncArrayPartialDecoderTraits + 'a>,
decoded_representation: &'life0 ChunkRepresentation
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncArrayPartialDecoderTraits + 'a>, CodecError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
fn async_partial_decoder<'a, 'life0, 'async_trait>(
&'a self,
input_handle: Box<dyn AsyncArrayPartialDecoderTraits + 'a>,
decoded_representation: &'life0 ChunkRepresentation
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncArrayPartialDecoderTraits + 'a>, CodecError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
Available on crate feature
async only.Initialise an asynchronous partial decoder. Read more
source§fn async_par_partial_decoder<'a, 'life0, 'async_trait>(
&'a self,
input_handle: Box<dyn AsyncArrayPartialDecoderTraits + 'a>,
decoded_representation: &'life0 ChunkRepresentation
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncArrayPartialDecoderTraits + 'a>, CodecError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
fn async_par_partial_decoder<'a, 'life0, 'async_trait>(
&'a self,
input_handle: Box<dyn AsyncArrayPartialDecoderTraits + 'a>,
decoded_representation: &'life0 ChunkRepresentation
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncArrayPartialDecoderTraits + 'a>, CodecError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
Available on crate feature
async only.Initialise an asynchronous partial decoder with multithreading (where supported). Read more
source§impl Clone for BitroundCodec
impl Clone for BitroundCodec
source§fn clone(&self) -> BitroundCodec
fn clone(&self) -> BitroundCodec
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 BitroundCodec
impl CodecTraits for BitroundCodec
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.source§impl Debug for BitroundCodec
impl Debug for BitroundCodec
source§impl Default for BitroundCodec
impl Default for BitroundCodec
source§fn default() -> BitroundCodec
fn default() -> BitroundCodec
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for BitroundCodec
impl Send for BitroundCodec
impl Sync for BitroundCodec
impl Unpin for BitroundCodec
impl UnwindSafe for BitroundCodec
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