title: Netty (4.0.4) version compress/decompress string messages error
body: <p>I want to apply compress/decompress on Netty client/server I use the following code for pipeline in both client and sever:</p>
  
  <pre><code>@Override
  protected void initChannel(SocketChannel ch) throws Exception {
  ChannelPipeline pipeline = ch.pipeline();
  pipeline.addLast("framer", new DelimiterBasedFrameDecoder(
      8192, Delimiters.lineDelimiter()));
  
  pipeline.addLast("decoder", new StringDecoder());
  pipeline.addLast("encoder", new StringEncoder());
  pipeline.addLast("gzipdeflater", ZlibCodecFactory.newZlibEncoder(ZlibWrapper.GZIP));
  pipeline.addLast("gzipinflater", ZlibCodecFactory.newZlibDecoder(ZlibWrapper.GZIP));
  
  // and then business logic.
  pipeline.addLast("handler", new NettyClientHandler());        
  }
  </code></pre>
  
  <p>and the server as:</p>
  
  <pre><code>@Override
  protected void initChannel(SocketChannel ch) throws Exception {
  ChannelPipeline pipeline = ch.pipeline();
  pipeline.addLast("framer", new DelimiterBasedFrameDecoder(
      8192, Delimiters.lineDelimiter()));
  pipeline.addLast("decoder", new StringDecoder());
  pipeline.addLast("encoder", new StringEncoder());
  pipeline.addLast("gzipdeflater", ZlibCodecFactory.newZlibEncoder(ZlibWrapper.GZIP));
  pipeline.addLast("gzipinflater", ZlibCodecFactory.newZlibDecoder(ZlibWrapper.GZIP));
  //GlibDecoder
  //pipeline.addLast("decoder", new ZlibDecoder());
  //pipeline.addLast("encoder", new StringEncoder());
  // and then business logic.
  pipeline.addLast("handler", new NettyServerHandler());        
  }
  </code></pre>
  
  <p>and I got the following error in the client on starting the connection</p>
  
  <blockquote>
    <blockquote>
      <p>WARNING: Failed to initialize a channel. Closing: [id: 0x3553bb5c] java.lang.NoClassDefFoundError: com/jcraft/jzlib/Inflater    at
      io.netty.handler.codec.compression.JZlibDecoder.(JZlibDecoder.java:28)
        at
      io.netty.handler.codec.compression.ZlibCodecFactory.newZlibDecoder(ZlibCodecFactory.java:86)
        at
      testChat.NettyClientInitializer.initChannel(NettyClientInitializer.java:36)
        at
      testChat.NettyClientInitializer.initChannel(NettyClientInitializer.java:21)
        at
      io.netty.channel.ChannelInitializer.channelRegistered(ChannelInitializer.java:70)
        at
      io.netty.channel.DefaultChannelHandlerContext.invokeChannelRegistered(DefaultChannelHandlerContext.java:188)
        at
      io.netty.channel.DefaultChannelHandlerContext.fireChannelRegistered(DefaultChannelHandlerContext.java:174)
        at
      io.netty.channel.DefaultChannelPipeline.fireChannelRegistered(DefaultChannelPipeline.java:730)
        at
      io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:426)
        at
      io.netty.channel.AbstractChannel$AbstractUnsafe.access$100(AbstractChannel.java:367)
        at
      io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:403)
        at
      io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:353)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:366)     at
      io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
        at java.lang.Thread.run(Thread.java:722) Caused by:
      java.lang.ClassNotFoundException: com.jcraft.jzlib.Inflater   at
      java.net.URLClassLoader$1.run(URLClassLoader.java:366)    at
      java.net.URLClassLoader$1.run(URLClassLoader.java:355)    at
      java.security.AccessController.doPrivileged(Native Method)    at
      java.net.URLClassLoader.findClass(URLClassLoader.java:354)    at
      java.lang.ClassLoader.loadClass(ClassLoader.java:423)     at
      sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)     at
      java.lang.ClassLoader.loadClass(ClassLoader.java:356)     ... 15 more</p>
    </blockquote>
  </blockquote>
  
  <p>Exception in thread "main" java.nio.channels.ClosedChannelException</p>
  
  <p>the client/server work fine without compress stuff I try to put the compression/decompression before string encoding but I got the same error? any help please?</p>