this post was submitted on 28 Nov 2025
24 points (96.2% liked)

Linux Questions

2896 readers
25 users here now

Linux questions Rules (in addition of the Lemmy.zip rules)

Tips for giving and receiving help

Any rule violations will result in disciplinary actions

founded 2 years ago
MODERATORS
 

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?

you are viewing a single comment's thread
view the rest of the comments
[–] charonn0@startrek.website 8 points 1 day 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.