ZSTD_COMPRESS_LEVEL_MIN
ZSTD_COMPRESS_LEVEL_MIN = 1
cfw_zstd(string $op, string $data, int $level = 3, 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 zstd level, 1 to 22 (or zero and below). |
| string | $dict | A preset dictionary, or an empty string for none. |
The decoded reply, or the reason it failed.
zstd_compress(string $data, int $level = 3, string|null $dict = null) : string|false
Compresses a string with zstd.
| string | $data | The bytes to compress. |
| int | $level | A zstd level, 1 to 22 (or zero and below). |
| string|null | $dict | A preset dictionary, or NULL for none. |
The compressed bytes, or FALSE on failure.
zstd_uncompress(string $data, string|null $dict = null) : string|false
Decompresses a zstd frame.
| string | $data | The zstd frame. |
| string|null | $dict | The dictionary the frame was compressed with, or NULL for none. |
The decompressed bytes, or FALSE on failure.
zstd_decompress(string $data, string|null $dict = null) : string|false
The alias ext-zstd documents beside zstd_uncompress().
| string | $data | The zstd frame. |
| string|null | $dict | The dictionary the frame was compressed with, or NULL for none. |
The decompressed bytes, or FALSE on failure.
zstd_compress_dict(string $data, string $dict, int $level = 3) : string|false
Compresses a string with zstd and a required dictionary.
| string | $data | The bytes to compress. |
| string | $dict | The dictionary; required. |
| int | $level | A zstd level, 1 to 22 (or zero and below). |
The compressed bytes, or FALSE on failure.
zstd_uncompress_dict(string $data, string $dict) : string|false
Decompresses a zstd frame with a required dictionary.
| string | $data | The zstd frame. |
| string | $dict | The dictionary the frame was compressed with; required. |
The decompressed bytes, or FALSE on failure.