mcmilk / 7-Zip-zstd

7-Zip with support for Brotli, Fast-LZMA2, Lizard, LZ4, LZ5 and Zstandard
https://mcmilk.de/projects/7-Zip-zstd/
Other
4.87k stars 291 forks source link

Amend for brotli (de)compress (-mmt1), update README.md #352

Closed sebres closed 9 months ago

sebres commented 10 months ago

The fix contains:

Amend to #351: without the fix, compression with -mmt1 creates brotli-mt stream (incompatible with default brotli) and decompression always used single-threaded compression, so can't unpack the stream, created with -mmt1 at all.

Now the compression and decompression are consistent and:

sebres commented 10 months ago

@mcmilk, by the way, new brotli version (v.1.1.0) got released last weak. I was trying to update it, but Brotli-Adjust.sh seems to be outdated (needs to wrap more headers and renames), no time to fix at the moment. May be instead of such mockups for brotli a static library build as it is (and linking it to 7z) would be better in the long term?

sebres commented 9 months ago

I added to this PR still one simple but important fix - 09a6777b9623618e6c802ae88d1e5ef2938c544d. Without that fix zip type was missing (for instance 7z i | grep zip doesn't contains zip handler anymore), because after adding of brotli code, RegisterArc for zip silently exceeds kNumArcsMax in registering structure g_Arcs.

BTW, I guess this expects some todo later - some error must be thrown for the case we want to register more archive handlers than allowed by kNumArcsMax.