Skip to content

Commit

Permalink
translate threads to decoder (previously ignored): important for -mmt…
Browse files Browse the repository at this point in the history
…>=2 to use brotli-mt (the streams are incompatible)
  • Loading branch information
sebres committed Sep 7, 2023
1 parent 2b48366 commit 6411fad
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CPP/7zip/Archive/BrotliHandler.cpp
Expand Up @@ -173,6 +173,9 @@ STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems,

NCompress::NBROTLI::CDecoder *decoderSpec = new NCompress::NBROTLI::CDecoder;
decoderSpec->SetNumberOfThreads(0); /* .br - single threaded processing (without header/mt-frames) */
if (_props._numThreads_WasForced) {
decoderSpec->SetNumberOfThreads(_props._numThreads); // translate to decoder (important for -mmt>=2 to use brotli-mt)
}
CMyComPtr<ICompressCoder> decoder = decoderSpec;
decoderSpec->SetInStream(_seqStream);

Expand Down

0 comments on commit 6411fad

Please sign in to comment.