Comment #8 on issue 374 by Add method in ByteString to avoid big buffer copy.

Another approach that is not without merit is to represent the ByteString internally as a java.nio.ByteBuffer (which in a lot of ways is probably a better choice that ByteString anyway), which provides an asReadOnlyBuffer() method that is pretty efficient. There are a number of additional copy reduction benefits that might stem from this, as there are methods for doing I/O with ByteBuffer's that avoid additional copies.

You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:

You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To post to this group, send email to
Visit this group at
For more options, visit

Reply via email to