Skip to content

Commit a4b887e

Browse files
committed
support brotli compression
1 parent 57f71cc commit a4b887e

14 files changed

+2934
-239
lines changed

libs/brotli/BUILD

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package(
2+
default_visibility = ["//visibility:public"],
3+
)
4+
5+
licenses(["notice"]) # MIT
6+
7+
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_library")
8+
9+
# Not a real polyfill. Do NOT use for anything, but tests.
10+
closure_js_library(
11+
name = "polyfill",
12+
srcs = ["polyfill.js"],
13+
suppress = [
14+
"JSC_INVALID_OPERAND_TYPE",
15+
"JSC_MISSING_JSDOC",
16+
"JSC_STRICT_INEXISTENT_PROPERTY",
17+
"JSC_TYPE_MISMATCH",
18+
"JSC_UNKNOWN_EXPR_TYPE",
19+
],
20+
)
21+
22+
# Do NOT use this artifact; it is for test purposes only.
23+
closure_js_library(
24+
name = "decode",
25+
srcs = ["decode.js"],
26+
suppress = [
27+
"JSC_DUP_VAR_DECLARATION",
28+
"JSC_USELESS_BLOCK",
29+
],
30+
deps = [":polyfill"],
31+
)
32+
33+
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_test")
34+
35+
closure_js_test(
36+
name = "all_tests",
37+
srcs = ["decode_test.js"],
38+
deps = [
39+
":decode",
40+
":polyfill",
41+
"@io_bazel_rules_closure//closure/library:testing",
42+
],
43+
)

libs/brotli/LICENSE

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors.
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

libs/brotli/WORKSPACE

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
workspace(name = "org_brotli_js")
2+
3+
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
4+
5+
git_repository(
6+
name = "io_bazel_rules_closure",
7+
commit = "29ec97e7c85d607ba9e41cab3993fbb13f812c4b",
8+
remote = "https://github.com/bazelbuild/rules_closure.git",
9+
)
10+
11+
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_repositories")
12+
closure_repositories()

0 commit comments

Comments
 (0)