BROTLI_GENERIC
BROTLI_GENERIC = 0
cfw_brotli(string $op, string $data, int $level = 11, int $mode = 0, string $dict = '') : array{ok: bool, data?: string, error?: string}
Runs one op over the bridge.
| string | $op | The operation, compress or uncompress. |
| string | $data | The bytes to transform. |
| int | $level | A brotli quality, 0 to 11. |
| int | $mode | BROTLI_GENERIC, BROTLI_TEXT or BROTLI_FONT. |
| string | $dict | A preset dictionary, or an empty string for none. The host refuses one. |
The decoded reply, or the reason it failed.
brotli_compress(string $data, int $level = 11, int $mode = 0, string|null $dict = null) : string|false
Compresses a string with brotli.
| string | $data | The bytes to compress. |
| int | $level | A brotli quality, 0 to 11. |
| int | $mode | BROTLI_GENERIC, BROTLI_TEXT or BROTLI_FONT. |
| string|null | $dict | Not supported on this host; a non-empty value is refused. |
The compressed bytes, or FALSE on failure.
brotli_uncompress(string $data, string|null $dict = null) : string|false
Decompresses a brotli stream.
| string | $data | The brotli stream. |
| string|null | $dict | Not supported on this host; a non-empty value is refused. |
The decompressed bytes, or FALSE on failure.