pub fn compress_with_loaded_dict(&mut self, frame: &[u8]) -> Result<Bytes> {
        let mut buf = Vec::with_capacity(zstd_safe::compress_bound(frame.len()));
        self.cctx
            .compress2(&mut buf, frame)
            .map_err(code_to_err)
            .context("zstd compress2 failed")?;
        Ok(buf.into())
    }
/// Compresses the given frame using the previously loaded dict, if any.
Compresses the given frame using the previously loaded dict, if any.
Compresses the given frame using the previously loaded dict if any .
pub fn compress_with_loaded_dict(&mut self, frame: &[u8]) -> Result<Bytes> {
        let mut buf = Vec::with_capacity(zstd_safe::compress_bound(frame.len()));
        self.cctx
            .compress2(&mut buf, frame)
            .map_err(code_to_err)
            .context("zstd compress2 failed")?;
        Ok(buf.into())
    }
pub fn compress_with_loaded_dict ( & mut self , frame : & [ u8 ] ) -> Result < Bytes > { let mut buf = Vec :: with_capacity ( zstd_safe :: compress_bound ( frame . len ( ) ) ) ; self . cctx . compress2 ( & mut buf , frame ) . map_err ( code_to_err ) . context ( " " ) ? ; Ok ( buf . into ( ) ) }
Compresses the given frame using the previously loaded dict, if any.
Compresses the given frame using the previously loaded dict if any .
&mut self
frame
&[u8]
&mut self
frame
&[u8]