this post was submitted on 13 Sep 2023
429 points (97.6% liked)

Programmer Humor

31217 readers
36 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 4 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 5 points 9 months ago (3 children)

They both have their use cases. Zstandard is for compression of a stream of data (or a single file), while 7-Zip is actually two parts: A directory structure (like tar) plus a compression algorithm (like LZMA which it uses by default) in a single app.

7-Zip is actually adding zstd support: https://sourceforge.net/p/sevenzip/feature-requests/1580/

[–] [email protected] 1 points 9 months ago* (last edited 9 months ago) (2 children)

Well when using zstd, you tar first, something like tar -I zstd -cf my_tar.tar.zst my_files/*. You almost never call zstd directly and always use some kind of wrapper.

[–] [email protected] 7 points 9 months ago (1 children)

Sure, you can tar first. That has various issues though, for example if you just want to extract one file in the middle of the archive, it still needs to decompress everything up to that point. Something like 7-Zip is more sophisticated in terms of how it indexes files in the archive, so I'm looking forward to them adding zstd support.

FWIW most of my uses of zstd don't involve tar, but it's in things like Borgbackup, database systems, etc.

[–] [email protected] 1 points 9 months ago

Yes, definitely. My biggest use is transparent filesystem compression, so I completely agree!