apotocki/brotli
Brotli, a generic-purpose lossless compression algorithm (encoder, decoder and the common dictionary).
- Library
- brotli
- Newest
- 1.2.1 (r1, android)
- Targets
- android, windows
- License
- MIT
- Homepage
- https://github.com/google/brotli
- Keywords
- compression, brotli
Use it
In otok.toml:
[deps.brotli]
recipe = "apotocki/brotli"
version = "~> 1.2.1"
Versions
| Version | Target | Channel | Published | Status |
|---|---|---|---|---|
| 1.2.1 (r1, android) | android | stable | 2026-11-13 | |
| 1.2.1 (r1, windows) | windows | stable | 2026-11-13 |
1.2.1 (r1, android)
Platforms
android
Toolchains
cmake { default-recipe = "apotocki/cmake", version = ">= 3.20" }ninja { default-recipe = "apotocki/ninja", version = ">= 1.10" }
Recipe files
build.lua
-- Brotli's CMake project, the libraries only (no command-line tool, no tests). What it installs: libbrotlicommon, libbrotlidec
-- and libbrotlienc as .a, or as .so with their links.
function build(slice, options, deps)
local static = slice.linkage == "static"
otok.cmake{ defines = { BROTLI_BUILD_TOOLS = false, BROTLI_DISABLE_TESTS = true } }
local p = slice.prefix
local libraries = {}
for _, name in ipairs{ "brotlienc", "brotlidec", "brotlicommon" } do
libraries[name] = otok.glob("lib/lib" .. name .. (static and ".a" or ".so"), p)[1]
end
return { libraries = libraries, headers = p .. "/include" }
end
recipe.toml
# The otok recipe of Brotli (https://github.com/apotocki/otok): libbrotlienc, libbrotlidec and libbrotlicommon for Android, from
# the release tag, with Brotli's CMake, the libraries only; static or dynamic.
[recipe]
api = 1
library = "brotli"
name = "brotli"
version = "1.2.1"
revision = 1
license = "MIT"
license-files = ["LICENSE"]
homepage = "https://github.com/google/brotli"
description = "Brotli, a generic-purpose lossless compression algorithm (encoder, decoder and the common dictionary)."
keywords = ["compression", "brotli"]
linkage = ["static", "dynamic"]
[source]
git = "https://github.com/google/brotli"
commit = "db24a98aed38a16de78cc05ca15cdd8dc2a0d92d"
tag = "v1.2.1"
[platforms]
supported = ["android"]
build-on = ["*/ndk"]
[toolchains]
cmake = { version = ">= 3.20", default-recipe = "apotocki/cmake" }
ninja = { version = ">= 1.10", default-recipe = "apotocki/ninja" }
[[product]]
name = "Brotli"
libraries = ["brotlienc", "brotlidec", "brotlicommon"]
link = { libraries = ["m"] }