title: Why does CodedInputStream set stream position to end?
body: <p>I'm using protocol buffers 3 in c#. I'm trying to bounce through a stream to find the start locations of each message, without actually Deserialising the messages. All messages are written to the stream with <code>WriteDelimitedTo</code>. </p>
  
  <p>I then use this code to try to jump from length markers: </p>
  
  <pre><code>_map = new List&lt;int&gt;();
  _stream.Seek(0, SeekOrigin.Begin);
  
  var codedStream = new CodedInputStream(_stream);
  
  while (_stream.Position &lt; _stream.Length)
  {
      var length = codedStream.ReadInt32();
  
      _map.Add((int) _stream.Position);
  
      _stream.Seek(length, SeekOrigin.Current);
  }
  </code></pre>
  
  <p>However, the moment I do <code>codedStream.ReadInt32()</code> the stream position is set to the end, rather than just the next byte after the varint32. </p>