Protobuf streaming (lazy serialization) API
We have an Android app that uses Protocol Buffers to store application data. The data format (roughly) is a single protobuf ("container") that contains a list of protobufs ("items") as a repeated field: message Container { repeated Item item = 1; } When we want to save a change to an item, we must recreate the protobuf container, add all the items to it, then serialize it and write it to a file. The problem with this a approach is it potentially triples the memory used when saving because the data has to first be copied from the model class to the protobuf builder and then to a byte array when