this post was submitted on 06 Jun 2024
921 points (99.0% liked)

linuxmemes

20751 readers
1149 users here now

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!

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 94 points 3 months ago (6 children)

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.

[โ€“] [email protected] 3 points 3 months ago

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

load more comments (5 replies)