Struct below_store::compression::Decompressor
source · pub struct Decompressor<K> { /* private fields */ }Implementations§
source§impl<K> Decompressor<K>
impl<K> Decompressor<K>
pub fn new() -> Self
sourcepub fn get_dict_key(&self) -> Option<&K>
pub fn get_dict_key(&self) -> Option<&K>
Gets the key associated with the loaded dict.
sourcepub fn load_dict(&mut self, dict: Bytes, key: K) -> Result<()>
pub fn load_dict(&mut self, dict: Bytes, key: K) -> Result<()>
Loads the given dict and associates it with the given key, whose meaning is user-defined. Only frames with a matching key should be decompressed with this dict.
sourcepub fn decompress_with_loaded_dict(&mut self, frame: &[u8]) -> Result<Bytes>
pub fn decompress_with_loaded_dict(&mut self, frame: &[u8]) -> Result<Bytes>
Decompresses the given frame using the previously loaded dict, if any.
sourcepub fn decompress_with_dict_reset(&mut self, frame: &[u8]) -> Result<Bytes>
pub fn decompress_with_dict_reset(&mut self, frame: &[u8]) -> Result<Bytes>
Decompresses the given frame after resetting dict.
Auto Trait Implementations§
impl<K> RefUnwindSafe for Decompressor<K>where K: RefUnwindSafe,
impl<K> Send for Decompressor<K>where K: Send,
impl<K> !Sync for Decompressor<K>
impl<K> Unpin for Decompressor<K>where K: Unpin,
impl<K> UnwindSafe for Decompressor<K>where K: UnwindSafe,
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