Update memory_stream