pub fn encode_all<R: Read>(source: R, level: u32) -> Result<Vec<u8>>
Compress from the given source as if using a read::XzEncoder.
The input data must be in the xz format.