]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: slz: clarify that the size promise applies to the stream, not to a call
authorWilly Tarreau <w@1wt.eu>
Mon, 27 Jul 2026 16:00:09 +0000 (18:00 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 28 Jul 2026 14:14:53 +0000 (16:14 +0200)
commitae819a08e73d076fddebfc94196dbedb887f4901
tree077402fd3118ae447899f245b8e6ece14c4c575b
parent0201a6d7b2e89e60acac3aed9a23a7b15302d923
CLEANUP: slz: clarify that the size promise applies to the stream, not to a call

The output size guarantee of slz_rfc1951_encode() reads as if it applied
to every call, but up to 31 bits are retained in the queue from one call
to the next (on 64-bit systems), so a call may emit a few bytes that
belong to the data of the previous ones, and a single call may emit up to
5 bytes more than expected. Let's just clarify this to avoid future
surprises.

It should be backported to 1.2 for API clarity.

This is libslz upstream commit 5fa0c8da22b7d0a6d67f287a5a2af6af8e6d2b85.

Note: no impact on running code, it's just a comment that may be backported
      if it helps with another patch's context.
src/slz.c