com.kagekirin.targzreader

0.0.4 • Public • Published

TarGzReader

A relatively simple and straightforward class to read the file data from a .tar archive, with or without gz compression.

Notes

  • PaxHeader entries are skipped, since we mostly target to get the entries data, not their metadata.

More on PaxHeaders.

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);
}

Package Sidebar

Install

npm i com.kagekirin.targzreader

Weekly Downloads

3

Version

0.0.4

License

none

Unpacked Size

30.1 kB

Total Files

17

Last publish

Collaborators

  • kagekirin