News for hackers. Stuff that matters.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by dikei on Wednesday July 09, 2025 @07:14AM (#44508587)
I use ZSTD a ton in my programming work where efficiency matters.

But for sharing files with other people, ZIP is still king. Even 7z or RAR is niche. Everyone can open a ZIP file, and they don't really care if the file is a few MBs bigger.

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by cesarb on Wednesday July 09, 2025 @07:28AM (#44508690)
> Everyone can open a ZIP file, and they don't really care if the file is a few MBs bigger.

You can use ZSTD with ZIP files too! It's compression method 93 (see https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT which is the official ZIP file specification).

Which reveals that "everyone can open a ZIP file" is a lie. Sure, everyone can open a ZIP file, as long as that file uses only a limited subset of the ZIP format features. Which is why formats which use ZIP as a base (Java JAR files, OpenDocument files, new Office files) standardize such a subset; but for general-purpose ZIP files, there's no such standard.

(I have encountered such ZIP files in the wild; "unzip" can't decompress them, though p7zip worked for these particular ZIP files.)

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by justin66 on Wednesday July 09, 2025 @08:16AM (#44509106)
[delayed]
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by pornel on Wednesday July 09, 2025 @08:35AM (#44509285)
The English language is awful, and we keep updating it instead of moving to a newer language.

Some things are used for interoperability, and switching to a newer incompatible thing loses all of its value.

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by justin66 on Wednesday July 09, 2025 @11:05AM (#44510908)
Spoken languages are not analogous to file formats. Human beings are not analogous to archive programs.

Interestingly, I think if you examine the errors in the analogy you made, you’ll better understand why simply spinning off a highly tweaked zip format into its own thing with its own file extension might make more sense than stretching the existing format and hoping everyone adopts the most recent changes.

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by 6SixTy on Wednesday July 09, 2025 @02:30PM (#44513362)
.7z and .tar.* have existed for at least 20 years now, but you are unlikely to see a wild 7z file and .tar.* is isolated to the UNIX space
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by danudey on Wednesday July 09, 2025 @05:20PM (#44514849)
Tar files also have the miserable limitation of having no index; this means that to extract an individual file requires scanning through the entire archive until you find it, and then continuing to scan through the rest of the archive because a tar file can have the same file path added multiple times.

That makes them useful for transferring an entire set of files that someone will want all or none of, e.g. source code, but terrible for a set of files that someone might want to access arbitrary files from.

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by justin66 on Wednesday July 09, 2025 @09:59PM (#44516487)
Sure, but that's not really a reason to futilely try to spooge oddball algorithms that nobody is going to adopt into the .zip standard.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by easton on Wednesday July 09, 2025 @07:53AM (#44508876)
> new Office files

I know what you mean, I’m not being pedantic, but I just realized it’s been 19 years. I wonder when we’ll start calling them “Office files”.

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by mauvehaus on Wednesday July 09, 2025 @08:48AM (#44509420)
> I wonder when we’ll start calling them “Office files”.

Probably around the same time the save icon becomes something other than a 3 1/2" floppy disk.

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by jl6 on Wednesday July 09, 2025 @09:56AM (#44510101)
English is evolving as a hieroglyphic language. That floppy disk icon stands a good chance of becoming simply the glyph meaning "save". The UK still uses an icon of an 1840s-era bellows camera for its speed camera road signs. The origin story will be filed away neatly and only its residual meaning will be salient.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by kevinventullo on Wednesday July 09, 2025 @09:56AM (#44510099)
Nowadays I’ve noticed fewer applications have a save icon at all, relying instead on auto-save.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by ale42 on Wednesday July 09, 2025 @05:19PM (#44514838)
And some only save to the cloud, whence a cloud icon with an arrow. (Not that I like that, but... that's what we get)
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by guappa on Wednesday July 09, 2025 @08:09AM (#44509027)
You can and I've done it… but you can't expect anything to be able to decompress it unless you wrote it yourself.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by dikei on Wednesday July 09, 2025 @07:51AM (#44508859)
Well, only a lunatic would use ZIP with anything but DEFLATE/DEFLATE64
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by redeeman on Wednesday July 09, 2025 @09:27AM (#44509802)
there are A LOT of zip files using lzma in the wild. also, how about people learn to use updated software? should newer video compression technologies not be allowed in mkv/mp4.

if you cant open it, well.. then stop using 90ies winzip

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by 1over137 on Wednesday July 09, 2025 @09:38AM (#44509914)
>how about people learn to use updated software?

How about software developers learn to keep software working on old OSes and old hardware?

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by tiagod on Wednesday July 09, 2025 @10:09AM (#44510246)
What stops you from running updated zip/unzip on an old OS or on old hardware?
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by krapht on Wednesday July 09, 2025 @11:44AM (#44511474)
Nothing, but what stops you from using DEFLATE64?

Installing new software has a real time and hassle cost, and how much time are you actually saving over the long run? It depends on your usage patterns.

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by RealStickman_ on Wednesday July 09, 2025 @12:01PM (#44511678)
Supporting old APIs and additional legacy ways of doing things has a real cost in maintenance.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by mananaysiempre on Wednesday July 09, 2025 @12:32PM (#44512004)
So does not supporting them, but the developer gets to externalize those.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by redeeman on Wednesday July 09, 2025 @03:01PM (#44513654)
the developer is hired by someone that gets to make that decision. Ultimately the customer does. Thats why some people spend extreme resources on legacy crap, because someone has deemed it worth it.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by redeeman on Wednesday July 09, 2025 @02:09PM (#44513140)
what stops you from installing win95 and winzip?
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by redeeman on Wednesday July 09, 2025 @03:00PM (#44513647)
what software doesnt support OSs that are in active SECURITY support?
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by philipwhiuk on Wednesday July 09, 2025 @05:49PM (#44515051)
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by redeeman on Wednesday July 09, 2025 @07:00PM (#44515583)
"Retro-computing fans can download the final updates released for '90s-era OSes."

Right, and when were these "final updates" made? are you suggesting 95, 98 still sees ACTIVE security support?

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by Am4TIfIsER0ppos on Wednesday July 09, 2025 @09:54AM (#44510075)
mkv or mp4 with h264 and aac is good enough. mp3 is good enough. jpeg is good enough. zip with deflate is also good enough.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by e4m2 on Wednesday July 09, 2025 @10:11AM (#44510270)
"Good enough" is not good enough.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by redeeman on Wednesday July 09, 2025 @02:59PM (#44513638)
h264 is not good enough for many things
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by homebrewer on Wednesday July 09, 2025 @04:37PM (#44514514)
In the middle of San Francisco, with Silicon Valley level incomes, very possible. In the real world I still exchange files with users on rustic ADSL, where every megabyte counts. Many areas out there, in rural Mongolia or in the middle of Africa that's just got access to the internet, are even worse in that regard.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by dahrkael on Thursday July 10, 2025 @02:38AM (#44517986)
I started using winrar because winzip wouldnt fit in a floppy disk. so even in the 90s zip wasnt good enough
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by landl0rd on Wednesday July 09, 2025 @02:15PM (#44513193)
No. You can't get people to use updated software. You can't get a number of people to update past windows 7. This has been and will likely remain a persistent issue, and it's sure not one you're going to fix. All it will do is limit your ability to work with people. This isn't a hill on which you should die.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by redeeman on Wednesday July 09, 2025 @03:00PM (#44513643)
if they want to open certain files, they will update
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by landl0rd on Wednesday July 09, 2025 @04:07PM (#44514255)
No, they're just not going to work with you.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by TkTech on Wednesday July 09, 2025 @05:45PM (#44515030)
Yep. Half the world's finances still spin on CSVs and FTP (no, not SFTP, FTP) If your customers request a format, that's the format you're using.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by nick238 on Thursday July 10, 2025 @12:26PM (#44522746)
And if they don't request a format (or if you ask, and the response is "what's a format"), you need to use one that's 99.99% supported.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by redeeman on Wednesday July 09, 2025 @07:00PM (#44515573)
im okay with that. That being said, I have not had a single issue delivering zip files with lzma, and i KNOW that I have gotten MANY from the random sources.

I would also expect people to be able to decode h265 in an mp4 file.

Your proposal seems, to word it bluntly, retarded. You would have mp4 frozen for h264 for ETERNITY, and then invent a new format as replacement? or you would just say "god has bestowed upon the world h264, and it shall be the LAST CODEC EVER!".

get with the program. Things change, you cannot expect to be forwards compatible for ever. Sometimes people have to switch to newer versions of software.

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by GuB-42 on Wednesday July 09, 2025 @08:39PM (#44516147)
It depends on your priorities.

If your customer is stuck in the 90s because his 90s technology works perfectly fine and he has no intention to fix things that are not broken. Then deliver stuff that is compatible with 90s technology. He will be happy, will continue to work with you and you will make money.

If your customer is using the latest technologies and values size efficiency, then use the latest codecs.

I usually default to being conservative, because those who are up to date usually don't have a problem with bigger files, but those who are not are going to have a problem with recent formats. Maybe overly so, but that's my experience with working with big companies with decades long lifecycles.

Your job is not to lecture your customer, unless he asked for it. And if he asked for it, he probably expects better arguments that "update your software, idiot". Your job is to deliver what works for him. Now, of course, it is your right to be picky and leave money on the table, I will be happy to go after you and take it.

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by redeeman on Thursday July 10, 2025 @07:10AM (#44519650)
not everything is a client<->customer relationship.

Professionally I can definitely support old stuff. It costs extra most often.

Conservative doesnt have to be stuck. I am not recommending we send h266 to everyone now, but h265 is well supported, as is AV1.

lzma support in zip has been widely supported for many years at this point. I am going to be choosing my "sane defaults", and if someone has a problem with that, they can simply do what they need to do to open it, or provide a damn good reason for me to go out of my way.

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by sidewndr46 on Wednesday July 09, 2025 @09:06AM (#44509585)
Same thing with "WAV" files. There's at least 3 popular formats for the audio data out there.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by martinald on Wednesday July 09, 2025 @11:24AM (#44511199)
More 'useful' one is webp. It has both a lossy and lossless compression algorithm, which have very different strengths and weaknesses. I think nearly every device supports reading both, but so many 'image optimization' libraries and packages don't - often just doing everything as lossy when it could be lossless (icons and what not).
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by LegionMammal978 on Wednesday July 09, 2025 @02:42PM (#44513470)
It's similarly annoying how many websites take the existence of the lossy format as a license to recompress all WebP uploads, or sometimes other filetypes converted to WebP, even when it causes the filesize to increase. It's like we're returning to ye olden days of JPEG artifacts on every screenshot.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by danudey on Wednesday July 09, 2025 @05:15PM (#44514810)
I was thinking about this with YouTube as an example. A lot of people complain about the compression on YouTube videos making things look awful, but I bet there's a reasonable number of high-end content creators out there who would run a native(-ish, probably Electron) app on their local system to do a higher-quality encoding to YouTube's specifications before uploading.

In many (most?) cases, it's possible to get better compression and higher quality if you're willing to spend the CPU cycles on it, meaning that YouTube could both reduce their encoding load and increase quality at the same time, and content creators could put out better quality videos that maintain better detail.

It would certainly take longer to upload the multiple multiple versions of everything, and definitely it would take longer to encode, but it would also ease YouTube's burden and produce a better result.

Ah well, a guy can dream.

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by martinald on Wednesday July 09, 2025 @06:09PM (#44515202)
AFIAK you can upload any bitrate to youtube as long as the file is <256GB.

So you could upload a crazy high bitrate file to them for a 20 min video which I suspect would be close to "raw" quality.

I don't know how many corners youtube cut on encoding though.

I suspect most of the problem is people exporting 4k at a 'web' bitrate preset (15mbit/s?), which is actually gonna get murdered on the 2nd encode more than encoding quality on youtubes side?

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by sidewndr46 on Thursday July 10, 2025 @12:59PM (#44523058)
So apparently webp is also 'RIFF" which is the container for WAV files as well it seems. I did not know this. Also webp has its own specialized lossless algorithm. For things like icon art I generally just continue to use PNG. Is there an advantage to using Webp Losslesss?
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by throw0101d on Wednesday July 09, 2025 @09:24AM (#44509770)
> You can use ZSTD with ZIP files too!

Support for which was added in 2020:

> On 15 June 2020, Zstandard was implemented in version 6.3.8 of the zip file format with codec number 93, deprecating the previous codec number of 20 as it was implemented in version 6.3.7, released on 1 June.[36][37]

* https://en.wikipedia.org/wiki/Zstd#Usage

So I'm not sure how widely deployed it would be.

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by xxs on Wednesday July 09, 2025 @10:40AM (#44510601)
Most linux distributions have zip support with zstd.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by danudey on Wednesday July 09, 2025 @05:10PM (#44514778)
The `zip` command on Ubuntu is 6.0, which was released in 2009 and does not support zstd. It does support bzip2 though!
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by cesarb on Wednesday July 09, 2025 @08:58PM (#44516226)
> The `zip` command on Ubuntu is 6.0, which was released in 2009 and does not support zstd. It does support bzip2 though!

You probably mean the "unzip" command, which https://infozip.sourceforge.net/UnZip.html lists as 6.0 being the latest, released on 20 April 2009. Relevant to this discussion, new in that release are support for 64-bit file sizes, bzip2 compression method, and UTF-8 filenames.

The "zip" command is listed at https://infozip.sourceforge.net/Zip.html as 3.0 being the latest, released on 7 July 2008. New in that release are also support for 64-bit file sizes, bzip2 compression method, and UTF-8 filenames.

It would be great if both (or at least unzip) were updated to also support LZMA/XZ/ZSTD as compression methods, but given that there have been no new releases for over fifteen years, I'm not too hopeful.

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by hulitu on Sunday July 13, 2025 @09:35AM (#44550373)
> It would be great if both (or at least unzip) were updated to also support LZMA/XZ/ZSTD as compression methods,

Why ? Xz supports xz, zstd supports zstd. Why should unzip support xz or rar or gz ?

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by xxs on Thursday July 10, 2025 @01:58AM (#44517749)
i meant the "zip support" (as in zlib) with zstd command.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by Akronymus on Thursday July 10, 2025 @08:05AM (#44520050)
So thats why rarely the customer cant open one of the zip files we send over.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by notepad0x90 on Wednesday July 09, 2025 @08:38AM (#44509319)
I don't know about, had a dicey situation recently where powershell's compress-archive couldn't handle archives >4GB and had to use 7zip. it is more reliable and you can ship 7za.exe or create self-extracting archives (wish those were more of a thing outside of the windows world).
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by chasil on Wednesday July 09, 2025 @09:43AM (#44509965)
In the realm of POSIX.2 and UNIX relatives, the closest analog would be a "shar" archive.

They are not regarded kindly.

https://en.wikipedia.org/wiki/Shar_(file_format)

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by landl0rd on Wednesday July 09, 2025 @02:17PM (#44513212)
I understand that security has to compromise for the real world, but a self-extracting archive is possibly one of the worst things one could use in terms of security.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by notepad0x90 on Wednesday July 09, 2025 @06:11PM (#44515212)
why? and why does it have to be a compromise?

You're assuming things because things are already done insecurely. You can authenticate the self-extractor as well as the extracted content. The user gets a nice message "This is a 7zip self-extracting archive sent to you by Bob containing the files below".

As an incident responder, I've seen much more of regular archives being used to social engineer users than self-extracting archives, because self-extracting is not "content executing". it is better for social engineering for users to establish trust in the payload first by having them manually open the archive. if something "weird" like self-extraction happens first, it might feel less trustworthy.

Oh and by the way, things like PyInstaller or electron apps are already self-extracting and self-executing archives. So are JAR files and android APK's.

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by fsckboy on Wednesday July 09, 2025 @08:56PM (#44516219)
jar files are zip files, so they don't contain "self extract" code, instead they are associated with already installed extraction code.

however, once extracted, jar files do contain executable code, and that is a security issue. the java model pays attention to security, but if code can do something, it can do something bad. if it can't do something, it's not very useful, is it.

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by notepad0x90 on Thursday July 10, 2025 @01:14AM (#44517489)
the windows kernel executes a self extracting 7z archive, java.exe extracts and executes .jar files. If the 7z self extractor was .net CLR bytecode it would operate very much the same as .JAR files. to your point though, the primary purpose of JAR files is not to compress and transport other files, they're supposed to be executables only. From a user's perspective, abuse potential is the main difference.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by sidewndr46 on Wednesday July 09, 2025 @09:06AM (#44509576)
What are you compressing with zstd? I had to do this recently and the "xz" utility still blows it away in terms of compression ratio. In terms of memory and CPU usage, zstd wins by a large margin. But in my case I only really cared about compression ratio
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by vlovich123 on Wednesday July 09, 2025 @09:35AM (#44509887)
people tend to care about decompression speed - xz can be quite slow decompressing super compressed files whereas zstd decompression speed is largely independent of that.

People also tend to care about how much time they spend on compression for each incremental % of compression performance and zstd tends to be a Pareto frontier for that (at least for open source algorithms)

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by bracketfocus on Wednesday July 09, 2025 @10:16AM (#44510346)
This makes sense. A lot of end-users have internet speeds that can outpace the decompression speeds of heavily compressed files. Seems like there would be an irrational psychological aspect to it as well.

Unfortunately for the hoster, they either have to eat the cost of the added bandwidth from a larger file or have people complain about slow decompression.

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by vlovich123 on Wednesday July 09, 2025 @11:49AM (#44511532)
Well the difference is quite a bit more manageable in practice since you’re talking about single digit space difference vs a 2-100x performance in decompression.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by sidewndr46 on Wednesday July 09, 2025 @06:00PM (#44515144)
I definitely agree, I basically have unlimited time and unlimited CPU for decompressing. Available memory is huge too. The gains from xz were significant enough that I went with it.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by Szpadel on Wednesday July 09, 2025 @10:39AM (#44510591)
in my experience using zstd --long --ultra -22 gives marginally better compression ratio than xz -9 while being significantly faster
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by soruly on Wednesday July 09, 2025 @11:52AM (#44511576)
I think it depends on what you're compressing. I experimented with my data full of hex text xml files. xz -6 is both faster and smaller than zstd -19 by about 10%. For my data, xz -2 and zstd -17 achieve the same compressed size but xz -2 is 3 times faster than zstd -17. I still use xz for archive because I rarely needs to decompress them.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by Szpadel on Thursday July 10, 2025 @01:52AM (#44517715)
Try combining it with --long

My use cases are usually source code, SQL dumps and log files.

Sometimes xz gave marginally better results, but difference was well below 1%

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by soruly on Thursday July 10, 2025 @03:35AM (#44518346)
thanks for the tips. As my data has very low entropy, both can compress down to 3-4% of original size, but xz is a lot faster in compression.

raw size: 9612344 B

zstd --ultra -22 --long=31 => 376181 B (3.91% original, 4.088s compress, 0.013s decompress)

xz -z -9 xml => 353700 B (3.68% original, 0.729s compress, 0.032s decompress)

zstd -17 --long=31 could match the compression time of xz, but the size is bigger (405602 B, 4.22% original)

If you compare only the compressed size (not to the original size), .zst would be about 6-15% larger than .xz

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by xxs on Wednesday July 09, 2025 @10:37AM (#44510566)
do you have examples where xz 'blows it away', not just zstd -3?
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by sidewndr46 on Wednesday July 09, 2025 @05:58PM (#44515125)
Here are some examples of what I was doing in one case

https://www.hydrogen18.com/blog/apk-the-strangest-format.htm...

I was running "zstd --ultra --threads=0" which I assumed was asking it for the absolute maximum

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by sltkr on Wednesday July 09, 2025 @08:11PM (#44515985)
I think your mistake was to use --ultra without a compression level.

I redid your experiments with rust-wasm-1.83.0-r0.apk:

                            size       perc   c.time  d.time
    uncompressed:      290072064          -        -
    gzipped original:  105255109     36.29%        -  
    bzip2 -9:          107099379     36.92%    21.1s  11.0s
    bzip3 -b511:        73539847     25.35%    28.9s  32.0s
    xz --extreme -9:    71010672     24.48%   142.0s   3.1s
    lzip -9:            70964413     24.46%   173.5s   5.3s
    zstd --ultra -22:   48288499     16.64%   155.6s   0.4s
It's pretty clear zstd blows everything else out of the water by a huge margin. And even though compressing with zstd is slightly slower than xz in this case (by less than 10%), decompression is nearly 8x as fast, and you can probably tweak the compression level to make zstd be both faster and better than xz.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by sidewndr46 on Wednesday July 09, 2025 @10:04PM (#44516514)
I guess I misunderstood the man page for that option then.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by ars on Wednesday July 09, 2025 @10:57PM (#44516759)
That was an impressive result, so I tried it on a huge email inbox.

    uncompressed:    1512662084
    xz --extreme -9:  508431572  12:47
    zstd --ultra -21: 508432560  12:44
(-22 ran out of memory.) So at least by me zstd was identical to xz almost to the byte and the second.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by ars on Thursday July 10, 2025 @01:04AM (#44517410)
I got -22 to run:

    zstd --ultra -22: 494517545 14:00
Pretty minor difference.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by sltkr on Thursday July 10, 2025 @10:54AM (#44521799)
It does really vary based on the data set.

If the email data is mostly text with markup (like HTML/XML), you might want to try bzip3 too.

It's also possible that a large part of your email is actually already-compressed binary data (like PDFs and images) possibly encoded in base-64. In that case it's likely that all tools are pretty good at compressing the text and headers, but can do little to compress the attachments, which would explain why the results you get are so close.

Re:7-Zip for Windows can now use more than 64 CPU threads fo... by ars on Thursday July 10, 2025 @04:50PM (#44525449)

    bzip3 -b511: 580771424  8:51
I suspect your theory about compressed attachments is correct, although bzip3 isn't doing very well compared to the rest.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by sltkr on Thursday July 10, 2025 @10:31PM (#44527906)
Interesting--thanks for checking! I had good experiences with bzip3 compressing Wikipedia XML dumps, to the point it even outperformed xz, so I thought something similar might happen here. Compression does remain a bit of a black art, where it's hard to predict what works without trying it out.

Overall I'm still slightly biased towards using zstd as a default, in that I believe:

  1. zstd will almost always be among fastest formats for decompression, which is obviously nice-to-have everything else being equal.
  2. zstd can achieve a very high compression ratio, depending on tuning; rarely will zstd significantly underperform the next best option.
Overall this is a pretty good case for using zstd by default, even if in some cases it's not noticably better than other formats. In your case, xz seems to be just as good.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by xxs on Thursday July 10, 2025 @01:57AM (#44517744)
yup, you should have tried just different -NN, and notice. I had a talk on zstd couple of years back, and one of the points was that it was better than xz across the board.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by landl0rd on Wednesday July 09, 2025 @02:18PM (#44513219)
I usually see zstd on max settings outperform xz on speed and very slightly on compression (though that's a tiny difference).
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by jart on Wednesday July 09, 2025 @11:51AM (#44511567)
Use the pigz command for parallel gzip. Mark Adler also has an example floating around somewhere about how to implement basically the same thing using Z_BLOCK.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by mrWiz on Wednesday July 09, 2025 @01:02PM (#44512387)
My main use case for 7z is bypassing corporate filters that block ZIPs from being sent.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by starik36 on Wednesday July 09, 2025 @01:11PM (#44512510)
I think gmail is onto you. They blocked one of my 7z files the other day.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by mrWiz on Thursday July 10, 2025 @03:00PM (#44524323)
Thankfully our corporate IT isn't onto me yet.
Re:7-Zip for Windows can now use more than 64 CPU threads fo... by psyclobe on Wednesday July 09, 2025 @11:15PM (#44516837)
zip is such a shit standard, hell there are parts of it that are still undocumented and sharing documents between system zip implementations across mac and windows sometimes fails.