Example usage for io.netty.handler.codec.compression ZlibCodecFactory isSupportingWindowSizeAndMemLevel

List of usage examples for io.netty.handler.codec.compression ZlibCodecFactory isSupportingWindowSizeAndMemLevel

Introduction

In this page you can find the example usage for io.netty.handler.codec.compression ZlibCodecFactory isSupportingWindowSizeAndMemLevel.

Prototype

public static boolean isSupportingWindowSizeAndMemLevel() 

Source Link

Document

Returns true if specify a custom window size and mem level is supported.

Usage

From source file:io.gatling.http.client.impl.AllowClientNoContextWebSocketClientCompressionHandler.java

License:Apache License

private AllowClientNoContextWebSocketClientCompressionHandler() {
    super(new PerMessageDeflateClientExtensionHandshaker(6,
            ZlibCodecFactory.isSupportingWindowSizeAndMemLevel(), MAX_WINDOW_SIZE, true, false),
            new DeflateFrameClientExtensionHandshaker(false), new DeflateFrameClientExtensionHandshaker(true));
}

From source file:io.vertx.core.http.impl.Http1xClientConnection.java

License:Open Source License

ArrayList<WebSocketClientExtensionHandshaker> initializeWebsocketExtensionHandshakers(
        HttpClientOptions options) {//w w w . j a va2  s .c o  m
    ArrayList<WebSocketClientExtensionHandshaker> extensionHandshakers = new ArrayList<WebSocketClientExtensionHandshaker>();
    if (options.tryWebsocketDeflateFrameCompression()) {
        extensionHandshakers
                .add(new DeflateFrameClientExtensionHandshaker(options.websocketCompressionLevel(), false));
    }

    if (options.tryUsePerMessageWebsocketCompression()) {
        extensionHandshakers.add(new PerMessageDeflateClientExtensionHandshaker(
                options.websocketCompressionLevel(), ZlibCodecFactory.isSupportingWindowSizeAndMemLevel(),
                PerMessageDeflateServerExtensionHandshaker.MAX_WINDOW_SIZE,
                options.getWebsocketCompressionAllowClientNoContext(),
                options.getWebsocketCompressionRequestServerNoContext()));
    }

    return extensionHandshakers;
}