title: Android and Protocol Buffers
body: <p>I am writing an Android application that would both store data and communicate with a server using protocol buffers. However, the <a href="http://code.google.com/apis/protocolbuffers/" rel="nofollow noreferrer">stock implementation</a> of protocol buffers compiled with the LITE flag (in both the JAR library and the generated .java files) has an overhead of ~30 KB, where the program itself is only ~30 KB. In other words, protocol buffers doubled the program size.</p>
  
  <p>Searching online, I found a <a href="http://groups.google.com/group/android-developers/browse_thread/thread/c7b68765a02f74df/978cd88517a5fc25?#978cd88517a5fc25" rel="nofollow noreferrer">reference</a> to an <a href="http://android.git.kernel.org/?p=platform/external/protobuf.git;a=tree;f=src/com/google/common/io/protocol;h=44814a7cc40a99cf6a866e219793976de8f283a7;hb=HEAD" rel="nofollow noreferrer">Android specific implementation</a>. Unfortunately, there seems to be no documentation for it, and the code generated from the standard .proto file is incompatible with it. Has anyone used it? How do I generate code from a .proto file for this implementation? Are there any other lightweight alternatives?</p>