FileSerializer.SerializeWithLengthPrefix<T> Method
You can use this method to write an object as protocol-buffer representation.
You had to store the FileHeader somewhere to guarantee the backward compatibility when reading.
The opening and the closing of the stream is delegated to you.