vdechenaux / brotli
Add brotli compress/uncompress functions to PHP
Installs: 32 751
Dependents: 1
Suggesters: 2
Security: 0
Stars: 23
Watchers: 4
Forks: 6
Open Issues: 1
Requires
- php: ^7.4 || ^8.0
- symfony/process: ^4.4.30|^5.3.7|^6.0
Requires (Dev)
- phpunit/phpunit: ^9.3
Suggests
- vdechenaux/brotli-bin-amd64: Brotli binary for Linux amd64
- vdechenaux/brotli-bin-i386: Brotli binary for Linux i386
This package is auto-updated.
Last update: 2024-11-15 23:16:28 UTC
README
Features
This library adds Brotli support to PHP (>= 7.4)
function brotli_compress(string $data, int $quality = 11): string function brotli_uncompress(string $data): string
Installation
Library
$ composer require vdechenaux/brotli
You are almost done ! Read the next section to complete the setup.
Binary
This command will only install the PHP code, but a binary file is also needed. This binary is provided by 2 packages, depending of your environment:
- Linux AMD64
$ composer require vdechenaux/brotli-bin-amd64
- Linux i386
$ composer require vdechenaux/brotli-bin-i386
The binary will be automatically used by this library. You don't need to configure something after binary installation.
Using apt
You can use Brotli binary from apt
if you are using:
- Ubuntu >= xenial (16.04)
- Debian >= stretch (9)
$ apt install brotli
Using Homebrew
$ brew install brotli