The trySingleSlice method to get the reference of the underlying buffer from grpc::ByteBuffer expects the ByteBuffer to be made of single uncompressed slice. The buffer we get from grpc server does not guarantee that. The only other option is to use dump method which copies the buffer.
The trySingleSlice method to get the reference of the underlying buffer from grpc::ByteBuffer expects the ByteBuffer to be made of single uncompressed slice. The buffer we get from grpc server does not guarantee that. The only other option is to use dump method which copies the buffer.