GRPC C++  1.62.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 
46 #define GRPC_COMPRESSION_CHANNEL_DEFAULT_LEVEL "grpc.default_compression_level"
47 
54 #define GRPC_COMPRESSION_CHANNEL_ENABLED_ALGORITHMS_BITSET \
55  "grpc.compression_enabled_algorithms_bitset"
56 
60 typedef enum {
64  /* TODO(ctiller): snappy */
67 
72 typedef enum {
79 
80 typedef struct grpc_compression_options {
85 
92  int is_set;
94  } default_level;
95 
100  int is_set;
104 
105 #ifdef __cplusplus
106 }
107 #endif
108 
109 #endif /* GRPC_IMPL_COMPRESSION_TYPES_H */
GRPC_COMPRESS_LEVEL_MED
@ GRPC_COMPRESS_LEVEL_MED
Definition: compression_types.h:75
GRPC_COMPRESS_DEFLATE
@ GRPC_COMPRESS_DEFLATE
Definition: compression_types.h:62
grpc_compression_options::enabled_algorithms_bitset
uint32_t enabled_algorithms_bitset
All algs are enabled by default.
Definition: compression_types.h:84
grpc_compression_algorithm
grpc_compression_algorithm
The various compression algorithms supported by gRPC (not sorted by compression level)
Definition: compression_types.h:60
grpc_compression_options::grpc_compression_options_default_level::is_set
int is_set
Definition: compression_types.h:92
grpc_compression_options::grpc_compression_options_default_level::level
grpc_compression_level level
Definition: compression_types.h:93
grpc_compression_options
struct grpc_compression_options grpc_compression_options
grpc_compression_options
Definition: compression_types.h:80
GRPC_COMPRESS_LEVEL_COUNT
@ GRPC_COMPRESS_LEVEL_COUNT
Definition: compression_types.h:77
GRPC_COMPRESS_NONE
@ GRPC_COMPRESS_NONE
Definition: compression_types.h:61
grpc_compression_options::grpc_compression_options_default_algorithm
The default message compression algorithm.
Definition: compression_types.h:99
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:73
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:76
GRPC_COMPRESS_LEVEL_LOW
@ GRPC_COMPRESS_LEVEL_LOW
Definition: compression_types.h:74
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:72
GRPC_COMPRESS_ALGORITHMS_COUNT
@ GRPC_COMPRESS_ALGORITHMS_COUNT
Definition: compression_types.h:65
grpc_compression_options::grpc_compression_options_default_algorithm::is_set
int is_set
Definition: compression_types.h:100
GRPC_COMPRESS_GZIP
@ GRPC_COMPRESS_GZIP
Definition: compression_types.h:63
grpc_compression_options::grpc_compression_options_default_level
The default compression level.
Definition: compression_types.h:91
grpc_compression_options::grpc_compression_options_default_algorithm::algorithm
grpc_compression_algorithm algorithm
Definition: compression_types.h:101
port_platform.h