Writes the content of the buffer into the buffer of the stream.
If the capacity of the current _Buffer is exceeded, a new buffer is aquired from the BufferProvider. The new buffer has at least a size of (Capacity + count)*2. The obsolete old buffer is recycled by the BufferProvider if its capacity exceeds the MinimumRequiredSize
If you know how big the stream will grow in advance, it's a good idea to call SetLength before writing to the stream. Otherwise, a great deal of memory might be wasted because the size of the underlying buffer must be increased several times.
SmartMemoryStream Class | InfiniTec.SystemUtilities Namespace