unpack_tar

Function unpack_tar 

Source
pub fn unpack_tar(tar_data: &[u8]) -> Result<(Vec<u8>, BtfArchive)>
Expand description

Unpack a tar archive, returning the contents of package.json;

It will also try get the btfhub-archive path in the unpacked directory.

It will return the btf archive path and the temporary path to hold it, if applies

Note: once the tempdir was destructed, the btf archive will be deleted