Skip to content
Snippets Groups Projects
Commit 5aada71f authored by Makarand Dharmapurikar's avatar Makarand Dharmapurikar
Browse files

Added a comment

parent d99a925d
No related branches found
No related tags found
No related merge requests found
...@@ -43,6 +43,7 @@ static void MallocAndCopyByteBufferToCharArray(grpc_byte_buffer *buffer, ...@@ -43,6 +43,7 @@ static void MallocAndCopyByteBufferToCharArray(grpc_byte_buffer *buffer,
size_t *length, char **array) { size_t *length, char **array) {
grpc_byte_buffer_reader reader; grpc_byte_buffer_reader reader;
grpc_byte_buffer_reader_init(&reader, buffer); grpc_byte_buffer_reader_init(&reader, buffer);
// The slice contains uncompressed data even if compressed data was received
gpr_slice slice = grpc_byte_buffer_reader_readall(&reader); gpr_slice slice = grpc_byte_buffer_reader_readall(&reader);
size_t uncompressed_length = GPR_SLICE_LENGTH(slice); size_t uncompressed_length = GPR_SLICE_LENGTH(slice);
char *result = malloc(uncompressed_length); char *result = malloc(uncompressed_length);
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment