1 2 3 4 5 6 7 8 9
use anyhow::Result; pub trait CompressionProvider { fn is_compressed_filename(&self, filename: &str) -> bool; fn compress(&self, bytes: &[u8]) -> Result<Vec<u8>>; fn decompress(&self, bytes: &[u8]) -> Result<Vec<u8>>; }
1 2 3 4 5 6 7 8 9
use anyhow::Result; pub trait CompressionProvider { fn is_compressed_filename(&self, filename: &str) -> bool; fn compress(&self, bytes: &[u8]) -> Result<Vec<u8>>; fn decompress(&self, bytes: &[u8]) -> Result<Vec<u8>>; }