pub trait CustomDecompression: Send + Sync {
// Required method
fn decompress(
&self,
data: &[u8],
algorithm: &str,
out: &mut Vec<u8>,
) -> Result<usize, CompressionError>;
}Expand description
Easily allows for custom compression formats to define how the chunk data should be uncompressed.
Required Methods§
Sourcefn decompress(
&self,
data: &[u8],
algorithm: &str,
out: &mut Vec<u8>,
) -> Result<usize, CompressionError>
fn decompress( &self, data: &[u8], algorithm: &str, out: &mut Vec<u8>, ) -> Result<usize, CompressionError>
Takes in the compressed chunk data (data), the algorithm used and the final uncompressed data should be written to out.
Can return the amount of bytes written but is not used.