A .tar archive is basically only the files cat’ed together, with a header and index added, right?

And a .tar.gz takes forever to modify, because it needs to first extract the .tar.

So why is there no archive format that just cat’es the compressed files together?

  • Melllvar@startrek.website
    link
    fedilink
    English
    arrow-up
    9
    ·
    3 days ago

    A .tar archive is basically only the files cat’ed together, with a header and index added, right?

    Tar does not include an index. It’s just the headers and data cat’ed together. You have to read from the beginning of the archive until you find the file you want. This is exacerbated if the archive is also gzipped, since you have to decompress all the files leading up to the one you want, as opposed to skipping over them as you could do in an uncompressed tar archive.

    So why is there no archive format that just cat’es the compressed files together?

    That’s essentially what a zip archive does. Each file is compressed separately and cat’ed together with uncompressed headers in between. Also zip archives do have an index which is what allows for random access and easy changes. The downside is that the compression ratio of a zip archive can be worse than a tar.gz archive.