summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/zlib/zlib.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 32decbbc36..b95198554e 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -1329,13 +1329,21 @@ rb_deflate_s_allocate(VALUE klass)
*
* Zlib::FILTERED::
* For data produced by a filter (or predictor). The effect of FILTERED is
- * to force more Huffman coding and less string matching; it is somewhat
+ * to force more Huffman codes and less string matching; it is somewhat
* intermediate between DEFAULT_STRATEGY and HUFFMAN_ONLY. Filtered data
* consists mostly of small values with a somewhat random distribution.
*
+ * Zlib::FIXED::
+ * Prevents the use of dynamic Huffman codes, allowing for a simpler decoder
+ * for specialized applications.
+ *
* Zlib::HUFFMAN_ONLY::
* Use Huffman encoding only (no string matching).
*
+ * Zlib::RLE::
+ * Designed to be almost as fast as HUFFMAN_ONLY, but give better
+ * compression for PNG image data.
+ *
* == Examples
*
* === Basic
@@ -4209,6 +4217,18 @@ Init_zlib()
*
* Which is an argument for Deflate.new and Deflate#params. */
rb_define_const(mZlib, "HUFFMAN_ONLY", INT2FIX(Z_HUFFMAN_ONLY));
+#ifdef Z_RLE
+ /* compression method 3
+ *
+ * Which is an argument for Deflate.new and Deflate#params. */
+ rb_define_const(mZlib, "RLE", INT2FIX(Z_RLE));
+#endif
+#ifdef Z_FIXED
+ /* compression method 4
+ *
+ * Which is an argument for Deflate.new and Deflate#params. */
+ rb_define_const(mZlib, "FIXED", INT2FIX(Z_FIXED));
+#endif
/* compression method 0
*
* Which is an argument for Deflate.new and Deflate#params. */