$ show kjdev/php-ext-brotli
php-ext-brotli is a PHP extension written in C that integrates the Brotli compression library into PHP. It exposes userland functions for one-shot compression/decompression, including serialized-value variants, and provides an output compression layer controlled by php.ini directives such as brotli.output_compression and brotli.output_compression_exclude_types. The extension can build against a bundled Brotli submodule or a system libbrotli, and reports library linkage and APCu serializer status in phpinfo().
The LLM identified 2 files worth highlighting for reuse:
Implements the MIME type exclusion list used by Brotli output compression. Supports gitignore-style precedence where the last matching rule wins, and handles x-prefixed and non-prefixed MIME type variants. This is a small, isolated C module that could be extracted and reused in any extension or service needing configurable MIME filtering.
Autoconf build script for the extension. Detects whether to use a bundled Brotli submodule or a system libbrotli via pkg-config, assembles the source file list, and invokes PHP_NEW_EXTENSION. A clean, reusable template for PHP extension authors who need optional system library linkage.