Closed xcrh closed 7 years ago
The issue here is that these are 2 independent algorithms:
I didn't want to use a convention -a1 -9
(algorithm 1; level 9) in lz5.exe
and an additional param for API.
m^2 suggested: having levels 11-19 and 21-29. I think it would make it clearer that these are two different codecs.
Levels are changed in LZ5 v2.0 RC2: https://github.com/inikep/lz5/releases/tag/v2.0rc2
As of 1.5 RC (9e8d558d81e958407edf676329972174e0c9b0de) levels are somewhat confusing.
Normally when app-level dev calls library, it is expected higher level gives better ratio at cost of slower compression speed. Builtin help of LZ5 also suggests it is a case:
However, it isn't like this in LZ5 v2:
$ ./lz5 -b9 lz5 9#lz5 : 192320 -> 102547 (1.875), 1.2 MB/s , 404.0 MB/s
$ ./lz5 -b10 lz5 10#lz5 : 192320 -> 113877 (1.689), 11.1 MB/s , 358.8 MB/s
So increasing level from 9 to 10 quite unxepectedly boosts compression speed and drops ratio.
I guess either levels may need to be fine-tuned to behave like expected or, maybe, devs should get explicit knowledge these are 2 different sub-algos, not sure which option is better.