pub struct ShadowCompressor { /* private fields */ }
Available on crate feature
protocol
only.Expand description
Shadow Compressor
The shadow compressor contains two compression buffers, one for size estimation, and one for the final compressed data. The first compression buffer is flushed on every write, and the second isn’t, which means the final compressed data is always at least smaller than the size estimation.
One exception to the rule is when the first write to the buffer is not checked against the target. This allows individual blocks larger than the target to be included. Notice, this will be split across multiple channel frames.
Implementations§
Source§impl ShadowCompressor
impl ShadowCompressor
Sourcepub const fn new(
config: Config,
compressor: VariantCompressor,
shadow: VariantCompressor,
) -> ShadowCompressor
pub const fn new( config: Config, compressor: VariantCompressor, shadow: VariantCompressor, ) -> ShadowCompressor
Creates a new ShadowCompressor with the given VariantCompressor.
Trait Implementations§
Source§impl Clone for ShadowCompressor
impl Clone for ShadowCompressor
Source§fn clone(&self) -> ShadowCompressor
fn clone(&self) -> ShadowCompressor
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 CompressorWriter for ShadowCompressor
impl CompressorWriter for ShadowCompressor
Source§impl Debug for ShadowCompressor
impl Debug for ShadowCompressor
Source§impl From<Config> for ShadowCompressor
impl From<Config> for ShadowCompressor
Source§fn from(config: Config) -> ShadowCompressor
fn from(config: Config) -> ShadowCompressor
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ShadowCompressor
impl RefUnwindSafe for ShadowCompressor
impl Send for ShadowCompressor
impl Sync for ShadowCompressor
impl Unpin for ShadowCompressor
impl UnwindSafe for ShadowCompressor
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§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