Closed sebres closed 9 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?
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
.
The fix contains:
-mmt1
causes that it'd use brotli-mt and the stream is incompatible;-mmt=n
withn >= 2
forces multi-threaded compression/decompression (therefore incompatible with standard brotli)-mmt>=2
to use brotli-mt (the streams are incompatible)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:
-mmt
it is equivalent-mmt0
but also-mmt1
and uses single-threaded brotli for compress/decompress.-mmt=n
wheren >= 2
, it uses multi-threaded brotli (would create or extract incompatible to standard brotli stream).