title: Fast approach to read and parse serial-data continuously
body: <p>I've got a thread to read and parse serial data.
  The messages are in binary format and start with either the character 'F', 'S', 'Q' or 'M'.
  There are no newlines and there is no special ending character (the characters above state that a message is finished and everything before it is ready to be parsed).</p>
  
  <p>How do I continuously read and parse the data?</p>
  
  <p>All that comes to my mind is having a 4096 byte long input buffer (byte array) and then follow this procedure: </p>
  
  <ul>
  <li>Track the position in the buffer manually</li>
  <li>append available data to it via <code>SerialPort.Read(buffer, position, byteCount)</code> </li>
  <li>try to parse as many messages as possible from the buffer</li>
  <li>copy the rest to a temporary buffer</li>
  <li>reset the input buffer</li>
  <li>copy the contents of the temporary buffer to the original buffer</li>
  <li>set the position in the buffer</li>
  </ul>
  
  <p><strong>Can you think of faster / easier approaches?</strong></p>