]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Clarify requirement in zlib.h to avoid multiple flush markers.
authorMark Adler <madler@alumni.caltech.edu>
Mon, 21 Aug 2023 20:50:29 +0000 (13:50 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Thu, 24 Aug 2023 09:22:33 +0000 (11:22 +0200)
zlib-ng.h.in
zlib.h.in

index de2d4fade1724c4107723bbec1f9a3b2cb08ecae..b3fdf87d9c0d995b3015c6a8696ddcc5482ec4ef 100644 (file)
@@ -318,8 +318,8 @@ int32_t zng_deflate(zng_stream *strm, int32_t flush);
   with the same value of the flush parameter and more output space (updated
   avail_out), until the flush is complete (deflate returns with non-zero
   avail_out).  In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
-  avail_out is greater than six to avoid repeated flush markers due to
-  avail_out == 0 on return.
+  avail_out is greater than six when the flush marker begins, in order to avoid
+  repeated flush markers upon calling deflate() again when avail_out == 0.
 
     If the parameter flush is set to Z_FINISH, pending input is processed,
   pending output is flushed and deflate returns with Z_STREAM_END if there was
index 69b7d424e31fabb5d46ad22270ef1032fec63d73..8e69214775d325797dc0f42f047f1a7b73357dd4 100644 (file)
--- a/zlib.h.in
+++ b/zlib.h.in
@@ -330,8 +330,8 @@ Z_EXTERN int Z_EXPORT deflate(z_stream *strm, int flush);
   with the same value of the flush parameter and more output space (updated
   avail_out), until the flush is complete (deflate returns with non-zero
   avail_out).  In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
-  avail_out is greater than six to avoid repeated flush markers due to
-  avail_out == 0 on return.
+  avail_out is greater than six when the flush marker begins, in order to avoid
+  repeated flush markers upon calling deflate() again when avail_out == 0.
 
     If the parameter flush is set to Z_FINISH, pending input is processed,
   pending output is flushed and deflate returns with Z_STREAM_END if there was