GRPC Core
1.0.0
|
#include <stdlib.h>
#include <grpc/impl/codegen/compression_types.h>
#include <grpc/impl/codegen/port_platform.h>
Go to the source code of this file.
Functions | |
GRPCAPI int | grpc_compression_algorithm_parse (const char *name, size_t name_length, grpc_compression_algorithm *algorithm) |
Parses the first name_length bytes of name as a grpc_compression_algorithm instance, updating algorithm. More... | |
GRPCAPI int | grpc_compression_algorithm_name (grpc_compression_algorithm algorithm, 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.
It abort()s for unknown levels .
GRPCAPI int grpc_compression_algorithm_name | ( | grpc_compression_algorithm | algorithm, |
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 | ( | const char * | name, |
size_t | name_length, | ||
grpc_compression_algorithm * | algorithm | ||
) |
Parses the first name_length bytes of name as a grpc_compression_algorithm instance, 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.