GRPC C++  1.39.1
algorithm_metadata.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2015 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_CORE_LIB_COMPRESSION_ALGORITHM_METADATA_H
20 #define GRPC_CORE_LIB_COMPRESSION_ALGORITHM_METADATA_H
21 
23 
24 #include <grpc/compression.h>
27 
30  grpc_compression_algorithm algorithm);
31 
35  const grpc_slice& str);
36 
39  grpc_compression_algorithm algorithm);
40 
45 
50 
55 
59  const grpc_slice& str);
60 
61 #endif /* GRPC_CORE_LIB_COMPRESSION_ALGORITHM_METADATA_H */
grpc_mdelem grpc_compression_encoding_mdelem(grpc_compression_algorithm algorithm)
Return compression algorithm based metadata element.
Definition: compression.cc:168
grpc_mdelem grpc_message_compression_encoding_mdelem(grpc_message_compression_algorithm algorithm)
Return message compression algorithm based metadata element (grpc-encoding: xxx)
Definition: compression_internal.cc:60
grpc_stream_compression_algorithm grpc_stream_compression_algorithm_from_slice(const grpc_slice &str)
Find stream compression algorithm based on passed in mdstr - returns GRPC_STREAM_COMPRESS_ALGORITHM_C...
Definition: compression_internal.cc:49
grpc_mdelem grpc_stream_compression_encoding_mdelem(grpc_stream_compression_algorithm algorithm)
Return stream compression algorithm based metadata element (content-encoding: xxx)
Definition: compression_internal.cc:75
grpc_slice grpc_compression_algorithm_slice(grpc_compression_algorithm algorithm)
Return compression algorithm based metadata value.
Definition: compression.cc:134
grpc_message_compression_algorithm grpc_message_compression_algorithm_from_slice(const grpc_slice &str)
Find compression algorithm based on passed in mdstr - returns GRPC_COMPRESS_ALGORITHM_COUNT on failur...
Definition: compression_internal.cc:36
grpc_compression_algorithm grpc_compression_algorithm_from_slice(const grpc_slice &str)
Find compression algorithm based on passed in mdstr - returns GRPC_COMPRESS_ALGORITHM_COUNT on failur...
Definition: compression.cc:151
grpc_message_compression_algorithm
Definition: compression_internal.h:33
grpc_stream_compression_algorithm
Stream compression algorithms supported by gRPC.
Definition: compression_internal.h:42
grpc_compression_algorithm
The various compression algorithms supported by gRPC (not sorted by compression level)
Definition: compression_types.h:57
Definition: metadata.h:98
A grpc_slice s, if initialized, represents the byte range s.bytes[0..s.length-1].
Definition: slice.h:60