aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc/compression.h
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2015-06-15 18:08:13 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2015-06-15 18:09:46 -0700
commite29feb2adb26b0d2b8707f95af01a082d742d241 (patch)
tree3992967853a4ed2a994bfa867032843bc9326aca /include/grpc/compression.h
parent0d6cf992e8f840ae257c039f15fc045e9605090f (diff)
Introduced compression levels as an abstraction for the actual algorithm.
Diffstat (limited to 'include/grpc/compression.h')
-rw-r--r--include/grpc/compression.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/grpc/compression.h b/include/grpc/compression.h
index 630fa1656a..207898f605 100644
--- a/include/grpc/compression.h
+++ b/include/grpc/compression.h
@@ -34,6 +34,9 @@
#ifndef GRPC_COMPRESSION_H
#define GRPC_COMPRESSION_H
+/** To be used in channel arguments */
+#define GRPC_COMPRESSION_LEVEL_ARG "grpc.compression_level"
+
/* The various compression algorithms supported by GRPC */
typedef enum {
GRPC_COMPRESS_NONE = 0,
@@ -43,7 +46,17 @@ typedef enum {
GRPC_COMPRESS_ALGORITHMS_COUNT
} grpc_compression_algorithm;
+typedef enum {
+ GRPC_COMPRESS_LEVEL_NONE = 0,
+ GRPC_COMPRESS_LEVEL_LOW,
+ GRPC_COMPRESS_LEVEL_MED,
+ GRPC_COMPRESS_LEVEL_HIGH
+} grpc_compression_level;
+
const char *grpc_compression_algorithm_name(
grpc_compression_algorithm algorithm);
+grpc_compression_algorithm grpc_compression_algorithm_for_level(
+ grpc_compression_level level);
+
#endif /* GRPC_COMPRESSION_H */