mirror of https://github.com/grpc/grpc-java.git
Enables a codepath for zero-copy protobuf deserialization. Two new InputStream extension interfaces are added: - HasByteBuffer: allows access to the underlying buffers containing inbound bytes directly without copying - Detachable: allows customer marshaller to keep the buffers around until the application code is done with using the protobuf messages Applications can implement a custom marshaller that takes over the ownership of ByteBuffers and wrap them into ByteStrings with protobuf's UnsafeByteOperations support. Then a RopeByteString, which is a in-place composite of ByteStrings can be created. This enables using the zero-copy codepath (requires immutable ByteBuffer indication) of CodedInputStream for deserialization. |
||
|---|---|---|
| .. | ||
| src | ||
| BUILD.bazel | ||
| build.gradle | ||