Function compress_tools::uncompress_archive_file[][src]

pub fn uncompress_archive_file<R, W>(
    source: R,
    target: W,
    path: &str
) -> Result<usize> where
    R: Read + Seek,
    W: Write
Expand description

Uncompress a specific file from an archive. The source is used as a reader, the target as a writer and the path is the relative path for the file to be extracted from the archive.

Example

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

let mut source = File::open("tree.tar.gz")?;
let mut target = Vec::default();

uncompress_archive_file(&mut source, &mut target, "file/path")?;