Blame SOURCES/netty-old-jzlib.patch

0e1498
--- codec/src/main/java/io/netty/handler/codec/compression/JZlibEncoder.java.orig	2015-07-03 11:47:23.545978767 +0100
0e1498
+++ codec/src/main/java/io/netty/handler/codec/compression/JZlibEncoder.java	2015-07-03 11:47:33.284855182 +0100
0e1498
@@ -140,8 +140,7 @@
0e1498
         }
0e1498
 
0e1498
         int resultCode = z.init(
0e1498
-                compressionLevel, windowBits, memLevel,
0e1498
-                ZlibUtil.convertWrapperType(wrapper));
0e1498
+                compressionLevel, windowBits, memLevel);
0e1498
         if (resultCode != JZlib.Z_OK) {
0e1498
             ZlibUtil.fail(z, "initialization failure", resultCode);
0e1498
         }
0e1498
@@ -225,8 +225,7 @@
0e1498
         }
0e1498
         int resultCode;
0e1498
         resultCode = z.deflateInit(
0e1498
-                compressionLevel, windowBits, memLevel,
0e1498
-                JZlib.W_ZLIB); // Default: ZLIB format
0e1498
+                compressionLevel, windowBits, memLevel);
0e1498
         if (resultCode != JZlib.Z_OK) {
0e1498
             ZlibUtil.fail(z, "initialization failure", resultCode);
0e1498
         } else {
0e1498
--- codec/src/main/java/io/netty/handler/codec/compression/JZlibDecoder.java.orig	2015-07-03 11:45:12.040647549 +0100
0e1498
+++ codec/src/main/java/io/netty/handler/codec/compression/JZlibDecoder.java	2015-07-03 11:45:42.114265920 +0100
0e1498
@@ -47,7 +47,7 @@
0e1498
             throw new NullPointerException("wrapper");
0e1498
         }
0e1498
 
0e1498
-        int resultCode = z.init(ZlibUtil.convertWrapperType(wrapper));
0e1498
+        int resultCode = z.init();
0e1498
         if (resultCode != JZlib.Z_OK) {
0e1498
             ZlibUtil.fail(z, "initialization failure", resultCode);
0e1498
         }
0e1498
@@ -67,7 +67,7 @@
0e1498
         this.dictionary = dictionary;
0e1498
 
0e1498
         int resultCode;
0e1498
-        resultCode = z.inflateInit(JZlib.W_ZLIB);
0e1498
+        resultCode = z.inflateInit();
0e1498
         if (resultCode != JZlib.Z_OK) {
0e1498
             ZlibUtil.fail(z, "initialization failure", resultCode);
0e1498
         }
0e1498
--- codec/src/main/java/io/netty/handler/codec/compression/ZlibUtil.java.orig	2015-07-03 11:51:33.209807700 +0100
0e1498
+++ codec/src/main/java/io/netty/handler/codec/compression/ZlibUtil.java	2015-07-03 11:58:07.594767969 +0100
0e1498
@@ -17,7 +17,6 @@
0e1498
 
0e1498
 import com.jcraft.jzlib.Deflater;
0e1498
 import com.jcraft.jzlib.Inflater;
0e1498
-import com.jcraft.jzlib.JZlib;
0e1498
 
0e1498
 /**
0e1498
  * Utility methods used by {@link JZlibEncoder} and {@link JZlibDecoder}.
0e1498
@@ -40,27 +39,6 @@
0e1498
         return new CompressionException(message + " (" + resultCode + ')' + (z.msg != null? ": " + z.msg : ""));
0e1498
     }
0e1498
 
0e1498
-    static JZlib.WrapperType convertWrapperType(ZlibWrapper wrapper) {
0e1498
-        JZlib.WrapperType convertedWrapperType;
0e1498
-        switch (wrapper) {
0e1498
-        case NONE:
0e1498
-            convertedWrapperType = JZlib.W_NONE;
0e1498
-            break;
0e1498
-        case ZLIB:
0e1498
-            convertedWrapperType = JZlib.W_ZLIB;
0e1498
-            break;
0e1498
-        case GZIP:
0e1498
-            convertedWrapperType = JZlib.W_GZIP;
0e1498
-            break;
0e1498
-        case ZLIB_OR_NONE:
0e1498
-            convertedWrapperType = JZlib.W_ANY;
0e1498
-            break;
0e1498
-        default:
0e1498
-            throw new Error();
0e1498
-        }
0e1498
-        return convertedWrapperType;
0e1498
-    }
0e1498
-
0e1498
     static int wrapperOverhead(ZlibWrapper wrapper) {
0e1498
         int overhead;
0e1498
         switch (wrapper) {
0e1498
--- codec-http/src/main/java/io/netty/handler/codec/spdy/SpdyHeaderBlockJZlibEncoder.java.orig	2015-07-03 12:04:31.063867729 +0100
0e1498
+++ codec-http/src/main/java/io/netty/handler/codec/spdy/SpdyHeaderBlockJZlibEncoder.java	2015-07-03 12:04:39.829755712 +0100
0e1498
@@ -47,7 +47,7 @@
0e1498
         }
0e1498
 
0e1498
         int resultCode = z.deflateInit(
0e1498
-                compressionLevel, windowBits, memLevel, JZlib.W_ZLIB);
0e1498
+                compressionLevel, windowBits, memLevel);
0e1498
         if (resultCode != JZlib.Z_OK) {
0e1498
             throw new CompressionException(
0e1498
                     "failed to initialize an SPDY header block deflater: " + resultCode);