pub fn uncompress_archive_with_encoding<R>(
    source: R,
    dest: &Path,
    ownership: Ownership,
    decode: DecodeCallback
) -> Result<()>where
    R: Read + Seek,
Expand description

Uncompress an archive using source as a reader and dest as the destination directory.

Example

use compress_tools::*;
use std::fs::File;
use std::path::Path;

let mut source = File::open("tree.tar.gz")?;
let dest = Path::new("/tmp/dest");
let decode_utf8 = |bytes: &[u8]| Ok(std::str::from_utf8(bytes)?.to_owned());

uncompress_archive_with_encoding(&mut source, &dest, Ownership::Preserve, decode_utf8)?;