]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
IMPORT: slz: mention the potential header in slz_finish()
authorDridi Boukelmoune <dridi.boukelmoune@gmail.com>
Wed, 30 Mar 2022 05:58:23 +0000 (07:58 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 14 Nov 2022 10:14:02 +0000 (11:14 +0100)
There may be 2 or 10 bytes sent respectively for zlib and gzip.

This is libslz upstream commit de1cac155ac730ba0491a6c866a510760c01fa9b

include/import/slz.h

index d7d4863509fa35ef41bd2c398bac665de4cd4866..d01599ca442a008bdf2de7937c0aff313f5dbeb4 100644 (file)
@@ -152,7 +152,9 @@ static inline long slz_encode(struct slz_stream *strm, void *out,
  * possibly pending bits from the queue (up to 24 bits), rounding to the next
  * byte, then 4 bytes for the CRC when doing zlib/gzip, then another 4 bytes
  * for the input length for gzip. That may about to 4+4+4 = 12 bytes, that the
- * caller must ensure are available before calling the function.
+ * caller must ensure are available before calling the function. Note that if
+ * the initial header was never sent, it will be sent first as well (up to 10
+ * extra bytes).
  */
 static inline int slz_finish(struct slz_stream *strm, void *buf)
 {