copy_encode

Function copy_encode 

Source
pub fn copy_encode<R: Read, W: Write>(
    source: R,
    destination: W,
    level: u32,
) -> Result<()>
Expand description

Compress all data from the given source as if using a read::XzEncoder.

Compressed data will be appended to destination. The level argument is typically 0-9 with 6 being a good default. To use the slower xz --extreme-style preset, bitwise-OR a level with stream::PRESET_EXTREME (for example, 6 | stream::PRESET_EXTREME).