title: Protobuf checksum (crc)
body: <p>I am going to store some big objects into database (BLOB). And protobuf is, as I see it, one of the best candidates to serialize/deserialize BLOB. Despite it has binary format, it is still easy to read and to change its content (strings, integers, etc). So I need some kind of data validation, whenever its <em>original</em> BLOB or modified (by hacker? by too smart user?).</p>
  
  <p>One possibility would be to have a dedicated field in the table, call it <code>crc</code>, calculate checksum of BLOB an put it there. But it would be much better (in many scenarios), when crc is a part of BLOB itself.</p>
  
  <p>I can add <em>extra</em> bytes to the end of protobuf stream, but I will have to <em>delete</em> them (or deserializer will throw exception "invalid field blablabla").</p>
  
  <p>I can put protobuf stream into a wrapper, but it is again overhead to unwrap/wrap.</p>
  
  <p>Is there an easy and <em>cheap</em> way to add something to the end of protobuf stream to avoid needs of additional operations during deserialization? In XML, I could add comment. I don't think there is a comment in protobuf, but how to put CRC which will be 1 or 2 bytes to example?</p>