class RpcStreamConnection extends RpcConnection {

    @Override
    public void useConnectionCompression() throws ConnectionException {
        if (!usingCompression) {
            super.useConnectionCompression();

            try {
                topOutputStream.flush();
                // We do this here immediately to avoid having the compress2
                // itself compressed...
                putRpcPacket(RpcPacket.constructRpcPacket(RpcFunctionSpec.PROTOCOL_COMPRESS2,
                        "compress2", null, null));
                topOutputStream.flush();
                topOutputStream = new RpcGZIPOutputStream(outputStream);
                topInputStream = new RpcGZIPInputStream(inputStream);
            } catch (IOException exc) {
                Log.error("I/O exception encountered while setting up GZIP streaming: %s",
                        exc.getLocalizedMessage());
                Log.exception(exc);
                throwConnectionException(exc,
                        "unable to set up client compression streaming to Perforce server: %s",
                        exc.getLocalizedMessage());
            }
        }
    }

    public  RpcStreamConnection(String serverHost, int serverPort, Properties props,
                               ServerStats stats, P4Charset p4Charset, boolean secure);
    private  RpcStreamConnection(String serverHost, int serverPort, Properties props,
            ServerStats stats, P4Charset p4Charset, Socket socket, boolean secure);
    private  RpcStreamConnection(String serverHost, int serverPort, Properties props,
            ServerStats stats, P4Charset p4Charset, Socket socket, RpcSocketPool pool, boolean secure);
    public  RpcStreamConnection(String serverHost, int serverPort, Properties props,
            ServerStats stats, P4Charset p4Charset, Socket socket, RpcSocketPool pool, boolean secure,
            String rsh);

}