aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc/compression.h
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2015-06-08 20:07:39 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2015-06-08 20:11:30 -0700
commitca281377c066c2efe61c708a316f80ff7c586a0f (patch)
tree14c1a950abcb82e3577f4ad2a7ef2a6e62b9ab54 /include/grpc/compression.h
parent59f905d79a109644a0d1f3ec73f34cbae65448fc (diff)
parentfebf3b0803f7d6e73c0e70eea1445be6cd8d73c1 (diff)
Added missing compression.h file.
Diffstat (limited to 'include/grpc/compression.h')
-rw-r--r--include/grpc/compression.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/include/grpc/compression.h b/include/grpc/compression.h
new file mode 100644
index 0000000000..630fa1656a
--- /dev/null
+++ b/include/grpc/compression.h
@@ -0,0 +1,49 @@
+/*
+ *
+ * Copyright 2015, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef GRPC_COMPRESSION_H
+#define GRPC_COMPRESSION_H
+
+/* The various compression algorithms supported by GRPC */
+typedef enum {
+ GRPC_COMPRESS_NONE = 0,
+ GRPC_COMPRESS_DEFLATE,
+ GRPC_COMPRESS_GZIP,
+ /* TODO(ctiller): snappy */
+ GRPC_COMPRESS_ALGORITHMS_COUNT
+} grpc_compression_algorithm;
+
+const char *grpc_compression_algorithm_name(
+ grpc_compression_algorithm algorithm);
+
+#endif /* GRPC_COMPRESSION_H */