pub struct Bz2Codec { /* private fields */ }
Available on crate feature
bz2
only.Expand description
A bz2
codec implementation.
Implementations§
source§impl Bz2Codec
impl Bz2Codec
sourcepub fn new(level: Bz2CompressionLevel) -> Self
pub fn new(level: Bz2CompressionLevel) -> Self
Create a new bz2
codec.
sourcepub fn new_with_configuration(configuration: &Bz2CodecConfiguration) -> Self
pub fn new_with_configuration(configuration: &Bz2CodecConfiguration) -> Self
Create a new bz2
codec from configuration.
Trait Implementations§
source§impl BytesToBytesCodecTraits for Bz2Codec
impl BytesToBytesCodecTraits for Bz2Codec
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<'a>(
&self,
decoded_value: RawBytes<'a>,
_options: &CodecOptions,
) -> Result<RawBytes<'a>, CodecError>
fn encode<'a>( &self, decoded_value: RawBytes<'a>, _options: &CodecOptions, ) -> Result<RawBytes<'a>, CodecError>
Encode chunk bytes. Read more
source§fn decode<'a>(
&self,
encoded_value: RawBytes<'a>,
_decoded_representation: &BytesRepresentation,
_options: &CodecOptions,
) -> Result<RawBytes<'a>, CodecError>
fn decode<'a>( &self, encoded_value: RawBytes<'a>, _decoded_representation: &BytesRepresentation, _options: &CodecOptions, ) -> Result<RawBytes<'a>, CodecError>
Decode chunk bytes. Read more
source§fn partial_decoder<'a>(
&'a self,
input_handle: Box<dyn BytesPartialDecoderTraits + 'a>,
_decoded_representation: &BytesRepresentation,
_options: &CodecOptions,
) -> Result<Box<dyn BytesPartialDecoderTraits + 'a>, CodecError>
fn partial_decoder<'a>( &'a self, input_handle: Box<dyn BytesPartialDecoderTraits + 'a>, _decoded_representation: &BytesRepresentation, _options: &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,
_options: &'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,
_options: &'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 CodecTraits for Bz2Codec
impl CodecTraits for Bz2Codec
source§fn create_metadata_opt(
&self,
_options: &ArrayMetadataOptions,
) -> Option<MetadataV3>
fn create_metadata_opt( &self, _options: &ArrayMetadataOptions, ) -> Option<MetadataV3>
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.source§fn create_metadata(&self) -> Option<MetadataV3>
fn create_metadata(&self) -> Option<MetadataV3>
Create metadata with default options. Read more
Auto Trait Implementations§
impl Freeze for Bz2Codec
impl RefUnwindSafe for Bz2Codec
impl Send for Bz2Codec
impl Sync for Bz2Codec
impl Unpin for Bz2Codec
impl UnwindSafe for Bz2Codec
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more