LZMA2-Parameters for Ultra-Encoding

  • Hi,
    I want to use the LZMA2-Encoder in my application -- I can't figure out the correct properties corresponding to 7zip's "Ultra".

    In 7zip's Dialog I use:
    Ultra, LZMA2, Dictionary 64MB, Word-Size 64, BlockSize 4GB.

    In Software i am trying:

      CLzma2EncProps props;
      Lzma2EncProps_Init( &props );
      props.lzmaProps.level = 9;
      props.lzmaProps.dictSize = (1 << 27);
      props.lzmaProps.fb = 64;
      props.lzmaProps.writeEndMark = 1;
      Lzma2EncProps_Normalize( &props );
      Lzma2Enc_SetProps(enc, &props);

    But I get much worse results in compression. Can you give me a hint, what I have to set?

    Thanks and Best Regards,

  • Igor Pavlov
    Igor Pavlov

    Show some numbers about uncompressed / compressed size in both cases.
    Check compression only for one file.

    And probably you can set only one variable:
    props.lzmaProps.level = 9;

  • Hi,
    Thanks for the advice... I seems, that my additional settings really just made results (and time to get them) worse.

    Best Regards,