google / brotli

Brotli compression format
MIT License
13.43k stars 1.23k forks source link

Make q10-11 compression floating-point-free #935

Open shao-hua-li opened 2 years ago

shao-hua-li commented 2 years ago

Hi there,

I found that brotli would emit different compressed files if I compiled with different compilers.

Thanks, Shaohua

eustas commented 2 years ago

Yes, this might happen. We did not completely got rid of floating-point ops, so result might be compiler- and CPU-dependent. Going to keep this issue open, as this is one of our future goals.

shao-hua-li commented 2 years ago

Thanks for the reply! I just worried that developers may use checksum to validate the integrity, which might be falsely broken due to this issue. Looking forward to your solution! :).

eustas commented 2 years ago

IIRC, compression levels 0-9 should does not use FP, so should produce same output across compilers/CPUs.