Generate zlib CRC tables in case compiled with dynamic tables.
It is possible that the zlib being used was compiled with dynamic
CRC tables, i.e. with DYNAMIC_CRC_TABLE defined. In that case, the
tables must be generated before multiple threads can be allowed to
compute CRCs. The get_crc_table() function forces that generation.
diff --git a/pigz.c b/pigz.c
index da69b57..8c1a561 100644
--- a/pigz.c
+++ b/pigz.c
@@ -4343,6 +4343,9 @@
if (zlib_vernum() < 0x1230)
throw(EINVAL, "zlib version less than 1.2.3");
+ // create CRC table, in case zlib compiled with dynamic tables
+ get_crc_table();
+
// process user environment variable defaults in GZIP
opts = getenv("GZIP");
if (opts != NULL) {