#[repr(u8)]pub enum CompressionScheme {
None = 0,
LZ4 = 1,
ByteGrouping4LZ4 = 2,
Auto = 99,
}Expand description
Dis-allow the value of ascii capital letters as valid CompressionScheme, 65-90
Variants§
Implementations§
Source§impl CompressionScheme
impl CompressionScheme
Sourcepub fn resolve_for_data(&self, data: &[u8]) -> Self
pub fn resolve_for_data(&self, data: &[u8]) -> Self
Resolves Auto to a concrete scheme by analyzing the data.
pub fn compress_from_slice<'a>(&self, data: &'a [u8]) -> Result<Cow<'a, [u8]>>
pub fn decompress_from_slice<'a>(&self, data: &'a [u8]) -> Result<Cow<'a, [u8]>>
pub fn decompress_from_reader<R: Read, W: Write>( &self, reader: &mut R, writer: &mut W, ) -> Result<u64>
Sourcepub fn choose_from_data(data: &[u8]) -> Self
pub fn choose_from_data(data: &[u8]) -> Self
Chooses the compression scheme based on a KL-divergence heuristic.
Trait Implementations§
Source§impl Clone for CompressionScheme
impl Clone for CompressionScheme
Source§fn clone(&self) -> CompressionScheme
fn clone(&self) -> CompressionScheme
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 CompressionScheme
impl Debug for CompressionScheme
Source§impl Default for CompressionScheme
impl Default for CompressionScheme
Source§fn default() -> CompressionScheme
fn default() -> CompressionScheme
Returns the “default value” for a type. Read more
Source§impl Display for CompressionScheme
impl Display for CompressionScheme
Source§impl From<&CompressionScheme> for &'static str
impl From<&CompressionScheme> for &'static str
Source§fn from(value: &CompressionScheme) -> Self
fn from(value: &CompressionScheme) -> Self
Converts to this type from the input type.
Source§impl From<CompressionScheme> for &'static str
impl From<CompressionScheme> for &'static str
Source§fn from(value: CompressionScheme) -> Self
fn from(value: CompressionScheme) -> Self
Converts to this type from the input type.
Source§impl FromStr for CompressionScheme
impl FromStr for CompressionScheme
Source§impl PartialEq for CompressionScheme
impl PartialEq for CompressionScheme
Source§impl TryFrom<u8> for CompressionScheme
impl TryFrom<u8> for CompressionScheme
impl Copy for CompressionScheme
impl Eq for CompressionScheme
impl StructuralPartialEq for CompressionScheme
Auto Trait Implementations§
impl Freeze for CompressionScheme
impl RefUnwindSafe for CompressionScheme
impl Send for CompressionScheme
impl Sync for CompressionScheme
impl Unpin for CompressionScheme
impl UnsafeUnpin for CompressionScheme
impl UnwindSafe for CompressionScheme
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> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.