GRPC Core  0.10.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros | Enumerations | Functions
compression.h File Reference

Go to the source code of this file.

Macros

#define GRPC_COMPRESSION_ALGORITHM_ARG   "grpc.compression_algorithm"
 To be used in channel arguments. More...
 

Enumerations

enum  grpc_compression_algorithm { GRPC_COMPRESS_NONE = 0, GRPC_COMPRESS_DEFLATE, GRPC_COMPRESS_GZIP, GRPC_COMPRESS_ALGORITHMS_COUNT }
 
enum  grpc_compression_level {
  GRPC_COMPRESS_LEVEL_NONE = 0, GRPC_COMPRESS_LEVEL_LOW, GRPC_COMPRESS_LEVEL_MED, GRPC_COMPRESS_LEVEL_HIGH,
  GRPC_COMPRESS_LEVEL_COUNT
}
 

Functions

int grpc_compression_algorithm_parse (const char *name, grpc_compression_algorithm *algorithm)
 Parses name as a grpc_compression_algorithm instance, updating algorithm. More...
 
int grpc_compression_algorithm_name (grpc_compression_algorithm algorithm, char **name)
 Updates name with the encoding name corresponding to a valid algorithm. More...
 
grpc_compression_level grpc_compression_level_for_algorithm (grpc_compression_algorithm algorithm)
 Returns the compression level corresponding to algorithm. More...
 
grpc_compression_algorithm grpc_compression_algorithm_for_level (grpc_compression_level level)
 Returns the compression algorithm corresponding to level. More...
 

Macro Definition Documentation

#define GRPC_COMPRESSION_ALGORITHM_ARG   "grpc.compression_algorithm"

To be used in channel arguments.

Enumeration Type Documentation

Enumerator
GRPC_COMPRESS_NONE 
GRPC_COMPRESS_DEFLATE 
GRPC_COMPRESS_GZIP 
GRPC_COMPRESS_ALGORITHMS_COUNT 
Enumerator
GRPC_COMPRESS_LEVEL_NONE 
GRPC_COMPRESS_LEVEL_LOW 
GRPC_COMPRESS_LEVEL_MED 
GRPC_COMPRESS_LEVEL_HIGH 
GRPC_COMPRESS_LEVEL_COUNT 

Function Documentation

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 .

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.

int grpc_compression_algorithm_parse ( const char *  name,
grpc_compression_algorithm algorithm 
)

Parses name as a grpc_compression_algorithm instance, updating algorithm.

Returns 1 upon success, 0 otherwise.

grpc_compression_level grpc_compression_level_for_algorithm ( grpc_compression_algorithm  algorithm)

Returns the compression level corresponding to algorithm.

It abort()s for unknown algorithms.