34 #ifndef GRPC_BYTE_BUFFER_H
35 #define GRPC_BYTE_BUFFER_H
GRPCAPI void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader *reader)
Cleanup and destroy reader.
GRPCAPI grpc_byte_buffer * grpc_raw_byte_buffer_create(grpc_slice *slices, size_t nslices)
Returns a RAW byte buffer instance over the given slices (up to nslices).
GRPCAPI grpc_byte_buffer * grpc_byte_buffer_copy(grpc_byte_buffer *bb)
Copies input byte buffer bb.
Definition: grpc_types.h:55
GRPCAPI size_t grpc_byte_buffer_length(grpc_byte_buffer *bb)
Returns the size of the given byte buffer, in bytes.
GRPCAPI int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader *reader, grpc_slice *slice)
Updates slice with the next piece of data from from reader and returns.
GRPCAPI int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader, grpc_byte_buffer *buffer)
Initialize reader to read over buffer.
GRPCAPI void grpc_byte_buffer_destroy(grpc_byte_buffer *byte_buffer)
Destroys byte_buffer deallocating all its memory.
grpc_compression_algorithm
Definition: compression_types.h:72
GRPCAPI grpc_byte_buffer * grpc_raw_byte_buffer_from_reader(grpc_byte_buffer_reader *reader)
Returns a RAW byte buffer instance from the output of reader.
Definition: byte_buffer_reader.h:43
GRPCAPI grpc_slice grpc_byte_buffer_reader_readall(grpc_byte_buffer_reader *reader)
Merge all data from reader into single slice.
GRPCAPI grpc_byte_buffer * grpc_raw_compressed_byte_buffer_create(grpc_slice *slices, size_t nslices, grpc_compression_algorithm compression)
Returns a compressed RAW byte buffer instance over the given slices (up to nslices).