summaryrefslogtreecommitdiff
path: root/zlib-ng.h
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2019-05-24 11:18:33 +0200
committerHans Kristian Rosbach <hk-github@circlestorm.org>2019-07-18 13:19:09 +0200
commitd746d233c1dc70e0717877bccf8d9dc099d056d5 (patch)
tree73388c6a1674053c10dd3f22ff48f0e0186d9467 /zlib-ng.h
parentb927c6ab8774424ae006c185d19dfd327c0f3d6e (diff)
Add "reproducible" deflate parameter
IBM Z DEFLATE CONVERSION CALL may produce different (but valid) compressed data for the same uncompressed data. This behavior might be unacceptable for certain use cases (e.g. reproducible builds). This patch introduces Z_DEFLATE_REPRODUCIBLE parameter, which can be used to indicate that this is the case, and turn off IBM Z DEFLATE CONVERSION CALL.
Diffstat (limited to 'zlib-ng.h')
-rw-r--r--zlib-ng.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/zlib-ng.h b/zlib-ng.h
index 5662b27..a66b2af 100644
--- a/zlib-ng.h
+++ b/zlib-ng.h
@@ -1793,6 +1793,13 @@ ZEXTERN int ZEXPORT zng_gzgetc_(gzFile file); /* backward compatibility */
typedef enum {
Z_DEFLATE_LEVEL = 0, /* compression level, represented as an int */
Z_DEFLATE_STRATEGY = 1, /* compression strategy, represented as an int */
+ Z_DEFLATE_REPRODUCIBLE = 2,
+ /*
+ Whether reproducible compression results are required. Represented as an int, where 0 means that it is allowed
+ to trade reproducibility for e.g. improved performance or compression ratio, and non-0 means that
+ reproducibility is strictly required. Reproducibility is guaranteed only when using an identical zlib-ng build.
+ Default is 0.
+ */
} zng_deflate_param;
typedef struct {