pub struct CompressionStats {
pub original_length: usize,
pub compressed_length: usize,
pub estimated_original_tokens: u32,
pub estimated_compressed_tokens: u32,
pub compression_ratio: f64,
pub token_savings: u32,
}Expand description
Compression statistics
Fields§
§original_length: usizeOriginal text length in characters
compressed_length: usizeCompressed text length in characters
estimated_original_tokens: u32Estimated original token count
estimated_compressed_tokens: u32Estimated compressed token count
compression_ratio: f64Compression ratio (compressed_length / original_length)
token_savings: u32Token savings (estimated_original_tokens - estimated_compressed_tokens)
Implementations§
Trait Implementations§
Source§impl Clone for CompressionStats
impl Clone for CompressionStats
Source§fn clone(&self) -> CompressionStats
fn clone(&self) -> CompressionStats
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 CompressionStats
impl Debug for CompressionStats
Source§impl Default for CompressionStats
impl Default for CompressionStats
Source§fn default() -> CompressionStats
fn default() -> CompressionStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CompressionStats
impl RefUnwindSafe for CompressionStats
impl Send for CompressionStats
impl Sync for CompressionStats
impl Unpin for CompressionStats
impl UnwindSafe for CompressionStats
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