pub trait Compressor: Sync {
// Required methods
fn name(&self) -> &'static str;
fn compress(&self, input: &[u8]) -> Vec<u8> ⓘ;
fn decompress(&self, input: &[u8]) -> Result<Vec<u8>, CompressionError>;
// Provided method
fn stats(&self, input: &[u8]) -> Result<CompressionStats, CompressionError> { ... }
}