@Override
    public void startCompression() {
        // Outbound traffic only
        if (isEncrypted()) {
            channelHandlerContext.channel().pipeline().addAfter(SSL_HANDLER_NAME, "outboundCompressionHandler", new JZlibEncoder(Z_BEST_COMPRESSION));
        }  else {
            channelHandlerContext.channel().pipeline().addFirst(new JZlibEncoder(Z_BEST_COMPRESSION));
        }
        // Z_BEST_COMPRESSION is the same level as COMPRESSION_MAX in MINA
    }
Updates the system counter of written bytes. This information is used by the "outgoing bytes" statistic.

@param ctx the context for the channel writing bytes
xmppserver/src/main/java/org/jivesoftware/openfire/nio/NettyConnection.java