You are viewing a single thread.
View all comments
95 points

Zip makes different tradeoffs. Its compression is basically the same as gz, but you wouldn’t know it from the file sizes.

Tar archives everything together, then compresses. The advantage is that there are more patterns available across all the files, so it can be compressed a lot more.

Zip compresses individual files, then archives. The individual files aren’t going to be compressed as much because they aren’t handling patterns between files. The advantages are that an error early in the file won’t propagate to all the other files after it, and you can read a file in the middle without decompressing everything before it.

permalink
report
reply
13 points

Yeah that’s a rather important point that’s conveniently left out too often. I routinely extract individual files out of large archives. Pretty easy and quick with zip, painfully slow and inefficient with (most) tarballs.

permalink
report
parent
reply
9 points
*
Deleted by creator
permalink
report
parent
reply
3 points

Can you evaluate the directory tree of a tar without decompressing? Not sure if gzip/bzip2 preserve that.

permalink
report
parent
reply
1 point
*

Nowhere in here do you cover bzip, the subject of this meme. And tar does not compress.

permalink
report
parent
reply
7 points

It’s just a different layer of compression. Better than gzip generally, but the tradeoffs are exactly the same.

permalink
report
parent
reply
2 points

Well, yes. But your original comment has inaccuracies due to those 2 points.

permalink
report
parent
reply

linuxmemes

!linuxmemes@lemmy.world

Create post

I use Arch btw


Sister communities:
Community rules
  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

Community stats

  • 7.5K

    Monthly active users

  • 1.3K

    Posts

  • 70K

    Comments