GRPC Core 0.10.0.0

- Main Page
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros | Functions
varint.h File Reference
`#include <grpc/support/port_platform.h>`

Go to the source code of this file.

## Macros
#define | GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits) ((1 << (8 - (prefix_bits))) - 1)
#define | GRPC_CHTTP2_VARINT_LENGTH(n, prefix_bits)
#define | GRPC_CHTTP2_WRITE_VARINT(n, prefix_bits, prefix_or, target, length)

## Functions
int | grpc_chttp2_hpack_varint_length (gpr_uint32 tail_value)
void | grpc_chttp2_hpack_write_varint_tail (gpr_uint32 tail_value, gpr_uint8 *target, int tail_length)

## Macro Definition Documentation

#define GRPC_CHTTP2_MAX_IN_PREFIX | ( |  | prefix_bits | ) | ((1 << (8 - (prefix_bits))) - 1)

#define GRPC_CHTTP2_VARINT_LENGTH | ( |  | n,
|  |  | prefix_bits
| ) |  |

Value:
((n) < GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits) \
? 1 \
: grpc_chttp2_hpack_varint_length( \
(n)-GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits)))
GRPC_CHTTP2_MAX_IN_PREFIX
#define GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits)
Definition: varint.h:52
grpc_chttp2_hpack_varint_length
int grpc_chttp2_hpack_varint_length(gpr_uint32 tail_value)
Definition: varint.c:36

#define GRPC_CHTTP2_WRITE_VARINT | ( |  | n,
|  |  | prefix_bits,
|  |  | prefix_or,
|  |  | target,
|  |  | length
| ) |  |

Value:
do { \
gpr_uint8* tgt = target; \
if ((length) == 1) { \
(tgt)[0] = (prefix_or) | (n); \
} else { \
(tgt)[0] = (prefix_or) | GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits); \
grpc_chttp2_hpack_write_varint_tail( \
(n)-GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits), (tgt) + 1, (length)-1); \
} \
} while (0)
GRPC_CHTTP2_MAX_IN_PREFIX
#define GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits)
Definition: varint.h:52
gpr_uint8
uint8_t gpr_uint8
Definition: port_platform.h:307
grpc_chttp2_hpack_write_varint_tail
void grpc_chttp2_hpack_write_varint_tail(gpr_uint32 tail_value, gpr_uint8 *target, int tail_length)
Definition: varint.c:50

## Function Documentation

int grpc_chttp2_hpack_varint_length | ( | gpr_uint32 | tail_value | ) |

void grpc_chttp2_hpack_write_varint_tail | ( | gpr_uint32 | tail_value,
|  | gpr_uint8 * | target,
|  | int | tail_length
| ) |  |