aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zlib.h27
1 files changed, 15 insertions, 12 deletions
diff --git a/zlib.h b/zlib.h
index a4e83a5..6fed1b3 100644
--- a/zlib.h
+++ b/zlib.h
@@ -587,18 +587,21 @@ ZEXTERN int ZEXPORT deflateInit2(z_streamp strm,
587 587
588 The strategy parameter is used to tune the compression algorithm. Use the 588 The strategy parameter is used to tune the compression algorithm. Use the
589 value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a 589 value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
590 filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no 590 filter (or predictor), Z_RLE to limit match distances to one (run-length
591 string match), or Z_RLE to limit match distances to one (run-length 591 encoding), or Z_HUFFMAN_ONLY to force Huffman encoding only (no string
592 encoding). Filtered data consists mostly of small values with a somewhat 592 matching). Filtered data consists mostly of small values with a somewhat
593 random distribution. In this case, the compression algorithm is tuned to 593 random distribution, as produced by the PNG filters. In this case, the
594 compress them better. The effect of Z_FILTERED is to force more Huffman 594 compression algorithm is tuned to compress them better. The effect of
595 coding and less string matching; it is somewhat intermediate between 595 Z_FILTERED is to force more Huffman coding and less string matching than the
596 Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as 596 default; it is intermediate between Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY.
597 fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The 597 Z_RLE is almost as fast as Z_HUFFMAN_ONLY, but should give better
598 strategy parameter only affects the compression ratio but not the 598 compression for PNG image data than Huffman only. The degree of string
599 correctness of the compressed output even if it is not set appropriately. 599 matching from most to none is: Z_DEFAULT_STRATEGY, Z_FILTERED, Z_RLE, then
600 Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler 600 Z_HUFFMAN. The strategy parameter affects the compression ratio but never
601 decoder for special applications. 601 the correctness of the compressed output, even if it is not set optimally
602 for the given data. Z_FIXED uses the default string matching, but prevents
603 the use of dynamic Huffman codes, allowing for a simpler decoder for special
604 applications.
602 605
603 deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough 606 deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
604 memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid 607 memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid