GRPC Core  43.0.0
Functions
compression.h File Reference
#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...
 

Function Documentation

◆ grpc_compression_algorithm_for_level()

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.

◆ grpc_compression_algorithm_is_message()

GRPCAPI int grpc_compression_algorithm_is_message ( grpc_compression_algorithm  algorithm)

Return if an algorithm is message compression algorithm.

◆ grpc_compression_algorithm_is_stream()

GRPCAPI int grpc_compression_algorithm_is_stream ( grpc_compression_algorithm  algorithm)

Return if an algorithm is stream compression algorithm.

◆ grpc_compression_algorithm_name()

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.

◆ grpc_compression_algorithm_parse()

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.

◆ grpc_compression_options_disable_algorithm()

GRPCAPI void grpc_compression_options_disable_algorithm ( grpc_compression_options opts,
grpc_compression_algorithm  algorithm 
)

Mark algorithm as disabled in opts.

◆ grpc_compression_options_enable_algorithm()

GRPCAPI void grpc_compression_options_enable_algorithm ( grpc_compression_options opts,
grpc_compression_algorithm  algorithm 
)

Mark algorithm as enabled in opts.

◆ grpc_compression_options_init()

GRPCAPI void grpc_compression_options_init ( grpc_compression_options opts)

◆ grpc_compression_options_is_algorithm_enabled()

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.