use std::{
io,
path::Path,
};
use flate2::read::GzDecoder;
pub fn unpack_tarball<R, P>(tarball: R, path: P) -> io::Result<()>
where
R: io::Read,
P: AsRef<Path>,
{
let decoder = GzDecoder::new(tarball);
println!("{:#?}", decoder.header());
tar::Archive::new(decoder).unpack(path)
}