]> 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>
Wed, 16 Mar 2022 10:42:45 +0000 (11:42 +0100)
test/minideflate.c

index 47c58a55bda3cc3721bf0d177581f35ef9ad7a85..b2144f18cd69b4d2977af7896a022bd027e16cb0 100644 (file)
@@ -24,6 +24,9 @@
     } \
 }
 
+/* Default read/write i/o buffer size based on GZBUFSIZE */
+#define BUFSIZE 131072
+
 /* ===========================================================================
  * deflate() using specialized parameters
  */
@@ -220,8 +223,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;