Where the Unix philosophy "do one thing well" fails.
by exerceo from LinuxQuestions.org on (#6NDXJ)
My unpopular opinion is that nothing purely Unix-based can fully replace 7z.
The Unix philosophy tells us "do one thing well", so the files are handled in two passes: TAR handles the file archival and something else (gzip, bzip2, xz) handles the compression part.
This approach however has a weakness:
Any compressed tarball (.TAR.GZ, .TAR.BZ2, etc.) needs to be read from beginning to end to list all the files because TAR has no table of contents, only individual file headers and associated file contents.
An uncompressed TAR can be listed faster than a compressed TAR (.tar.gz .tar.bz2 and so on) because the archive manager can simply jump over file contents. This does however not work with compressed data streams (gz, bz2, etc.). 7z handles this elegantly: it provides both solid compression and an instantly loading table of contents.
I know, 7z does not preserve Unix file permissions, so it might not be desirable for backups of multiple user profiles, but 7z is the only non-proprietary solid compression format I am aware of that has a TOC (table of contents) that loads instantly.
I realize the lack of a table of contents of TAR that has benefits too (e.g. no need to keep the entire TOC in RAM during archive creation), but being able to see the table of contents instantly is simply too convenient.
The Unix philosophy tells us "do one thing well", so the files are handled in two passes: TAR handles the file archival and something else (gzip, bzip2, xz) handles the compression part.
This approach however has a weakness:
Any compressed tarball (.TAR.GZ, .TAR.BZ2, etc.) needs to be read from beginning to end to list all the files because TAR has no table of contents, only individual file headers and associated file contents.
An uncompressed TAR can be listed faster than a compressed TAR (.tar.gz .tar.bz2 and so on) because the archive manager can simply jump over file contents. This does however not work with compressed data streams (gz, bz2, etc.). 7z handles this elegantly: it provides both solid compression and an instantly loading table of contents.
I know, 7z does not preserve Unix file permissions, so it might not be desirable for backups of multiple user profiles, but 7z is the only non-proprietary solid compression format I am aware of that has a TOC (table of contents) that loads instantly.
I realize the lack of a table of contents of TAR that has benefits too (e.g. no need to keep the entire TOC in RAM during archive creation), but being able to see the table of contents instantly is simply too convenient.