pub struct StreamingConfig {
pub algorithm: CompressionAlgorithm,
pub level: u32,
pub flush_interval: usize,
pub min_chunk_size: usize,
pub buffer_size: usize,
}Expand description
Configuration for streaming compression.
Fields§
§algorithm: CompressionAlgorithmCompression algorithm to use
level: u32Compression level (algorithm-specific)
flush_interval: usizeFlush after this many bytes (0 = auto)
min_chunk_size: usizeMinimum chunk size before compressing
buffer_size: usizeBuffer size for compression output
Implementations§
Source§impl StreamingConfig
impl StreamingConfig
Sourcepub fn algorithm(self, algorithm: CompressionAlgorithm) -> Self
pub fn algorithm(self, algorithm: CompressionAlgorithm) -> Self
Set compression algorithm.
Sourcepub fn flush_interval(self, interval: usize) -> Self
pub fn flush_interval(self, interval: usize) -> Self
Set flush interval (bytes).
Sourcepub fn min_chunk_size(self, size: usize) -> Self
pub fn min_chunk_size(self, size: usize) -> Self
Set minimum chunk size.
Sourcepub fn buffer_size(self, size: usize) -> Self
pub fn buffer_size(self, size: usize) -> Self
Set buffer size.
Sourcepub fn low_latency() -> Self
pub fn low_latency() -> Self
Create config optimized for low latency streaming.
Sourcepub fn high_compression() -> Self
pub fn high_compression() -> Self
Create config optimized for high compression ratio.
Trait Implementations§
Source§impl Clone for StreamingConfig
impl Clone for StreamingConfig
Source§fn clone(&self) -> StreamingConfig
fn clone(&self) -> StreamingConfig
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 StreamingConfig
impl Debug for StreamingConfig
Auto Trait Implementations§
impl Freeze for StreamingConfig
impl RefUnwindSafe for StreamingConfig
impl Send for StreamingConfig
impl Sync for StreamingConfig
impl Unpin for StreamingConfig
impl UnwindSafe for StreamingConfig
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> Injectable for T
impl<T> Injectable for T
Source§fn type_id_of() -> TypeIdwhere
Self: Sized,
fn type_id_of() -> TypeIdwhere
Self: Sized,
Returns the TypeId of this type (for internal use)
Source§fn type_name_of() -> &'static strwhere
Self: Sized,
fn type_name_of() -> &'static strwhere
Self: Sized,
Returns the type name for debugging