I am Reading a binary file into memory and I need that data through the whole execution. However, I am getting an error that the datastream was too long. Any idea how to solve this issue? I have compiled the application as a x64 application. I need the whole the data in memory due to the fact that the binary file consists of data and pointers. The pointer could point out data, through the whole file. Using pointers instead of store data several times will save discspace.
try
{
using (FileStream fileStream = File.OpenRead(args[0]))
{
MemoryStream memoryStream = new MemoryStream();
fileStream.CopyTo(memoryStream);
memoryStream.Seek(0, SeekOrigin.Begin);