GRPC C++  1.26.0
compression_types.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2016 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #ifndef GRPC_IMPL_CODEGEN_COMPRESSION_TYPES_H
20 #define GRPC_IMPL_CODEGEN_COMPRESSION_TYPES_H
21 
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
30 #define GRPC_COMPRESSION_REQUEST_ALGORITHM_MD_KEY \
31  "grpc-internal-encoding-request"
32 
39 #define GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM \
40  "grpc.default_compression_algorithm"
41 
43 #define GRPC_COMPRESSION_CHANNEL_DEFAULT_LEVEL "grpc.default_compression_level"
44 
51 #define GRPC_COMPRESSION_CHANNEL_ENABLED_ALGORITHMS_BITSET \
52  "grpc.compression_enabled_algorithms_bitset"
53 
57 typedef enum {
61  /* EXPERIMENTAL: Stream compression is currently experimental. */
63  /* TODO(ctiller): snappy */
66 
71 typedef enum {
78 
79 typedef struct grpc_compression_options {
84 
91  int is_set;
92  grpc_compression_level level;
93  } default_level;
94 
99  int is_set;
100  grpc_compression_algorithm algorithm;
103 
104 #ifdef __cplusplus
105 }
106 #endif
107 
108 #endif /* GRPC_IMPL_CODEGEN_COMPRESSION_TYPES_H */
grpc_compression_algorithm algorithm
Definition: compression_types.h:100
uint32_t enabled_algorithms_bitset
All algs are enabled by default.
Definition: compression_types.h:83
The default compression level.
Definition: compression_types.h:90
Definition: compression_types.h:79
struct grpc_compression_options::grpc_compression_options_default_algorithm default_algorithm
Definition: compression_types.h:73
struct grpc_compression_options grpc_compression_options
Definition: compression_types.h:60
grpc_compression_level
Compression levels allow a party with knowledge of its peer's accepted encodings to request compressi...
Definition: compression_types.h:71
grpc_compression_level level
Definition: compression_types.h:92
Definition: compression_types.h:64
Definition: compression_types.h:58
grpc_compression_algorithm
The various compression algorithms supported by gRPC (not sorted by compression level) ...
Definition: compression_types.h:57
Definition: compression_types.h:59
Definition: compression_types.h:76
struct grpc_compression_options::grpc_compression_options_default_level default_level
Definition: compression_types.h:72
Definition: compression_types.h:75
Definition: compression_types.h:74
Definition: compression_types.h:62
The default message compression algorithm.
Definition: compression_types.h:98