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

Open
opened 2026-01-29 20:43:16 +00:00 by claunia · 3 comments
Owner

Originally created by @shao-hua-li on GitHub (Oct 21, 2021).

Hi there,

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

  • Version : git head at the time of report (commit 62662f87cd)
  • Compiler : clang13 and gcc11
  • Reproduce: 1) compile with clang13 and gcc11 separately. 2) run brotli -fq 11 diff_0 -o output with two brotli compiled by different compilers. 3) You'll see they emit different compressed output files.
  • Test case: diff_0.tar.gz (decompress it first).

Thanks,
Shaohua

Originally created by @shao-hua-li on GitHub (Oct 21, 2021). Hi there, I found that brotli would emit different compressed files if I compiled with different compilers. - Version : git head at the time of report (commit 62662f87cdd96deda90ac817de94e3c4af75226a) - Compiler : clang13 and gcc11 - Reproduce: 1) compile with clang13 and gcc11 separately. 2) run `brotli -fq 11 diff_0 -o output` with two `brotli` compiled by different compilers. 3) You'll see they emit different compressed output files. - Test case: [diff_0.tar.gz](https://github.com/google/brotli/files/7390780/diff_0.tar.gz) (decompress it first). Thanks, Shaohua
claunia added the enhancement label 2026-01-29 20:43:16 +00:00
Author
Owner

@eustas commented on GitHub (Jan 10, 2022):

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.

@eustas commented on GitHub (Jan 10, 2022): 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.
Author
Owner

@shao-hua-li commented on GitHub (Jan 10, 2022):

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! :).

@shao-hua-li commented on GitHub (Jan 10, 2022): 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! :).
Author
Owner

@eustas commented on GitHub (Jan 10, 2022):

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

@eustas commented on GitHub (Jan 10, 2022): IIRC, compression levels 0-9 should does not use FP, so should produce same output across compilers/CPUs.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#399