private void print(Request request) {
            Values ret = request.returnValues();
            CompressionType type = CompressionType.valueOf(ret.get(0).asInt8());
            int uncompressedSize = ret.get(1).asInt32();
            byte [] blob = ret.get(2).asData();
            if (type == CompressionType.LZ4) {
                LZ4FastDecompressor decompressor = lz4Factory.fastDecompressor();
                byte [] uncompressed = new byte [uncompressedSize];
                int compressedLength = decompressor.decompress(blob, 0, uncompressed, 0, uncompressedSize);
                if (compressedLength != blob.length) {
                    throw new DeserializationException("LZ4 decompression failed. compressed size does not match. Expected " + blob.length + ". Got " + compressedLength);
                }
                blob = uncompressed;
            }
            Slime slime = BinaryFormat.decode(blob);
            try {
                new JsonFormat(true).encode(System.out, slime);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
This is used for testing and benchmarking rpc docsum interface.
time vespa-summary-benchmark file-containing-docids connectionspec summary-class repetitions threads
fx ' time vespa-summary-benchmark feed.xml tcp/localhost:19115 keyvaluesummary 10000 32'

@author baldersheim
vespaclient-java/src/main/java/com/yahoo/vespasummarybenchmark/VespaSummaryBenchmark.java