GRPC Core
43.0.0
|
#include <stdlib.h>
#include <grpc/impl/compression_types.h>
#include <grpc/slice.h>
#include <grpc/support/port_platform.h>
Go to the source code of this file.
Functions | |
GRPCAPI int | grpc_compression_algorithm_is_message (grpc_compression_algorithm algorithm) |
Return if an algorithm is message compression algorithm. More... | |
GRPCAPI int | grpc_compression_algorithm_is_stream (grpc_compression_algorithm algorithm) |
Return if an algorithm is stream compression algorithm. More... | |
GRPCAPI int | grpc_compression_algorithm_parse (grpc_slice name, grpc_compression_algorithm *algorithm) |
Parses the slice as a grpc_compression_algorithm instance and updating algorithm. More... | |
GRPCAPI int | grpc_compression_algorithm_name (grpc_compression_algorithm algorithm, const char **name) |
Updates name with the encoding name corresponding to a valid algorithm. More... | |
GRPCAPI grpc_compression_algorithm | grpc_compression_algorithm_for_level (grpc_compression_level level, uint32_t accepted_encodings) |
Returns the compression algorithm corresponding to level for the compression algorithms encoded in the accepted_encodings bitset. More... | |
GRPCAPI void | grpc_compression_options_init (grpc_compression_options *opts) |
GRPCAPI void | grpc_compression_options_enable_algorithm (grpc_compression_options *opts, grpc_compression_algorithm algorithm) |
Mark algorithm as enabled in opts. More... | |
GRPCAPI void | grpc_compression_options_disable_algorithm (grpc_compression_options *opts, grpc_compression_algorithm algorithm) |
Mark algorithm as disabled in opts. More... | |
GRPCAPI int | grpc_compression_options_is_algorithm_enabled (const grpc_compression_options *opts, grpc_compression_algorithm algorithm) |
Returns true if algorithm is marked as enabled in opts. More... | |
GRPCAPI grpc_compression_algorithm grpc_compression_algorithm_for_level | ( | grpc_compression_level | level, |
uint32_t | accepted_encodings | ||
) |
Returns the compression algorithm corresponding to level for the compression algorithms encoded in the accepted_encodings bitset.
GRPCAPI int grpc_compression_algorithm_is_message | ( | grpc_compression_algorithm | algorithm | ) |
Return if an algorithm is message compression algorithm.
GRPCAPI int grpc_compression_algorithm_is_stream | ( | grpc_compression_algorithm | algorithm | ) |
Return if an algorithm is stream compression algorithm.
GRPCAPI int grpc_compression_algorithm_name | ( | grpc_compression_algorithm | algorithm, |
const char ** | name | ||
) |
Updates name with the encoding name corresponding to a valid algorithm.
Note that name is statically allocated and must not be freed. Returns 1 upon success, 0 otherwise.
GRPCAPI int grpc_compression_algorithm_parse | ( | grpc_slice | name, |
grpc_compression_algorithm * | algorithm | ||
) |
Parses the slice as a grpc_compression_algorithm instance and updating algorithm.
Returns 1 upon success, 0 otherwise.
GRPCAPI void grpc_compression_options_disable_algorithm | ( | grpc_compression_options * | opts, |
grpc_compression_algorithm | algorithm | ||
) |
Mark algorithm as disabled in opts.
GRPCAPI void grpc_compression_options_enable_algorithm | ( | grpc_compression_options * | opts, |
grpc_compression_algorithm | algorithm | ||
) |
Mark algorithm as enabled in opts.
GRPCAPI void grpc_compression_options_init | ( | grpc_compression_options * | opts | ) |
GRPCAPI int grpc_compression_options_is_algorithm_enabled | ( | const grpc_compression_options * | opts, |
grpc_compression_algorithm | algorithm | ||
) |
Returns true if algorithm is marked as enabled in opts.