GRPC Core
0.13.1-pre1
|
#include <stdlib.h>
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/impl/codegen/compression_types.h>
Go to the source code of this file.
GRPCAPI grpc_compression_algorithm grpc_compression_algorithm_for_level | ( | grpc_compression_level | level | ) |
Returns the compression algorithm corresponding to level.
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.
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.