pub enum ScpCompressionAlgorithm {
None,
Rle,
Lz77 {
window_size: usize,
},
Delta {
base_value: u8,
},
Xor {
key: Vec<u8>,
},
}Expand description
Compression/transform algorithm used by a pipeline stage.
All algorithms are implemented in pure Rust with no external dependencies.
Variants§
None
Identity pass-through — data is stored unchanged.
Rle
Run-Length Encoding: encodes consecutive repeated bytes as
(count: u8, byte: u8) pairs. Count is clamped to 255.
Lz77
LZ77-style sliding-window compressor.
Emits either a literal token (0x00, byte) or a back-reference token
(0x01, offset_lo, offset_hi, length) when a repeated sequence of
length ≥ 3 is found in the sliding window.
Delta
Delta encoding: each byte is replaced by its difference from the
previous byte. The first byte is XOR-ed with base_value.
Xor
XOR-cipher transform: each byte is XOR-ed with the cycling key.
Useful as a lightweight obfuscation or entropy-normalization pass before a heavier compressor.
Implementations§
Trait Implementations§
Source§impl Clone for ScpCompressionAlgorithm
impl Clone for ScpCompressionAlgorithm
Source§fn clone(&self) -> ScpCompressionAlgorithm
fn clone(&self) -> ScpCompressionAlgorithm
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ScpCompressionAlgorithm
impl Debug for ScpCompressionAlgorithm
impl Eq for ScpCompressionAlgorithm
Source§impl PartialEq for ScpCompressionAlgorithm
impl PartialEq for ScpCompressionAlgorithm
Source§fn eq(&self, other: &ScpCompressionAlgorithm) -> bool
fn eq(&self, other: &ScpCompressionAlgorithm) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ScpCompressionAlgorithm
Auto Trait Implementations§
impl Freeze for ScpCompressionAlgorithm
impl RefUnwindSafe for ScpCompressionAlgorithm
impl Send for ScpCompressionAlgorithm
impl Sync for ScpCompressionAlgorithm
impl Unpin for ScpCompressionAlgorithm
impl UnsafeUnpin for ScpCompressionAlgorithm
impl UnwindSafe for ScpCompressionAlgorithm
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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>
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