3 ms·
> Dumb question: Is it possible to create a utility or even a hack that performs "random access" into tar archives? Yes. If the tar file is on a seek-able med
by pwg 8y ago
> Dumb question: Is it possible to create a utility or even a hack that performs "random access" into tar archives?
Yes. If the tar file is on a seek-able medium, just read the headers only and build an index to the offsets of the file contents from the header data.
Then use the offsets index to seek to just the item of interest and read out only it and nothing more.
Now, does such a utility already exist? The answer seems to be yes: https://github.com/devsnd/tarindexer https://github.com/devsnd/tarindexer