]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Use large default buffer size for minideflate to match minigzip use of GZBUFSIZE.
authorNathan Moinvaziri <nathan@nathanm.com>
Thu, 10 Mar 2022 16:57:13 +0000 (08:57 -0800)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Fri, 17 Mar 2023 20:27:56 +0000 (21:27 +0100)
test/minideflate.c

index b31a50f4a2b04a48cad11dab62add3c27969555f..a05429191e7f7c3f0c5e71dacc65d72f0da2cf5b 100644 (file)
@@ -32,6 +32,9 @@
     } \
 }
 
+/* Default read/write i/o buffer size based on GZBUFSIZE */
+#define BUFSIZE 131072
+
 /* ===========================================================================
  * deflate() using specialized parameters
  */
@@ -228,8 +231,8 @@ int main(int argc, char **argv) {
     int32_t window_bits = INT32_MAX;
     int32_t strategy = Z_DEFAULT_STRATEGY;
     int32_t level = Z_DEFAULT_COMPRESSION;
-    int32_t read_buf_size = 4096;
-    int32_t write_buf_size = 4096;
+    int32_t read_buf_size = BUFSIZE;
+    int32_t write_buf_size = BUFSIZE;
     int32_t flush = Z_NO_FLUSH;
     uint8_t copyout = 0;
     uint8_t uncompr = 0;