3 ms·
Tarballs don't have a TOC and can't easily index into individual entities. One could create a utility to make tarballs with a TOC and the ability to index whil
by nerpderp83 8y ago
Tarballs don't have a TOC and can't easily index into individual entities.
One could create a utility to make tarballs with a TOC and the ability to index while still remaining compatible with tar and gzip. Pigz is one step in the direction.
- matthewbauer 8y agoI think AppImage does this with SquashFS images currently.
- tejtm 8y agoto list what is in a tar ball `tar -vtf tarball.tar` to extract a particular entity 'tar -vxf tarball.tar path_in tarball_to_entity` edit: good points on it not being efficient for large archives, just demonstrating it is possible.
- discreditable 8y agoThe problem is that to know what files are in the tarball you have to read the whole thing. If the archive is large that's a lot of reading just to get a file list.
- nerpderp83 8y agoA tar is a linked list of file paths and contents, it cannot be indexed to a particular file. A compressed tar has to first be decompressed and then the chain of links traversed. Accessing a file in compressed tar is o(n) with where the file is placed within the compressed tar stream. It isn't that it is possible, it is that is horribly inefficient. Zips on other hand unify storage and compression such that one has random access to particular file, hence most modern file formats are zips with xml or json inside.