aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/dispatch/rpc/CompressPayload.java
blob: 786b804edaa4f485cebb45681d9934968b53c637 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.search.dispatch.rpc;

import com.yahoo.compress.Compressor;
import com.yahoo.search.Query;

/**
 * Interface for compressing and decompressing request/response
 *
 * @author baldersheim
 */
public interface CompressPayload {
    Compressor.Compression compress(Query query, byte[] payload);
    byte[] decompress(Client.ProtobufResponse response);
}