Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

How to setup word size in command line? (LZMA2)

PiotrMP006
2014-03-05
2014-03-11
  • PiotrMP006
    PiotrMP006
    2014-03-05

    How to setup word size in command line? (LZMA2)

     
  • Shell
    Shell
    2014-03-08

    Both of your questions are answered in the manual.

    -m0=lzma2:fbxxx sets word size to xxx.
    -ms+ sets Solid block size to infinite. (P.S. this is wrong)

     
    Last edit: Shell 2014-03-11
  • PiotrMP006
    PiotrMP006
    2014-03-09

    Why -ms+ sets Solid block size to infinite?

     
  • Shell
    Shell
    2014-03-10

    Well, it may really require some clarification, but nevertheless:

    s=[off | on | [e] [{N}f] [{N}b | {N}k | {N}m | {N}g]
    Enables or disables solid mode. The default mode is s=on. In solid mode, files are grouped together. Usually, compressing in solid mode improves the compression ratio.

    Since no explicit restrictions are imposed on solid block size, the s=on switch means arbitrary large solid block, i.e. fully solid. -ms+ is just a short-hand for -ms=on. And, I forgot that in my previous post, 7-Zip sets this mode by default, so you do not need to specify this switch explicitly.

     
  • PiotrMP006
    PiotrMP006
    2014-03-11

    Hi

    Solid block size "Solid"

    The registry value is

    HKEY_CURRENT_USER\Software\7-Zip\Compression\Options\7z
    BlockSize REG_DWORD 0x40

    so..

    0x40 = 64

    2^64 = 18446744073709551616 / 1024^3 = 17179869184 GB

    -ms=17179869184g

    Is this a good way?

    ps -ms=on is only 4GB solid block.

     
  • Igor Pavlov
    Igor Pavlov
    2014-03-11

    In general, I don't recommend to use any number that is equal or larger than 2^63. So even if there is 64-bit signed integer in some code, it will work correctly.
    you can write something like -ms=8000000000g

     
    • PiotrMP006
      PiotrMP006
      2014-03-11

      but the registry value is

      HKEY_CURRENT_USER\Software\7-Zip\Compression\Options\7z
      BlockSize REG_DWORD 0x40

      Why?

       
      • Shell
        Shell
        2014-03-11

        Sorry for the wrong information: there is really a limit on the default solid block size.

        I guess 7-Zip uses 64-bit arithmetic where 2^64 is not encodable. As a consequence, the values 0x40 and above are special cases and can be treated as infinity.