d2195e15b89fe9face5eb71340acd288148f25e8 |
|
18-Jun-2015 |
Daniel Weis <dweis@google.com> |
Update CodedOutputByteBufferNano to properly handle a malformed surrogate pair with a buffer too small to output a potentially well formed surrogate pair. This behavior mimics that of the ByteBuffer based methods. Change-Id: Ic8aa9c6c11c2f4eb3e9bb20f83a22e5ab72a3e76
/external/protobuf/java/src/main/java/com/google/protobuf/nano/CodedOutputByteBufferNano.java
|
4f87f0d25b75e045f55cc09c8a9085c1cd7cb238 |
|
08-May-2015 |
Jeff Davidson <jpd@google.com> |
Add a flag to use offset/length with byte arrays. This is an advanced option that most users won't want/need. However, it can greatly optimize flows where we want to reuse byte[] buffers from other locations without having to first copy the contents into a new array of the exact correct size. Bug: 20636336 Change-Id: Ia8d0af82e952858f9571f84110da621da776619c
/external/protobuf/java/src/main/java/com/google/protobuf/nano/CodedOutputByteBufferNano.java
|
b6872c8af4117d0e78967e8cced7214a8ac34e2d |
|
08-May-2015 |
Jeff Davidson <jpd@google.com> |
Speed up little endian int/long writes. Bug: 20636336 Change-Id: I303d712967f9885f7c3082d00f961f8ab93a6aed
/external/protobuf/java/src/main/java/com/google/protobuf/nano/CodedOutputByteBufferNano.java
|
ebfc42610b47af51de7ce9eacc65960a80c6d490 |
|
21-Apr-2015 |
Charles Munger <clm@google.com> |
Throw OutOfSpaceException instead of IllegalArgumentException. When a MessageNano containing a String is serialized into a buffer that is too small to contain it, and the buffer's boundary happens to be where the string field's length delimiting varint is serialized, and the string's length and 3*length have the same length when encoded as a varint, an IllegalArgumentException is thrown rather than an OutOfSpaceException. Github issue: https://github.com/google/protobuf/issues/292 Change-Id: If478d68cf15bfd0662252d008e42b2bf1ff1c75e
/external/protobuf/java/src/main/java/com/google/protobuf/nano/CodedOutputByteBufferNano.java
|
173957cc7c87dec3bf849fc1756a2ee1f22dcd5f |
|
17-Feb-2015 |
Shai Barack <shayba@google.com> |
Add reset() and position() to CodedOutputByteBufferNano. Change-Id: Ie2a9e36276ac35e10b3f8d379b5742d50a0374e9
/external/protobuf/java/src/main/java/com/google/protobuf/nano/CodedOutputByteBufferNano.java
|
bcf7a816ad9d435cd4562bdc722fd01100a918d7 |
|
29-Dec-2014 |
Charles Munger <clm@google.com> |
Optimize measurement and serialization of nano protos. Measuring the serialized size of nano protos is now a zero-alloc operation, and serializing a proto now allocates no memory (other than the output buffer) instead of O(total length of strings). Change-Id: Id5e2ac3bdc4ac56c0bf13d725472da3a00c9baec Signed-off-by: Charles Munger <clm@google.com>
/external/protobuf/java/src/main/java/com/google/protobuf/nano/CodedOutputByteBufferNano.java
|
382ddccb550e1c822ef26a0e65988998f7446624 |
|
20-Nov-2013 |
Max Cai <maxtroy@google.com> |
Extension overhaul. - Get rid of TypeLiteral<T>. It was introduced to read the component type of a List<T> at runtime. But we use arrays everywhere else, and we can always read the component type of an array type at runtime. - Properly read/write "minor" types (e.g. sint32, sfixed32). The old implementation could only read/write data as the "typical" types (one per Java type), e.g. java.lang.Integer -> int32, java.lang.Long -> int64. So if e.g. an extension specifies sfixed32 as the type, it would be read/written in the totally incompatible int32 format. - Properly serialize repeated packed fields. The old implementation doesn't do packed serialization. As an added bonus, and to be more aligned with the rest of protobuf nano / main, repeated packable extensions can deserialize both packed and non-packed data. - Split Extension class into a hierarchy so under typical usage a large chunk of code dealing with primitive type extensions can be removed by ProGuard. Bug: https://code.google.com/p/android/issues/detail?id=62586 Change-Id: I0d692f35cc2a8ad3a5a1cb3ce001282b2356b041
/external/protobuf/java/src/main/java/com/google/protobuf/nano/CodedOutputByteBufferNano.java
|
64d8d8f89050c5ada85341f967af391f4716a7cb |
|
15-Mar-2013 |
Ulas Kirazci <ulas@google.com> |
Nano protobufs. Like micro protobufs except: - No setter/getter/hazzer functions. - Has state is not available. Outputs all fields != their default. - CodedInputStream can only take byte[] (not InputStream). - Repeated fields are in arrays, not ArrayList or Vector. - Unset messages/groups are null, not "defaultInstance()". - Required fields are always serialized. To use: - Link libprotobuf-java-2.3.0-nano runtime. - Use LOCAL_PROTOC_OPTIMIZE_TYPE := nano Change-Id: I7429015b3c5f7f38b7be01eb2d4927f7a9999c80
/external/protobuf/java/src/main/java/com/google/protobuf/nano/CodedOutputByteBufferNano.java
|