Macros | Functions | Variables
bin_decoder.cc File Reference
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/bin_decoder.h"
#include "absl/base/attributes.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include "src/core/lib/slice/slice_refcount.h"
Include dependency graph for bin_decoder.cc:

Go to the source code of this file.

Macros

#define COMPOSE_OUTPUT_BYTE_0(input_ptr)
 
#define COMPOSE_OUTPUT_BYTE_1(input_ptr)
 
#define COMPOSE_OUTPUT_BYTE_2(input_ptr)   (uint8_t)((decode_table[(input_ptr)[2]] << 6) | decode_table[(input_ptr)[3]])
 

Functions

bool grpc_base64_decode_partial (struct grpc_base64_decode_context *ctx)
 
grpc_slice grpc_chttp2_base64_decode (const grpc_slice &input)
 
grpc_slice grpc_chttp2_base64_decode_with_length (const grpc_slice &input, size_t output_length)
 
size_t grpc_chttp2_base64_infer_length_after_decode (const grpc_slice &slice)
 
static bool input_is_valid (const uint8_t *input_ptr, size_t length)
 

Variables

static uint8_t decode_table []
 
static const uint8_t tail_xtra [4] = {0, 0, 1, 2}
 

Macro Definition Documentation

◆ COMPOSE_OUTPUT_BYTE_0

#define COMPOSE_OUTPUT_BYTE_0 (   input_ptr)
Value:
(uint8_t)((decode_table[(input_ptr)[0]] << 2) | \
(decode_table[(input_ptr)[1]] >> 4))

Definition at line 71 of file bin_decoder.cc.

◆ COMPOSE_OUTPUT_BYTE_1

#define COMPOSE_OUTPUT_BYTE_1 (   input_ptr)
Value:
(uint8_t)((decode_table[(input_ptr)[1]] << 4) | \
(decode_table[(input_ptr)[2]] >> 2))

Definition at line 75 of file bin_decoder.cc.

◆ COMPOSE_OUTPUT_BYTE_2

#define COMPOSE_OUTPUT_BYTE_2 (   input_ptr)    (uint8_t)((decode_table[(input_ptr)[2]] << 6) | decode_table[(input_ptr)[3]])

Definition at line 79 of file bin_decoder.cc.

Function Documentation

◆ grpc_base64_decode_partial()

bool grpc_base64_decode_partial ( struct grpc_base64_decode_context ctx)

Definition at line 108 of file bin_decoder.cc.

◆ grpc_chttp2_base64_decode()

grpc_slice grpc_chttp2_base64_decode ( const grpc_slice input)

Definition at line 163 of file bin_decoder.cc.

◆ grpc_chttp2_base64_decode_with_length()

grpc_slice grpc_chttp2_base64_decode_with_length ( const grpc_slice input,
size_t  output_length 
)

Definition at line 207 of file bin_decoder.cc.

◆ grpc_chttp2_base64_infer_length_after_decode()

size_t grpc_chttp2_base64_infer_length_after_decode ( const grpc_slice slice)

Definition at line 85 of file bin_decoder.cc.

◆ input_is_valid()

static bool input_is_valid ( const uint8_t input_ptr,
size_t  length 
)
static

Definition at line 56 of file bin_decoder.cc.

Variable Documentation

◆ decode_table

uint8_t decode_table[]
static
Initial value:
= {
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 62, 0x40, 0x40, 0x40, 63,
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0, 1, 2, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
49, 50, 51, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40}

Definition at line 30 of file bin_decoder.cc.

◆ tail_xtra

const uint8_t tail_xtra[4] = {0, 0, 1, 2}
static

Definition at line 54 of file bin_decoder.cc.

uint8_t
unsigned char uint8_t
Definition: stdint-msvc2008.h:78
decode_table
static uint8_t decode_table[]
Definition: bin_decoder.cc:30


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:04