File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,10 @@ const Identity = "identity"
38
38
39
39
// Compressor is used for compressing and decompressing when sending or
40
40
// receiving messages.
41
+ //
42
+ // If a Compressor implements `DecompressedSize(compressedBytes []byte) int`,
43
+ // gRPC will invoke it to determine the size of the buffer allocated for the
44
+ // result of decompression. A return value of -1 indicates unknown size.
41
45
type Compressor interface {
42
46
// Compress writes the data written to wc to w after compressing it. If an
43
47
// error occurs while initializing the compressor, that error is returned
@@ -51,15 +55,6 @@ type Compressor interface {
51
55
// coding header. The result must be static; the result cannot change
52
56
// between calls.
53
57
Name () string
54
- // If a Compressor implements
55
- // DecompressedSize(compressedBytes []byte) int, gRPC will call it
56
- // to determine the size of the buffer allocated for the result of decompression.
57
- // Return -1 to indicate unknown size.
58
- //
59
- // Experimental
60
- //
61
- // Notice: This API is EXPERIMENTAL and may be changed or removed in a
62
- // later release.
63
58
}
64
59
65
60
var registeredCompressor = make (map [string ]Compressor )
You can’t perform that action at this time.
0 commit comments