You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
caseMZ_STREAM_PROP_COMPRESS_LEVEL:
if (value >= 9)
lzma->preset=LZMA_PRESET_EXTREME;
elselzma->preset=LZMA_PRESET_DEFAULT;
break;
Reading the xz-utils docs for the presets, and looking through its code, LZMA_PRESET_EXTREME is an extra flag on top of the compression level. Using it on its own is equal to using a compression level of 0, making MZ_COMPRESS_LEVEL_BEST result in the worst compression (and the other levels not doing anything). The level should probably be passed through, without using LZMA_PRESET_EXTREME at all.
The text was updated successfully, but these errors were encountered:
LZMA_PRESET_EXTREME is not a preset on its own but a flag which must be
used together with a level. The difference between level 9 with and without
the extreme flag also seems negligible, so this commit just passes through
the level and maps -1 and invalid values to the default preset.
LZMA_PRESET_EXTREME is not a preset on its own but a flag which must be
used together with a level. The difference between level 9 with and without
the extreme flag also seems negligible, so this commit just passes through
the level and maps -1 and invalid values to the default preset.
Taken from
mz_stream_lzma_set_prop_int64
:Reading the xz-utils docs for the presets, and looking through its code,
LZMA_PRESET_EXTREME
is an extra flag on top of the compression level. Using it on its own is equal to using a compression level of 0, makingMZ_COMPRESS_LEVEL_BEST
result in the worst compression (and the other levels not doing anything). The level should probably be passed through, without usingLZMA_PRESET_EXTREME
at all.The text was updated successfully, but these errors were encountered: