pub enum CompressionResult {
BigEndianBest {
compressed_data: Vec<u8>,
le_size: usize,
},
LittleEndianBest {
compressed_data: Vec<u8>,
be_size: usize,
},
Neither {
be_size: usize,
le_size: usize,
},
}Expand description
Result of attempting compression by interpreting the input data as both big endian and little endian big integers.
This enum represents which interpretation produced the best compression result, or if neither produced compression (both were larger than the original).
Variants§
BigEndianBest
Big endian compression produced the smallest output. Contains the compressed data and the size of the little endian attempt for comparison.
Fields
LittleEndianBest
Little endian compression produced the smallest output. Contains the compressed data and the size of the big endian attempt for comparison.
Fields
Neither
Neither compression method produced a smaller output than the original. Contains sizes for both attempts.
Trait Implementations§
Source§impl Clone for CompressionResult
impl Clone for CompressionResult
Source§fn clone(&self) -> CompressionResult
fn clone(&self) -> CompressionResult
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 CompressionResult
impl Debug for CompressionResult
Source§impl PartialEq for CompressionResult
impl PartialEq for CompressionResult
impl StructuralPartialEq for CompressionResult
Auto Trait Implementations§
impl Freeze for CompressionResult
impl RefUnwindSafe for CompressionResult
impl Send for CompressionResult
impl Sync for CompressionResult
impl Unpin for CompressionResult
impl UnwindSafe for CompressionResult
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