Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pmmp/ext-libdeflate
PHP bindings for libdeflate, a zlib replacement with significantly better performance.
https://github.com/pmmp/ext-libdeflate
github-actions-enabled php-extension php80 php81 php82
Last synced: about 1 month ago
JSON representation
PHP bindings for libdeflate, a zlib replacement with significantly better performance.
- Host: GitHub
- URL: https://github.com/pmmp/ext-libdeflate
- Owner: pmmp
- License: mit
- Created: 2020-10-10T20:34:37.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-11-24T13:00:27.000Z (12 months ago)
- Last Synced: 2024-09-27T10:01:16.642Z (about 2 months ago)
- Topics: github-actions-enabled, php-extension, php80, php81, php82
- Language: C
- Homepage:
- Size: 25.4 KB
- Stars: 11
- Watchers: 7
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ext-libdeflate
[![CI](https://github.com/pmmp/ext-libdeflate/actions/workflows/ci.yml/badge.svg)](https://github.com/pmmp/ext-libdeflate/actions/workflows/ci.yml)PHP bindings for [libdeflate](https://github.com/ebiggers/libdeflate), a zlib replacement with significantly better performance.
## Features
At the time of writing, this extension only exposes libdeflate's compression APIs, since these are the simplest to implement.Since libdeflate doesn't support stream decompression, the decompression APIs are less useful unless you know the decompressed size of the data before decompressing it.
## Performance
Compared to `zlib_encode()`, a 40% performance improvement can be observed at level 1, rising to 50-70% at level 6 (default), for approximately the same compression ratios. Also, `libdeflate_deflate_compress()` was observed to sometimes be faster at level 6 compression than `zlib_encode()` at level 1 compression.## API
```php