I don't understand what the problem is.
The code:
FileStream fs = File.OpenWrite("blah.dat");
fs.Write(ms.GetBuffer(), 0, ms.Position);
fs.Close();
Is pretty damn fast, and short. Any write-based optimizations will be taken
care of by the FileStream implementation and shouldn't be something you have
to worry about.
I think, from a design point of view, it would be wrong to have a SaveToFile
function in the MemoryStream object. The purpose of the MemoryStream is just
that, to provide a stream interface onto a block of memory. The FileStream
writes to files, and so it makes sense to use a FileStream to dump out the
internal buffer of the MemoryStream (which is what GetBuffer() provides) to
a file.