Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128703 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 lists.php.net (Postfix) with ESMTPS id 524751A00BC for ; Tue, 16 Sep 2025 13:27:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1758029178; bh=HpJBZqYtHBTvqJHdjWNm3nXIvuhni4YLG9cLhHHlckM=; h=Date:From:To:In-Reply-To:References:Subject:From; b=nE34p8GgVFNljpTbkW0HdZWs6U416WKTb6ZW5nGb7QT1Ng+jxubVH8NeoSWOtART3 oNkFUsJTe0Dnz/RNpOJR0dG+skt0IqJjqfxstcuz/KMDTV82fJJogecAdR0gpo2pxt /O2aqCJFlfGeUY/0Zehu3PcHO2uyYzG9X+Bw1YtTjvqBBkmWSyirQRMWvZTFcEv3Ko lOxbXkwbbhbCT/WOUJGV+iltd/xdKav38LhQY0k89XpwOs8OmyF/2UyBinuyqjrHbP gE5FO6dJV4OKdIlBXCuBhpGw/VFf4Ay856+CBIFGAgObU9cKQKYbpjeboaEa/dJ63n XQqGQ8ijQes4g== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4F04B180074 for ; Tue, 16 Sep 2025 13:26:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-b6-smtp.messagingengine.com (fhigh-b6-smtp.messagingengine.com [202.12.124.157]) (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, 16 Sep 2025 13:26:06 +0000 (UTC) Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.stl.internal (Postfix) with ESMTP id B58617A029E for ; Tue, 16 Sep 2025 09:27:30 -0400 (EDT) Received: from phl-imap-05 ([10.202.2.95]) by phl-compute-05.internal (MEProxy); Tue, 16 Sep 2025 09:27:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bottled.codes; h=cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1758029250; x=1758115650; bh=HpJBZqYtHB TvqJHdjWNm3nXIvuhni4YLG9cLhHHlckM=; b=ncHx1fRn0d09sciSTYuH5z6uwT R7MTs9Z60VtiaWLUIPOAerxSQgaQ+YfaZ8cuTqp66qLVpveI4mCnolPsNMBRG7jo t4XEkwxEXYAFXTa8xjaaC04BuSgaJMj5SeAM1jNlfPBQugsZn75vESRTN4XPc+MW 69lIIjXsMnZzTdxe3+47cx9reO8I+tzoohPCQeD7c+mgVB6YDVMiPM8JFdxgn+Rn DbHVbkXEO52CdA27PzGHZTtgI8q0sQE7U+5vOKwF/17h8hy8OUVFE8493kbMWSwP jROgtrWXvezgo60fhw9E122zjHMzDgLUFrwxn6Sc0fXkctEGmSuUuePa2OMw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1758029250; x=1758115650; bh=HpJBZqYtHBTvqJHdjWNm3nXIvuhni4YLG9c LhHHlckM=; b=Vd2B/C4uiPZ9R9g12LT+tQJsHryA0mj7OO8F8C4rQbLquS8vZN+ 02aRLXKKnvs2A4kNBnaFshvhgtc1wzJmE2bgh4uhqhIzYA5KRkZhfUGLNac0eX+i Tb5x2imce3dpfEIBr8fxNKBjWZjoCspliKK2A0B+PqIIBaVvzspYOpKyCnabJSJW Lce/dp6dUmV7a7MXP+mSl4DFS6qhcxjrOlnTLm1IPPy57fHA9F04l2qMkmQGvoqS TzotAC4Z8en/thQfAx7xxLvZ95JleJcnHMyKq12u5BOhysfaMqY1qF3+bVrJZ01u DjXQdo7h/49P7YRnSj58Ol9S6wAuFfYRZQA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdegtdeilecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecunecujfgurhepofggfffhvffkjghfufgtsegrtderreertd ejnecuhfhrohhmpedftfhosgcunfgrnhguvghrshdfuceorhhosgessghothhtlhgvugdr tghouggvsheqnecuggftrfgrthhtvghrnhepleekhedtgfefhfelieelgfegiefhkedvle efjedtffelhfehheffgfduteduuddtnecuffhomhgrihhnpehphhhprdhnvghtnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprhhosgessghoth htlhgvugdrtghouggvshdpnhgspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhht pdhrtghpthhtohepihhnthgvrhhnrghlsheslhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id F3FBC182007E; Tue, 16 Sep 2025 09:27:29 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: list list-help: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 X-ThreadId: AypYfSb8ssWo Date: Tue, 16 Sep 2025 15:27:08 +0200 To: internals@lists.php.net Message-ID: <694fd998-43a2-4c6b-828c-aa1feb81d424@app.fastmail.com> In-Reply-To: References: Subject: Re: [PHP-DEV] [RFC] Add pack()/unpack() support for signed integers with specific endianness Content-Type: multipart/alternative; boundary=53c46cfcc82645c49153c8efe5dab727 From: rob@bottled.codes ("Rob Landers") --53c46cfcc82645c49153c8efe5dab727 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Tue, Sep 16, 2025, at 13:45, Alexandre Daubois wrote: > Hello Internals, >=20 >=20 > I=E2=80=99d like to present this new RFC. When discussing the issue, w= e first thought that the RFC process wasn=E2=80=99t necessary. However, = discussions on the PR showed that selecting new letters for pack and unp= ack is more challenging than we initially thought, thus creating an RFC = for this change. >=20 > Here is the link to the RFC: https://wiki.php.net/rfc/pack-unpack-endi= anness-signed-integers-support >=20 > Best, > Alexandre Daubois Hi Alexandre, Thank you for your work on this. Of all the RFCs I've seen in awhile, th= is one is one that I'm most excited to see after writing a protobuf impl= ementation.=20 If there is one thing I would be over the moon for, it would be for also= adding zigzag encoding as a possible signed integer encoding (maybe usi= ng Z/z as the letter)? It is more efficient for signed integers (vs. two= s-complement) where a variable length integer is desired. I can understa= nd if this is out of scope, but I thought I'd ask. =E2=80=94 Rob --53c46cfcc82645c49153c8efe5dab727 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Tue, Sep = 16, 2025, at 13:45, Alexandre Daubois wrote:
Hello Internals,


I=E2=80=99d like to present this new RFC. When discussing the issu= e, we first thought that the RFC process wasn=E2=80=99t necessary. Howev= er, discussions on the PR showed that selecting new letters for pack and= unpack is more challenging than we initially thought, thus creating an = RFC for this change.


Best,=
Alexandre Daubois
Hi Alexandre,

Thank you for your w= ork on this. Of all the RFCs I've seen in awhile, this one is one that I= 'm most excited to see after writing a protobuf implementation.

If there is one thing I would be over the moon for, it= would be for also adding zigzag encoding as a possible signed integer e= ncoding (maybe using Z/z as the letter)? It is more efficient for signed= integers (vs. twos-complement) where a variable length integer is desir= ed. I can understand if this is out of scope, but I thought I'd ask.
=

=E2=80=94 Rob
= --53c46cfcc82645c49153c8efe5dab727--