powturbo / TurboBench

Compression Benchmark
326 stars 34 forks source link

a bug about sserangecoding, in plugin.cc:ssercenc & ssercdec #45

Open BeeBreeze opened 5 months ago

BeeBreeze commented 5 months ago

Test data: 0x0000 during encoding, the cum prob table is: 0, 2731 However, when decoding, the cum prob table is: 0, 4096 (because of scaled_cum_prob[a] = (1<<SSE_BITS))

Therefore, we should save the whole cum prob table and read it back when decoding, i.e., plugin.cc:891, useless now plugin.cc:906, i < a + 1 plugin.cc:921, i < a + 1 plugin.cc:922, delete.

Hope this helps.