Go to the documentation of this file.
34 #define OUTPUT_BLOCK_SIZE 1024
38 int (*flate)(
z_stream* zs,
int flush)) {
43 const uInt uint_max = ~static_cast<uInt>(0);
101 size_t count_before =
output->count;
102 size_t length_before =
output->length;
103 memset(&zs, 0,
sizeof(zs));
111 for (
i = count_before;
i <
output->count;
i++) {
114 output->count = count_before;
115 output->length = length_before;
126 size_t count_before =
output->count;
127 size_t length_before =
output->length;
128 memset(&zs, 0,
sizeof(zs));
135 for (
i = count_before;
i <
output->count;
i++) {
138 output->count = count_before;
139 output->length = length_before;
147 for (
i = 0;
i <
input->count;
i++) {
int ZEXPORT inflateEnd(z_streamp strm)
static int zlib_decompress(grpc_slice_buffer *input, grpc_slice_buffer *output, int gzip)
#define Z_DEFAULT_COMPRESSION
const grpc_slice & grpc_slice_ref_internal(const grpc_slice &slice)
int ZEXPORT inflate(z_streamp strm, int flush)
return memset(p, 0, total)
static int zlib_body(z_stream *zs, grpc_slice_buffer *input, grpc_slice_buffer *output, int(*flate)(z_stream *zs, int flush))
static int copy(grpc_slice_buffer *input, grpc_slice_buffer *output)
grpc_compression_algorithm
unsigned char outbuf[SIZE]
int grpc_msg_compress(grpc_compression_algorithm algorithm, grpc_slice_buffer *input, grpc_slice_buffer *output)
GPRAPI void gpr_free(void *ptr)
#define GRPC_SLICE_MALLOC(len)
#define OUTPUT_BLOCK_SIZE
static int zlib_compress(grpc_slice_buffer *input, grpc_slice_buffer *output, int gzip)
GPRAPI void * gpr_malloc(size_t size)
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
#define GRPC_SLICE_START_PTR(slice)
int grpc_msg_decompress(grpc_compression_algorithm algorithm, grpc_slice_buffer *input, grpc_slice_buffer *output)
int ZEXPORT deflateEnd(z_streamp strm)
#define GRPC_SLICE_LENGTH(slice)
static void * zalloc_gpr(void *, unsigned int items, unsigned int size)
GPRAPI void grpc_slice_buffer_add(grpc_slice_buffer *sb, grpc_slice slice)
@ GRPC_COMPRESS_ALGORITHMS_COUNT
int ZEXPORT deflate(z_streamp strm, int flush)
static void zfree_gpr(void *, void *address)
static int compress_inner(grpc_compression_algorithm algorithm, grpc_slice_buffer *input, grpc_slice_buffer *output)
#define deflateInit2(strm, level, method, windowBits, memLevel, strategy)
#define inflateInit2(strm, windowBits)
void grpc_slice_unref_internal(const grpc_slice &slice)
GPRAPI size_t grpc_slice_buffer_add_indexed(grpc_slice_buffer *sb, grpc_slice slice)
#define Z_DEFAULT_STRATEGY
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:00:37