com.kagekirin.targzreader
v0.0.4
Published
Simple C# reader for .tar, .tar.gz or .tgz files.
Maintainers
Readme
TarGzReader
A relatively simple and straightforward class to read the file data from a .tar archive,
with or without gz compression.
Notes
PaxHeaderentries are skipped, since we mostly target to get the entries data, not their metadata.
Usage
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.
.tar file
using (var tar = new Tar(assetPath))
{
contents = new List<string>(tar.dictionary.Keys);
}.tgz or .tar.gz file
using (var tar = new Tar(GzReader.ExtractGz(assetPath)))
{
contents = new List<string>(tar.dictionary.Keys);
}