Menu

#186 files larger than 100MB still compressed due to 7z -m0=lzma2 flag

1.2.6
New
nobody
None
Low
Review
2017-06-10
2017-06-10
Flying Hawk
No

In source code, line 930 of FolderSync.cpp
the comment says "turn off compression for files bigger than 100MB"

However, even with the flag -mx0, 7z would still compress the file because -m0=lzma2 is present
Simplest solution would be to remove the -m0=lzma2 flag, since 7z uses lzma2 by default anyway.

Discussion

  • Stefan Kueng

    Stefan Kueng - 2017-06-10
    • status: New --> Invalid
     
  • Stefan Kueng

    Stefan Kueng - 2017-06-10

    lzma2 is not on by default, because that's the encryption algorithm to be used. lzma2 has nothing to do with compression but only with encryption.

     
  • Flying Hawk

    Flying Hawk - 2017-06-10

    screenshot from 7zip GUI

     
  • Flying Hawk

    Flying Hawk - 2017-06-10

    With -m0=lzma2 and -mx0, files get compressed with effect of -mx1
    Without -p"password", "-mx0 -m0=lzma2" and "-mx1" produces the exact same output.
    Without -m0=lzma2, -mx0 functions properly without compression. Encryption still works with -p"password"
    These are verifiable with tests, as I have done.

    There's no option for encryption algorithm when using -t7z, because 7z format only supports AES

     
  • Stefan Kueng

    Stefan Kueng - 2017-06-10
    • status: Invalid --> New
     
  • Stefan Kueng

    Stefan Kueng - 2017-06-10

    Ups, sorry. My fault. I mixed lzma2 with sha2.

    But still: according to the official docs (which you can find in c:\program files\z-zip\7-zip.chm when you install 7-zip), when passing -m, the '0'  means Copy mode (no compression).
    
     
  • Flying Hawk

    Flying Hawk - 2017-06-10

    That's okay

    Yes, -mx0 works as "copy without compression" when -m0=lzma2 is not present.
    But when -m0=lzma2 is present, -mx0 effectively becomes -mx1
    "-mx0 -m0=lzma2" and "-mx1" produces the exact same output (without -p"password).

    All I said above is backed up with tests I did, not just from reading documentation

     

Log in to post a comment.