Skip to content

Instantly share code, notes, and snippets.

@tsohr
Last active September 6, 2017 06:35
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsohr/7942113 to your computer and use it in GitHub Desktop.
Save tsohr/7942113 to your computer and use it in GitHub Desktop.
7zip command line execution example, 7zip format, LZMA2, multithreading
# not working
#7za a -r -t7z -m=Deflate64 -mt=12 $FILE_OUT $A_DIR
7za a -r -t7z -m0=LZMA2 -mmt=on $FILE_OUT $A_DIR
#http://7zip.bugaco.com/7zip/MANUAL/switches/method.htm#ZipMultiThread
#mt=[off | on | {N}]
#Sets multithread mode. If you have a multiprocessor or multicore system, you can get a speed increase with this switch. This option #affects only compression with BZip2, Deflate and Deflate64 methods and decompression of BZip2 streams.
#Each thread in the multithread mode uses 32 MB of RAM for buffering. If you specify {N}, 7-Zip tries to use N threads.
@Drowze
Copy link

Drowze commented Nov 3, 2015

Helpful. Thanks!

@clarkk
Copy link

clarkk commented Dec 28, 2015

LZMA2 only supports up to 2 threads..

So it would only make sense to use these two switches -mmt=on or -mmt=off

@tsohr
Copy link
Author

tsohr commented May 10, 2017

@clakk, thanks for commenting out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment