pub struct ZstdStreamCompressor { /* private fields */ }Expand description
Streaming zstd compressor compatible with Mars async path.
Uses one compression stream with windowLog=16, flushing each chunk and
emitting the final frame epilogue in flush().
Implementations§
Source§impl ZstdStreamCompressor
impl ZstdStreamCompressor
Sourcepub fn new(level: i32) -> Result<Self, CompressError>
pub fn new(level: i32) -> Result<Self, CompressError>
Creates a streaming zstd compressor configured to match Mars async settings.
Trait Implementations§
Source§impl StreamCompressor for ZstdStreamCompressor
impl StreamCompressor for ZstdStreamCompressor
Source§fn compress_chunk(
&mut self,
input: &[u8],
output: &mut Vec<u8>,
) -> Result<(), CompressError>
fn compress_chunk( &mut self, input: &[u8], output: &mut Vec<u8>, ) -> Result<(), CompressError>
Compresses one input chunk and appends newly emitted bytes to
output.Auto Trait Implementations§
impl !UnwindSafe for ZstdStreamCompressor
impl Freeze for ZstdStreamCompressor
impl RefUnwindSafe for ZstdStreamCompressor
impl Send for ZstdStreamCompressor
impl Sync for ZstdStreamCompressor
impl Unpin for ZstdStreamCompressor
impl UnsafeUnpin for ZstdStreamCompressor
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