Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126460 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 0A7451A00BC for ; Tue, 18 Feb 2025 20:38:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1739910958; bh=NSya+SYP0TGOzO7fiMDZ+1lidOfbJOEXAnnUq13qF30=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=cFElu815xNUVoWj9SJ/NLdAVWcagHB13n2fTMzEOVdsObYpEolYgeC/IuUo2mmc84 RmhA3W6Hy9fg9W0yL2vK1N22d86ERIwS3HRadXlyhyVR7gBD4Z5ubCcaopTfR8A+78 ykqADGIsYhbtVH5EN255goqNJJ81d3zPH0wLbB4zyrNcvWvn9x0N2NbnClWPnVCNlT HTIR8PQIBsugc61M8jQ6uFaCjEDNcVDiXl/8lfzYry43bkDkvv1EIKoSFJzsKNsR09 rK3/RhaTSBX4NUjSdwDI7e/+yM52rtsU2PwsOWWJ9n+CDFyhvUBQDtL5KL8LNdlTh5 reepKpFu07Wiw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D4B5A180584 for ; Tue, 18 Feb 2025 20:35:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DMARC_MISSING,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,URIBL_SBL_A autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-yw1-f177.google.com (mail-yw1-f177.google.com [209.85.128.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 18 Feb 2025 20:35:56 +0000 (UTC) Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-6fb95249855so10103817b3.2 for ; Tue, 18 Feb 2025 12:38:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beberlei-de.20230601.gappssmtp.com; s=20230601; t=1739911117; x=1740515917; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ywZxizFbJxu8O8c/F68Yp0TM3pA3/oso3x9t9fu2kvs=; b=yhX3LnLqstkbsafrfvSHBTscP3DlDmoFZ1DpVo+R+h4PMJ4OiA2I0SrgVXtsQIx4u1 lgNcLilp+MrO2wuiDrgruBsRUyAZDeCpHVEjPIY4X83tdwlO1ApGbkSETvdGWPv4LvSe Fyc63BiRxTsm+wN/BtW1LLeJJzjs68qqgt2+dFylG4ndpIAqWrhKxaAwl0nriGNGMBaS bV+gLnh7Lt/EY7+1leLwEAuDK0/mP3cEu4B6dgHC/1RIsDjRCEE5rZ0C9R3+gIJY/sYn 7xezkliETA1NfHLKw1/qs0q7Ln9RTIj3EL320SILT7Pm3b8W/0/hsWTgdtmLxOmOdB1u UMUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739911117; x=1740515917; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ywZxizFbJxu8O8c/F68Yp0TM3pA3/oso3x9t9fu2kvs=; b=YevIlNrSgisKrtM08+VWpW7i+Rb2jIyEz3jzmIdMfJLlEcnyRGwFJsdDM471nieaAG 5qQ+gU/Rv9A7co5v4JBySFbO6dwGpQAxBFNKt+TJ7OpXPlGyAb5jac+q82FquBlJ8ixs /87WyCcrqrxqcT+uRGR5gQfxM3D8sxmyXE3n6YAU40psyMLRbw2fDCfCI+kTpPiyJjB4 ygwsTHPQF25bSuWVaGXwlYdbDRE4Lghxkfjt3s6I5oN98z66WhxH2iDjOYB+5AeRMe8j rrx7PMy5DXWveRaCXiapsyVyd+kukuDfVvSmTUf0Z/RGSXkW4BoCcV53FpOiS86nF+kd s6SQ== X-Gm-Message-State: AOJu0Yyy6KxnKzZHurteBRBL0EtLkj/MUSYqpncYqo8cqhtbWI8e78H4 oq1t6wZFfMRRUDuilucIVrzNjbKmVG5Ejc+Wh6zs2Q2W7RysplDUlzN7jr46JDt+HdV8fHbgyJR R6/sJyI2hsZIZOUYAkzk5Y2wh+XWsPmKE1tSaTQ== X-Gm-Gg: ASbGnctI5Jn3v08t12pgEVs+XhZWQUe8H8X/eekG4Wsjr8t5mWxkQJ1R6CI20hiNOQP 3bAkTJM0E9mI1pfnJ190sAMLwG7eZeBgXurPaz3x88fZZBA8CI4xY0PFSzBjkVKCMgKi9IJh7aK Yor0KYqJx0/SIt3jT8H62lnTD4D9ZZ8Q== X-Google-Smtp-Source: AGHT+IHUTi47N4CTLW91UZ2WaP8OuUo5y0kyj7RUe7vFFBP6Q3/eXVy6lYqTj3qGBUQHx+Gy6ADjee6B27K3nsOjN4M= X-Received: by 2002:a05:690c:c18:b0:6f9:8820:b764 with SMTP id 00721157ae682-6fb5829560cmr145037717b3.16.1739911116404; Tue, 18 Feb 2025 12:38:36 -0800 (PST) Received: from 1064022179695 named unknown by gmailapi.google.com with HTTPREST; Tue, 18 Feb 2025 12:38:35 -0800 Received: from 1064022179695 named unknown by gmailapi.google.com with HTTPREST; Tue, 18 Feb 2025 12:38:32 -0800 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 (Mimestream 1.5.0) References: <528e16e1-1fb3-448a-b187-7cc84e1bcc4a@seld.be> In-Reply-To: <528e16e1-1fb3-448a-b187-7cc84e1bcc4a@seld.be> Date: Tue, 18 Feb 2025 12:38:35 -0800 X-Gm-Features: AWEUYZkc_thm8W1vAvvMEXsMQQr6cAZQj0rVlcptMjIMDxuVwcWxL9vaoGANrGM Message-ID: Subject: Re: [PHP-DEV] [RFC] Modern Compression (zstd, brotli) To: Jordi Boggiano Cc: Internals Content-Type: multipart/alternative; boundary="00000000000008df54062e70a0d2" From: kontakt@beberlei.de (=?UTF-8?Q?Benjamin_Au=C3=9Fenhofer?=) --00000000000008df54062e70a0d2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Am 18.02.2025, 11:19:26 schrieb Jordi Boggiano : > Hey, > > K=C3=A9vin 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 > --00000000000008df54062e70a0d2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Am 18.02.2025, 11:19:26 schrieb J= ordi Boggiano <j.boggiano@seld.be<= /a>>:
=20

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 improvemen= t. I would propose that the constructor of a compressor gets all the option= s and the interface method itself are really always single argument data in= , data out.

For Zstd dictionary support you could just ad= d a second class (or an optional parameter) in the ctor. Rough idea (consta= nt values and variable names and types for ctors are mostly made up):
=


greetings
Benjamin

Best,
Jordi

--
Jordi Boggiano
@sel= daek - https://seld.be
--00000000000008df54062e70a0d2--