A relatively simple and straightforward class to read the file data from a .tar
archive,
with or without gz
compression.
PaxHeader
entries are skipped, since we mostly target to get the entries data, not their metadata.
The intended use-case is the retrieval of the contained files, e.g. by an asset importer.
As an example, 3 ScriptedImporters
are part of the repo, BUT NOT of the package.
using (var tar = new Tar(assetPath))
{
contents = new List<string>(tar.dictionary.Keys);
}
using (var tar = new Tar(GzReader.ExtractGz(assetPath)))
{
contents = new List<string>(tar.dictionary.Keys);
}