From: Nathan Moinvaziri Date: Sun, 11 Jul 2021 23:58:48 +0000 (-0700) Subject: Call deflateBound to calculate length with custom gzip header in example. X-Git-Tag: 2.1.0-beta1~510 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=983df0adec3fb04bc47f051e479fb6490f5da3d9;p=thirdparty%2Fzlib-ng.git Call deflateBound to calculate length with custom gzip header in example. --- diff --git a/test/example.c b/test/example.c index 151e814b7..9f1f52a94 100644 --- a/test/example.c +++ b/test/example.c @@ -934,6 +934,7 @@ void test_deflate_set_header(unsigned char *compr, size_t comprLen) { if (err == Z_OK) { printf("deflateSetHeader(): OK\n"); } + PREFIX(deflateBound)(&c_stream, (unsigned long)comprLen); c_stream.next_in = (unsigned char *)hello; c_stream.next_out = compr;