pub trait Compress: Send + Sync {
    // Required method
    fn compress_bytes(
        &mut self,
        bytes: &[u8],
        writer: &mut dyn Write,
    ) -> Result<(), BoxError>;
}Expand description
Types implementing this trait can compress data.
Compression algorithms are used reduce the size of data. This trait requires Send + Sync because trait implementors are often used in an async context.