MemoryStream extensions implemented