pub struct CarCompressionStats {
pub blocks_processed: usize,
pub uncompressed_bytes: usize,
pub compressed_bytes: usize,
pub blocks_compressed: usize,
}Expand description
Compression statistics for CAR operations.
Fields§
§blocks_processed: usizeTotal number of blocks processed.
uncompressed_bytes: usizeTotal uncompressed bytes written.
compressed_bytes: usizeTotal compressed bytes written.
blocks_compressed: usizeNumber of blocks that were compressed.
Implementations§
Source§impl CarCompressionStats
impl CarCompressionStats
Sourcepub fn compression_ratio(&self) -> f64
pub fn compression_ratio(&self) -> f64
Calculate the compression ratio (compressed / uncompressed).
Returns 1.0 if no compression occurred.
Sourcepub fn bytes_saved(&self) -> usize
pub fn bytes_saved(&self) -> usize
Calculate bytes saved through compression.
Sourcepub fn compression_percentage(&self) -> f64
pub fn compression_percentage(&self) -> f64
Calculate compression percentage (0-100).
Trait Implementations§
Source§impl Clone for CarCompressionStats
impl Clone for CarCompressionStats
Source§fn clone(&self) -> CarCompressionStats
fn clone(&self) -> CarCompressionStats
Returns a duplicate 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 Debug for CarCompressionStats
impl Debug for CarCompressionStats
Source§impl Default for CarCompressionStats
impl Default for CarCompressionStats
Source§fn default() -> CarCompressionStats
fn default() -> CarCompressionStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CarCompressionStats
impl RefUnwindSafe for CarCompressionStats
impl Send for CarCompressionStats
impl Sync for CarCompressionStats
impl Unpin for CarCompressionStats
impl UnwindSafe for CarCompressionStats
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> 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