Am 18.02.2025, 11:19:26 schrieb Jordi Boggiano <j.boggi...@seld.be>: > Hey, > > Kévin Dunglas and myself would like to present this RFC proposing > inclusion of the zstandard and brotli pecl extensions into core, with > the main goal of making them more broadly available. > > https://wiki.php.net/rfc/modern_compression > > Thanks for your consideration, we're looking forward to hearing your > feedback! >
I really like the idea to add both to core and the reasoning to add Brotli as well given Safari constraints. As Tim said, the API could use simplification and improvement. I would propose that the constructor of a compressor gets all the options and the interface method itself are really always single argument data in, data out. For Zstd dictionary support you could just add a second class (or an optional parameter) in the ctor. Rough idea (constant values and variable names and types for ctors are mostly made up): https://gist.github.com/beberlei/6f3d365f79959e3ded07e6a1f1351a1b greetings Benjamin > > Best, > Jordi > > -- > Jordi Boggiano > @seldaek - https://seld.be >