Commit Graph

189 Commits

Author SHA1 Message Date
Eugene Kliuchnikov
b1e421fdc7 Merge branch 'master' into master 2026-04-13 10:08:41 +02:00
Evgenii Kliuchnikov
4792c8e4c4 Check that total compound dictionary size does not overflow.
Thanks to @0xazanul who reported the problem in #1438

PiperOrigin-RevId: 896638456
2026-04-08 12:24:31 -07:00
Robin Watts
7c2def18f6 Fix compilation in ISO C enviroments; declare vars before code. 2026-04-03 19:04:09 +01:00
Evgenii Kliuchnikov
8794fc793e Fix bazel build
That includes un-inlining JNI function calls
2026-03-13 12:31:38 +00:00
Evgenii Kliuchnikov
0ed4268a44 Detect and report invalid stream earlier.
PiperOrigin-RevId: 876198329
2026-02-27 05:10:54 -08:00
Copybara-Service
34f020fa9d Merge pull request #1420 from dpogue:patch-1
PiperOrigin-RevId: 875670546
2026-02-26 05:24:10 -08:00
Kilian Kegel
05783a842e Merge branch 'master' into master 2026-02-25 11:07:58 +01:00
Darryl Pogue
2c137d82ea Fix invalid for loop initialization
This fixes an error when building with gcc-4.2 on Mac OS X 10.5, and is consistent
with the rest of the for loop declarations in this file.
2026-02-19 22:17:08 -08:00
Brotli
54f74c7f5a Enable shared_dictionary for quality 3 and 4.
PiperOrigin-RevId: 869794857
2026-02-13 10:35:28 -08:00
Kilian Kegel
8ff8538ed3 fix 'const' qualifier in c\dec\bit_reader.c 2025-11-30 10:01:03 +01:00
Evgenii Kliuchnikov
486ed5bc56 Fix one-off in dcheck.
How to prove correctness:
1) when `position` is `0`, `max_length` is allowed to be `ringbuffer_size`
2) in other words: `position + max_length <= ringbuffer_size`
3) `ringbuffer_mask == ringbuffer_size - 1`
4) thus `position + max_length <= ringbuffer_size + 1`

PiperOrigin-RevId: 836145553
2025-11-24 03:05:39 -08:00
Evgenii Kliuchnikov
e230f474b8 disable BROTLI_MODEL macro for some targets
PiperOrigin-RevId: 827486322
2025-11-03 07:20:52 -08:00
Evgenii Kliuchnikov
4b0f27b6f9 pick changes from Alpine patch
PiperOrigin-RevId: 816164347
2025-10-07 05:39:06 -07:00
Evgenii Kliuchnikov
1e4425a372 pick changes from Debian patch
PiperOrigin-RevId: 816157554
2025-10-07 05:16:20 -07:00
Evgenii Kliuchnikov
34e43eb020 fix typos
PiperOrigin-RevId: 815676548
2025-10-06 05:16:07 -07:00
Evgenii Kliuchnikov
0e7ea31e6b add alternative unaligned memory access for MIPS
PiperOrigin-RevId: 815662268
2025-10-06 04:26:03 -07:00
Evgenii Kliuchnikov
da2e091eb7 prepare for v1.2.0.rc1
PiperOrigin-RevId: 815650799
2025-10-06 03:48:49 -07:00
Evgenii Kliuchnikov
54481d4ebe use builtin bswap when available
PiperOrigin-RevId: 813849285
2025-10-01 11:56:09 -07:00
Evgenii Kliuchnikov
0bef8a6936 clarify that prepared dictionaries are "lean"
PiperOrigin-RevId: 811236534
2025-09-25 01:27:28 -07:00
Evgenii Kliuchnikov
20ed1374ff add decoder static init
PiperOrigin-RevId: 802957201
2025-09-04 03:58:47 -07:00
Evgenii Kliuchnikov
310f2119cf pull common static init header
PiperOrigin-RevId: 801763621
2025-09-01 04:46:12 -07:00
Evgenii Kliuchnikov
30c7d2f97d split prefix.h to .h/.cc/_inc.h
PiperOrigin-RevId: 801742168
2025-09-01 03:24:08 -07:00
Evgenii Kliuchnikov
25190700e2 use BROTLI_COLD in enc
PiperOrigin-RevId: 800516878
2025-08-28 10:17:30 -07:00
Evgenii Kliuchnikov
cb29dec4ed Introduce BROTLI_COLD
PiperOrigin-RevId: 799674933
2025-08-26 12:48:16 -07:00
Evgenii Kliuchnikov
643b22949d AI ate my code
PiperOrigin-RevId: 799658697
2025-08-26 12:03:48 -07:00
Evgenii Kliuchnikov
e7b0c08b51 move bulky generated constants out of main code
PiperOrigin-RevId: 799083333
2025-08-25 05:36:04 -07:00
Evgenii Kliuchnikov
9a4ba5932b internal change
PiperOrigin-RevId: 795452145
2025-08-15 06:18:41 -07:00
Evgenii Kliuchnikov
3cc6172f58 uninline ShannonEntropy/BitsEntropy
PiperOrigin-RevId: 794966726
2025-08-14 03:50:40 -07:00
Evgenii Kliuchnikov
103b25fb1e explicitly specify model for relocatable variables
PiperOrigin-RevId: 794473371
2025-08-13 02:11:12 -07:00
Evgenii Kliuchnikov
7b345944d6 adjust BROTLI_TEST effects
PiperOrigin-RevId: 793535397
2025-08-11 01:28:09 -07:00
Evgenii Kliuchnikov
6a4c96b110 more portable emergency exit
PiperOrigin-RevId: 792046166
2025-08-07 01:31:31 -07:00
Evgenii Kliuchnikov
29e040b8cb use static init to reduce encoder library size
PiperOrigin-RevId: 791661871
2025-08-06 06:18:01 -07:00
Evgenii Kliuchnikov
bf6231d685 Introduce static init
PiperOrigin-RevId: 791228365
2025-08-06 06:17:48 -07:00
Evgenii Kliuchnikov
8a7201c602 fix some includes
PiperOrigin-RevId: 791124445
2025-08-05 02:49:40 -07:00
Evgenii Kliuchnikov
12203bb586 Extract Hash14/15 to hash_base
PiperOrigin-RevId: 791061237
2025-08-04 23:30:28 -07:00
Evgenii Kliuchnikov
172fe58fab Forward imports in types.h
PiperOrigin-RevId: 790683957
2025-08-04 04:03:20 -07:00
Evgenii Kliuchnikov
a47d747506 Roll back:
Enable shared_dictionary for quality 3 and 4.

PiperOrigin-RevId: 781976993
2025-07-11 07:39:05 -07:00
Brotli
42c5139b80 Enable shared_dictionary for quality 3 and 4.
PiperOrigin-RevId: 780946946
2025-07-09 02:34:01 -07:00
Brotli
434b582d49 Fix compilation errors when BROTLI_DEBUG is defined.
PiperOrigin-RevId: 777494216
2025-06-30 03:32:03 -07:00
Robin Watts
cecc0acc0b Fix ISO C build breakage. (#1255)
ISO C prohibits inline declarations of variables. Move the
declaration to the start of the block.

Co-authored-by: Eugene Kliuchnikov <eustas.ru@gmail.com>
2025-05-27 09:59:17 +02:00
Andreas Deininger
93d0ac53aa Fix typos (#1242)
Co-authored-by: Eugene Kliuchnikov <eustas.ru@gmail.com>
2025-05-27 09:47:01 +02:00
Evgenii Kliuchnikov
440e03642b Another nullptr-arithmetics clamer
PiperOrigin-RevId: 721741817
2025-01-31 05:43:09 -08:00
Evgenii Kliuchnikov
a1e3ab25ce Fix (speculative) nullptr arithmetic
PiperOrigin-RevId: 721739274
2025-01-31 05:34:24 -08:00
Evgenii Kliuchnikov
95b81fcc29 Partially pick https://github.com/google/brotli/pull/1232
PiperOrigin-RevId: 712791222
2025-01-06 23:52:23 -08:00
Copybara-Service
2b6efcbdcc Merge pull request #1204 from heshpdx:master
PiperOrigin-RevId: 697922880
2024-11-19 01:42:21 -08:00
Mahesh Madhav
8c6d25f7f8 Update c/enc/encode.c
Co-authored-by: Eugene Kliuchnikov <eustas@google.com>
2024-11-19 09:52:16 +01:00
Mahesh Madhav
782aadd0ff Apply suggestions from code review
Co-authored-by: Eugene Kliuchnikov <eustas@google.com>
2024-11-19 09:52:16 +01:00
Mahesh Madhav
1054ecc262 Add static variables as per code review comments. 2024-11-19 09:52:16 +01:00
Mahesh Madhav
cec846f88e Update c/enc/block_splitter_inc.h
Added a digit of precision
2024-11-19 09:52:16 +01:00
Mahesh Madhav
cefec3ce9d Reduce fdiv's into fmul's
Provides small speedup on microarchitectures where the floating
point divide is slower than the floating point multiply.
2024-11-19 09:52:16 +01:00