fn
fn tar_extract(data: string, n: int, out_dir: string, strip_components: int) -> int
Extract a tar archive in memory into out_dir. Returns the number of regular files written, or -1 if the archive looks malformed. strip_components is identical to GNU tar's --strip-components.
let n: int = tar_extract(decoded_bytes, decoded_bytes.len(),
"/tmp/extract", 1);
if n < 0 { eprintln("bad archive"); }