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)
- stay on topic
- be nice (no name calling)
- do not post long blocks of text such as logs
- do not delete your posts
- only post questions (no information posts)
Tips for giving and receiving help
- be as clear and specific
- say thank you if a solution works
- verify your solutions before posting them as facts.
Any rule violations will result in disciplinary actions
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
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.
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.