title: Raw proto representation of protobuf-net (De)SerializeWithLengthPrefix
body: <p>First of all, this is NOT a duplicate of <a href="https://stackoverflow.com/questions/1468589/c-equivalent-to-serializewithlengthprefix">this</a> other question so please read my question fully before flagging it.</p>
  
  <p>I need to write out raw proto files that match up with C# (de)serialized messages read and written using Serializer.NonGeneric.(De)Serialize. I currently use PrefixStyle.Base128 and would like to continue doing so (unless using PrefixStyle.Fixed32 is the only way forward).</p>
  
  <p>For example, given a message:</p>
  
  <pre><code>message KeyValuePair {
     optional string Key = 1;
     optional string Value = 2 [default = ""];
  }
  </code></pre>
  
  <p>According to <a href="https://groups.google.com/forum/#!topic/protobuf/MlUMUPp5WDc" rel="nofollow noreferrer">this</a> Google groups thread, @marc-gravell says "<em>...SerializeWithLengthPrefix method, by default, aims to represent data in a way that is a valid protobuf stream - in particular, as though it were simply a member of a parent object or list...</em>"</p>
  
  <p>What would the "<em>parent object or list</em>" look like in a raw proto definition when serialized using </p>
  
  <pre><code>Serializer.NonGeneric.SerializeWithLengthPrefix(&lt;stream&gt;, new KeyValuePair { Name = "foo", Value = "Bar" }, PrefixStyle.Base128, &lt;unique_message_id&gt;)
  </code></pre>
  
  <p>?</p>
  
  <p>Thanks in advance for any help!</p>