Memory Stream With Large Files

zeinab mokdad

Member
Joined
Dec 23, 2021
Messages
13
Programming Experience
5-10
Dears,
Is there any way to put a large file into a memory stream with file with size > 1 GB.
knowing thar Read(byte[] buffer , int offset, int count) does not work in large files.
 

Skydiver

Staff member
Joined
Apr 6, 2019
Messages
5,251
Location
Chesapeake, VA
Programming Experience
10+
You could use a memory mapped file.

I think you need to step back first. Why do you need all of the contents of a file in memory? What processing are you doing on the file that large that you need the entire file in memory?
 
Top Bottom