pub struct ZlibDecompressor { /* private fields */ }Expand description
Zlib-stream decompressor for Gateway messages.
This handles Discord’s zlib-stream compression where all messages share a single compression context. Each message ends with the SYNC_FLUSH suffix.
§Optimization
Uses flate2::Decompress directly to avoid re-initializing zlib context
and reuses the output buffer to avoid allocations.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ZlibDecompressor
impl RefUnwindSafe for ZlibDecompressor
impl Send for ZlibDecompressor
impl Sync for ZlibDecompressor
impl Unpin for ZlibDecompressor
impl UnwindSafe for ZlibDecompressor
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