GRPC C++  1.39.1
Functions
compression_args.h File Reference
#include <grpc/support/port_platform.h>
#include <grpc/compression.h>
#include <grpc/impl/codegen/grpc_types.h>

Go to the source code of this file.

Functions

grpc_compression_algorithm grpc_channel_args_get_channel_default_compression_algorithm (const grpc_channel_args *a)
 Returns the compression algorithm set in a. More...
 
grpc_channel_argsgrpc_channel_args_set_channel_default_compression_algorithm (grpc_channel_args *a, grpc_compression_algorithm algorithm)
 Returns a channel arg instance with compression enabled. More...
 
grpc_channel_argsgrpc_channel_args_compression_algorithm_set_state (grpc_channel_args **a, grpc_compression_algorithm algorithm, int state)
 Sets the support for the given compression algorithm. More...
 
uint32_t grpc_channel_args_compression_algorithm_get_states (const grpc_channel_args *a)
 Returns the bitset representing the support state (true for enabled, false for disabled) for compression algorithms. More...
 

Function Documentation

◆ grpc_channel_args_compression_algorithm_get_states()

uint32_t grpc_channel_args_compression_algorithm_get_states ( const grpc_channel_args a)

Returns the bitset representing the support state (true for enabled, false for disabled) for compression algorithms.

The i-th bit of the returned bitset corresponds to the i-th entry in the grpc_compression_algorithm enum.

◆ grpc_channel_args_compression_algorithm_set_state()

grpc_channel_args* grpc_channel_args_compression_algorithm_set_state ( grpc_channel_args **  a,
grpc_compression_algorithm  algorithm,
int  state 
)

Sets the support for the given compression algorithm.

By default, all compression algorithms are enabled. It's an error to disable an algorithm set by grpc_channel_args_set_compression_algorithm.

Returns an instance with the updated algorithm states. The a pointer is modified to point to the returned instance (which may be different from the input value of a).

◆ grpc_channel_args_get_channel_default_compression_algorithm()

grpc_compression_algorithm grpc_channel_args_get_channel_default_compression_algorithm ( const grpc_channel_args a)

Returns the compression algorithm set in a.

◆ grpc_channel_args_set_channel_default_compression_algorithm()

grpc_channel_args* grpc_channel_args_set_channel_default_compression_algorithm ( grpc_channel_args a,
grpc_compression_algorithm  algorithm 
)

Returns a channel arg instance with compression enabled.

If a is non-NULL, its args are copied. N.B. GRPC_COMPRESS_NONE disables compression for the channel.