]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Call deflateBound to calculate length with custom gzip header in example.
authorNathan Moinvaziri <nathan@solidstatenetworks.com>
Sun, 11 Jul 2021 23:58:48 +0000 (16:58 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Wed, 22 Sep 2021 14:14:05 +0000 (16:14 +0200)
test/example.c

index 151e814b7e0c6600b8915a98ad684d3d3801f9ab..9f1f52a9402138be831503b297f3c3b0cf07d5bc 100644 (file)
@@ -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;