Where to find these extensions? Are they portable between Linux and BSD?
The 1998 dict project included a utility called "dictzip" for random access to the contents of gzip compressed files.
Dumb question: Is it possible to create a utility or even a hack that performs "random access" into tar archives?
Example use case: the user only wants to untar a small number of selected files from a large tarball such as a source tree. The user has tried both the "-T filelist" option and using memory file systems instead of hard disk drives.
So if you concatenate files A, B, and C and then compress the result, then by the time the compressor starts compressing the data of C, it will have that table built from A and B. To extract C, you'll need to re-build the same table and thus you'll need first to decompress A and B.
In a zip file each entry is compressed individually; this gives random access, but worse compression rate, because the table is not re-used between files.
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
Funny how tar was originally developed for tape drives!