Package io.netty.handler.codec.compression

Examples of io.netty.handler.codec.compression.ZlibEncoder


    @Override
    public ChannelPipeline getPipeline() throws Exception {
        ChannelPipeline pipeline = pipeline();

        // Enable stream compression (you can remove these two if unnecessary)
        pipeline.addLast("deflater", new ZlibEncoder(ZlibWrapper.GZIP));
        pipeline.addLast("inflater", new ZlibDecoder(ZlibWrapper.GZIP));

        // Add the number codec first,
        pipeline.addLast("decoder", new BigIntegerDecoder());
        pipeline.addLast("encoder", new NumberEncoder());
View Full Code Here


    @Override
    public ChannelPipeline getPipeline() throws Exception {
        ChannelPipeline pipeline = pipeline();

        // Enable stream compression (you can remove these two if unnecessary)
        pipeline.addLast("deflater", new ZlibEncoder(ZlibWrapper.GZIP));
        pipeline.addLast("inflater", new ZlibDecoder(ZlibWrapper.GZIP));

        // Add the number codec first,
        pipeline.addLast("decoder", new BigIntegerDecoder());
        pipeline.addLast("encoder", new NumberEncoder());
View Full Code Here

        p.remove(this);
    }

    private void enableGzip(ChannelHandlerContext ctx) {
        ChannelPipeline p = ctx.getPipeline();
        p.addLast("gzipdeflater", new ZlibEncoder(ZlibWrapper.GZIP));
        p.addLast("gzipinflater", new ZlibDecoder(ZlibWrapper.GZIP));
        p.addLast("unificationB", new PortUnificationServerHandler(detectSsl, false));
        p.remove(this);
    }
View Full Code Here

        }

        return new Result(
                targetContentEncoding,
                new EncoderEmbedder<ChannelBuffer>(
                        new ZlibEncoder(wrapper, compressionLevel, windowBits, memLevel)));
    }
View Full Code Here

     * Creates a new instance with the specified parameters.
     */
    public SpdyFrameEncoder(int compressionLevel, int windowBits, int memLevel) {
        super();
        headerBlockCompressor = new EncoderEmbedder<ChannelBuffer>(
                new ZlibEncoder(compressionLevel, windowBits, memLevel, SPDY_DICT));
    }
View Full Code Here

TOP

Related Classes of io.netty.handler.codec.compression.ZlibEncoder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.