Commit Graph

1231 Commits

Author SHA1 Message Date
Evgenii Kliuchnikov
6db17c87f5 0.4-1.5% decoder speedup
PiperOrigin-RevId: 513248503
2023-07-04 07:53:20 +00:00
Eugene Kliuchnikov
6f7f5a163d
Improve CodeQL workflow (#1027) 2023-07-03 15:21:44 +02:00
Eugene Kliuchnikov
e07b6148fd
Add CodeQL workflow (#1026) 2023-07-03 14:48:33 +02:00
Eugene Kliuchnikov
ec107cf015
Create scorecard.yml
Install OSSF scoreboard
2023-07-03 12:28:07 +02:00
Felix Hanau
534076fa67
Add support for clang-cl compiler (#1021) 2023-07-03 11:43:35 +02:00
Eugene Kliuchnikov
50ebce107f
Fix Bazel build (#1024) 2023-06-22 11:29:08 +02:00
Catena cyber
bfa15d4046
fuzz: make target resist allocation failures (#1023)
So that fuzzing can go on with simulated allocation failures
2023-06-22 10:27:21 +02:00
Zhang Na
1d8452b783
Add loongarch64 support (#1022) 2023-06-20 09:44:23 +02:00
Evgenii Kliuchnikov
ed1995b6bd Merge pull request #1005 from sullis:enum-values
PiperOrigin-RevId: 506138469
2023-02-01 09:20:28 +00:00
Evgenii Kliuchnikov
38e9add9d2 Fix permissions
PiperOrigin-RevId: 506096478
2023-02-01 09:20:14 +00:00
Evgenii Kliuchnikov
b2c86d1871 Decoder API: added API to attach metadata blocks callbacks
PiperOrigin-RevId: 505734532
2023-01-31 16:03:16 +00:00
Evgenii Kliuchnikov
04f294b18a Fix emitting 1-byte long metadata block
PiperOrigin-RevId: 505484299
2023-01-30 09:10:28 +00:00
Brotli
1e61e972fb speed up encoding by ~5 %
PiperOrigin-RevId: 505061835
2023-01-30 09:10:14 +00:00
Sean C. Sullivan
2ce0feba3c avoid array allocation in Encoder.Mode enum 2023-01-22 06:30:06 -08:00
Brotli
36533a866e Internal change
PiperOrigin-RevId: 502401179
2023-01-17 13:51:00 +00:00
Aron Parker
71fe6cac06
Fix BrotliEncoderEstimatePeakMemoryUsage (#1002)
Fixes https://github.com/google/brotli/issues/1001
2023-01-07 22:01:47 +01:00
Eugene Kliuchnikov
e3ea91d5c9
Java wrapper: allow using partial byte arrays (#999) 2023-01-04 15:38:17 +01:00
Eugene Kliuchnikov
0ea4603880
Fix MSVC warning (#998)
Fix #875
2023-01-04 12:10:29 +01:00
Eugene Kliuchnikov
ce92c95601
brotlidump: fix dictionary file discovery (#997) 2023-01-03 20:44:14 +01:00
Eugene Kliuchnikov
0ff60731f8
Add security policy (#996) 2023-01-03 18:24:47 +01:00
Eugene Kliuchnikov
81181ecfb6
Cleanup (#995) 2023-01-03 17:18:05 +01:00
Eugene Kliuchnikov
a2cc451df2
Add win release assets (#994)
Fix #983
2023-01-03 17:16:17 +01:00
Ma Lin
c8df4b3049
Python: use a new output buffer code (#902)
Currently, the output buffer is a std::vector<uint8_t>.
When the buffer grows, resizing will cause unnecessary memcpy().

This change uses a list of bytes object to represent output buffer, can avoid the extra overhead of resizing.
In addition, C++ code can be removed, it's a pure C extension.
2022-12-29 14:07:16 +01:00
Eugene Kliuchnikov
509d4419bd
Copy ns time stat (#992) 2022-12-22 16:05:25 +01:00
Eugene Kliuchnikov
81dc1c86c3
Ramp up CMake to v3 (#991)
Drive-by: drop premake5 support
2022-12-22 12:15:55 +01:00
Jack
a7b7839fd4
Add *.d to gitignore (#975) 2022-12-21 09:52:31 +01:00
Eugene Kliuchnikov
3152d995b3
Replace deprecated win-2016 workflows (#990)
* Remplace deprecated win-2016 workflows

* Update action/checkout to v3
2022-12-20 17:35:26 +01:00
Eugene Kliuchnikov
c48ebca4a8
Fix bazel build (#989) 2022-12-20 12:25:26 +01:00
Kleis Auke Wolthuizen
9b53703237
CMake: ensure static libraries are still installed on Emscripten (#988)
Similar to commit ce222e317e.
2022-12-20 11:03:21 +01:00
Adrian Perez
641bec0e30
CMake: Allow using BUILD_SHARED_LIBS to choose static/shared libs (#655)
By convention projects using CMake which can build either static or
shared libraries use a BUILD_SHARED_LIBS flag to allow selecting between
both: the add_library() command automatically switches between both using
this variable when the library kind is not passed to add_library(). It
is also usual to expose the BUILD_SHARED_LIBS as an user-facing setting
with the option() command.

This way, the following will both work as expected:

   % cmake -DBUILD_SHARED_LIBS=OFF ...
   % cmake -DBUILS_SHARED_LIBS=ON ...

This is helpful for distributions which need (or want) to build only
static libraries.
2022-12-16 11:42:42 +01:00
Aayush Atharva
3914999fcc
Fix typo (#951) 2022-11-17 14:49:55 +01:00
Lukas Oberhuber
f842c1bcf9
fix macos rpath (#976)
Without this patch, the three libraries are not provided with valid
rpaths, meaning they are not packaged correctly for macos.

c.f. https://github.com/google/brotli/issues/934
(which is a similar issue) but should be fixed by this fix as well.

Also https://gitlab.gnome.org/Infrastructure/gimp-macos-build/-/merge_requests/129
2022-11-17 14:37:20 +01:00
Michal Josef Špaček
ae212a792e
Fix bootstrap version computing with custom bc (#978)
When i have ~/.bc configuration file with content:
scale=2
which is changing default behaviour (scale=0), bootstrap is not working.
2022-11-17 14:31:35 +01:00
Evgenii Kliuchnikov
a8f5813b84 Update
Documentation:
  - add note that brotli is a "stream" format, not an archive-like
  - regenerate .1 with Pandoc
Build:
  - drop legacy "BROTLI_BUILD_PORTABLE" option
  - drop "BROTLI_SANITIZED" definition
Code:
  - c: comb includes
  - c/enc: extract encoder state into separate header
  - c/enc: drop designated q10 codepath
  - c/enc: dealing better with flushing of empty stream
  - fix MSVC compilation
API:
  - py: use library version instead of one in version.h
  - c: add plugable API to report consumed input / produced output
  - c/java: support "lean" prepared dictionaries (without copy of source)
2022-11-17 13:03:09 +00:00
清靈語
388d0d53fb
add pyproject.toml (#987)
* add pyproject.toml 

pypa/pip#8559

https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/#fallback-behaviour

* modify requirements

https://github.com/google/brotli/pull/987#issuecomment-1315486841
2022-11-15 18:39:13 +01:00
Keith Smiley
6d03dfbedd
Fix -Wstrict-prototypes warnings (#985)
Envoy builds brotli with -Werror, and these strict prototypes are picked
up by newer versions of clang.
2022-10-25 21:29:58 +02:00
Anonymous Maarten
9801a2c5d6
Wrap interface include directories with BUILD_INTERFACE generator expression (#966)
* Wrap interface include directories with BUILD_INTERFACE generator expression

When exporting a CMake target using install(TARGETS) + install(EXPORT),
CMake requires all include directories to be clean of build system
directories.

https://cmake.org/cmake/help/latest/prop_tgt/INTERFACE_INCLUDE_DIRECTORIES.html

This change also allows use of brotli as a CMake subproject and
installing + exporting it.

* Fix typo in generator expression
2022-05-12 10:50:48 +03:00
Ryan Schmidt
f09b2555ac
bootstrap: Fix exit code when autoreconf fails (#962)
Fixes:

./bootstrap: line 37: exit: $: numeric argument required
2022-05-11 19:21:00 +03:00
Ryan Schmidt
c9eb85691f
Fix bootstrap on macOS (#965)
* bootstrap: Verify functionality of sed

Check for the existence of sed by running a simple substitution rather
than using the --version flag. This lets us remove the weird exclusion
of FreeBSD from checking the sed requirement, and fixes checking the sed
requirement on other systems like macOS that use BSD sed, which doesn't
support --version.

* bootstrap: Detect flag for sed extended RE

Detect whether sed needs -E or -r to enable extended regular
expressions. Fixes bootstrap on macOS, whose BSD sed does not support
-r.

GNU sed has supported -E as a synonym for -r since version 4.2 (2009),
initially as an undocumented option for compatibility with BSD sed:

http://git.savannah.gnu.org/cgit/sed.git/commit/sed/sed.c?id=3a8e165ab02487c372df217c1989e287625ce0ae

and later as a documented option after -E became POSIX:

http://git.savannah.gnu.org/cgit/sed.git/commit/sed/sed.c?id=8b65e07904384b529a464c89f3739d2e7e4d5135
2022-05-11 19:20:39 +03:00
Marco Scardovi
f4153a09f8
Fix for future versions of python (#911)
Starting python 3.10, the use of - instead of _ will get a warn (see https://bugs.gentoo.org/796281 for reference)

Signed-off-by: Marco Scardovi <marco@scardovi.com>
2022-01-10 13:08:10 +03:00
Mohammad Bahoosh
e83c7b8e8f
Supress cmake warning (#931)
Not providing VERSION to "project" command will cause a warning.

Since this project's version is loaded from other files, this policy will help suppress the warning generated by cmake.
This policy is set because we can't provide "VERSION" in "project" command.
Use `cmake --help-policy CMP0048` for more information
2021-12-15 13:28:25 +03:00
Jyrki Alakuijala
4ec67035c0
Merge pull request #929 from jbms/fix-vla-parameter
Fix -Werror=vla-parameter errors with GCC 11.2.0
2021-12-07 01:47:07 +01:00
Eugene Kliuchnikov
8376f72ed6
Prepare for copybara (#939)
Co-authored-by: Eugene Kliuchnikov <eustas@chromium.org>
2021-11-10 10:34:39 +01:00
Jeremy Maitin-Shepard
27dd726540 Fix -Werror=vla-parameter errors with GCC 11.2.0 2021-09-14 12:27:45 -07:00
Eugene Kliuchnikov
62662f87cd
Strip "./" in includes (#925)
Co-authored-by: Eugene Kliuchnikov <eustas@chromium.org>
2021-09-08 09:18:45 +02:00
Eugene Kliuchnikov
698e3a7f9d
Update README.md
Fix typo in Gihtub actions badge
2021-08-31 15:24:35 +02:00
Eugene Kliuchnikov
a10269cea1
Update README.md (#923) 2021-08-31 15:22:23 +02:00
Eugene Kliuchnikov
0e42caf359
Migrate to github actions (#920)
Not all combinations are migrated to the initial configuration; corresponding TODOs added.

Drive-by: additional combinations uncovered minor portability problems -> fixed
Drive-by: remove no-longer used "script" files.

Co-authored-by: Eugene Kliuchnikov <eustas@chromium.org>
2021-08-31 14:07:17 +02:00
Eugene Kliuchnikov
68f1b90ad0
Update (#918)
Prepare to use copybara worklow.
2021-08-18 19:15:07 +02:00
Eugene Kliuchnikov
19d86fb9a6
Merge-in SharedDictionary feature (#916)
Co-authored-by: Eugene Kliuchnikov <eustas@chromium.org>
2021-08-04 14:42:02 +02:00