GRPC C++  1.73.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_COMPRESSION_TYPES_H
20 #define GRPC_IMPL_COMPRESSION_TYPES_H
21 
22 // IWYU pragma: private, include <grpc/compression.h>
23 // IWYU pragma: friend "src/.*"
24 
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
33 #define GRPC_COMPRESSION_REQUEST_ALGORITHM_MD_KEY \
34  "grpc-internal-encoding-request"
35 
42 #define GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM \
43  "grpc.default_compression_algorithm"
44 
47 #define GRPC_COMPRESSION_CHANNEL_DEFAULT_LEVEL "grpc.default_compression_level"
48 
55 #define GRPC_COMPRESSION_CHANNEL_ENABLED_ALGORITHMS_BITSET \
56  "grpc.compression_enabled_algorithms_bitset"
57 
61 typedef enum {
65  /* TODO(ctiller): snappy */
68 
73 typedef enum {
80 
81 typedef struct grpc_compression_options {
86 
93  int is_set;
95  } default_level;
96 
101  int is_set;
105 
106 #ifdef __cplusplus
107 }
108 #endif
109 
110 #endif /* GRPC_IMPL_COMPRESSION_TYPES_H */
GRPC_COMPRESS_LEVEL_MED
@ GRPC_COMPRESS_LEVEL_MED
Definition: compression_types.h:76
GRPC_COMPRESS_DEFLATE
@ GRPC_COMPRESS_DEFLATE
Definition: compression_types.h:63
grpc_compression_options::enabled_algorithms_bitset
uint32_t enabled_algorithms_bitset
All algs are enabled by default.
Definition: compression_types.h:85
grpc_compression_algorithm
grpc_compression_algorithm
The various compression algorithms supported by gRPC (not sorted by compression level)
Definition: compression_types.h:61
grpc_compression_options::grpc_compression_options_default_level::is_set
int is_set
Definition: compression_types.h:93
grpc_compression_options::grpc_compression_options_default_level::level
grpc_compression_level level
Definition: compression_types.h:94
grpc_compression_options
struct grpc_compression_options grpc_compression_options
grpc_compression_options
Definition: compression_types.h:81
GRPC_COMPRESS_LEVEL_COUNT
@ GRPC_COMPRESS_LEVEL_COUNT
Definition: compression_types.h:78
GRPC_COMPRESS_NONE
@ GRPC_COMPRESS_NONE
Definition: compression_types.h:62
grpc_compression_options::grpc_compression_options_default_algorithm
The default message compression algorithm.
Definition: compression_types.h:100
grpc_compression_options::default_level
struct grpc_compression_options::grpc_compression_options_default_level default_level
GRPC_COMPRESS_LEVEL_NONE
@ GRPC_COMPRESS_LEVEL_NONE
Definition: compression_types.h:74
grpc_compression_options::default_algorithm
struct grpc_compression_options::grpc_compression_options_default_algorithm default_algorithm
GRPC_COMPRESS_LEVEL_HIGH
@ GRPC_COMPRESS_LEVEL_HIGH
Definition: compression_types.h:77
GRPC_COMPRESS_LEVEL_LOW
@ GRPC_COMPRESS_LEVEL_LOW
Definition: compression_types.h:75
grpc_compression_level
grpc_compression_level
Compression levels allow a party with knowledge of its peer's accepted encodings to request compressi...
Definition: compression_types.h:73
GRPC_COMPRESS_ALGORITHMS_COUNT
@ GRPC_COMPRESS_ALGORITHMS_COUNT
Definition: compression_types.h:66
grpc_compression_options::grpc_compression_options_default_algorithm::is_set
int is_set
Definition: compression_types.h:101
GRPC_COMPRESS_GZIP
@ GRPC_COMPRESS_GZIP
Definition: compression_types.h:64
grpc_compression_options::grpc_compression_options_default_level
The default compression level.
Definition: compression_types.h:92
grpc_compression_options::grpc_compression_options_default_algorithm::algorithm
grpc_compression_algorithm algorithm
Definition: compression_types.h:102
port_platform.h