PHPackages                             vdechenaux/brotli - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. vdechenaux/brotli

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

vdechenaux/brotli
=================

Add brotli compress/uncompress functions to PHP

1.3.0(7mo ago)2472.2k↓58.2%6[1 issues](https://github.com/vdechenaux/brotli-php/issues)1MITPHPPHP ^8.1CI failing

Since Apr 23Pushed 7mo ago3 watchersCompare

[ Source](https://github.com/vdechenaux/brotli-php)[ Packagist](https://packagist.org/packages/vdechenaux/brotli)[ RSS](/packages/vdechenaux-brotli/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (4)Dependencies (2)Versions (5)Used By (1)

[![CircleCI](https://camo.githubusercontent.com/d2d6ddff726af54bfa5838f762a09bf6d312367a67aae54f28372d3235ca76fb/68747470733a2f2f636972636c6563692e636f6d2f67682f7664656368656e6175782f62726f746c692d7068702f747265652f6d61737465722e7376673f7374796c653d737667)](https://circleci.com/gh/vdechenaux/brotli-php/tree/master)

Features
========

[](#features)

This library adds Brotli support to PHP (&gt;= 8.1)

```
function brotli_compress(string $data, int $quality = 11): string

function brotli_uncompress(string $data): string
```

Installation
============

[](#installation)

Library
-------

[](#library)

```
$ composer require vdechenaux/brotli

```

You are almost done ! **Read the next section to complete the setup.**

Binary
------

[](#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

[](#using-apt)

You can use Brotli binary from `apt` if you are using:

- Ubuntu &gt;= xenial (16.04)
- Debian &gt;= stretch (9)

```
$ apt install brotli

```

### Using Homebrew

[](#using-homebrew)

```
$ brew install brotli

```

###  Health Score

51

—

FairBetter than 95% of packages

Maintenance62

Regular maintenance activity

Popularity41

Moderate usage in the ecosystem

Community18

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 85.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~677 days

Total

4

Last Release

230d ago

PHP version history (3 changes)1.0.0PHP ^7.1

1.1.0PHP ^7.4 || ^8.0

1.3.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/e5f5c84812f68e4cc39b81849f0626eb8289210293b4eb0f66c6ee0c5e287fbd?d=identicon)[vdechenaux](/maintainers/vdechenaux)

---

Top Contributors

[![vdechenaux](https://avatars.githubusercontent.com/u/1501825?v=4)](https://github.com/vdechenaux "vdechenaux (18 commits)")[![chapeupreto](https://avatars.githubusercontent.com/u/834048?v=4)](https://github.com/chapeupreto "chapeupreto (1 commits)")[![jozefcuryllo](https://avatars.githubusercontent.com/u/6951054?v=4)](https://github.com/jozefcuryllo "jozefcuryllo (1 commits)")[![tfink](https://avatars.githubusercontent.com/u/3719286?v=4)](https://github.com/tfink "tfink (1 commits)")

---

Tags

brotli

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vdechenaux-brotli/health.svg)

```
[![Health](https://phpackages.com/badges/vdechenaux-brotli/health.svg)](https://phpackages.com/packages/vdechenaux-brotli)
```

###  Alternatives

[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k251.2M25.2k](/packages/friendsofphp-php-cs-fixer)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[phpactor/phpactor

PHP refactoring and intellisense tool for text editors

1.9k17.1k1](/packages/phpactor-phpactor)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
