How to Open file which length is 2^32 bytes
-
I tries to open file big than 2^32 bytes. it's not working because it pass the maximum addressing in the memory and it stucks the computer. is there a solution for that problem?????? X|
-
I tries to open file big than 2^32 bytes. it's not working because it pass the maximum addressing in the memory and it stucks the computer. is there a solution for that problem?????? X|
There should be no problem opening the file. Are you saying that you are trying to read the entire file into memory? If so, then the solution is simple: Don't. Just read the part of the file that you are currently working with.
--- single minded; short sighted; long gone;
-
I tries to open file big than 2^32 bytes. it's not working because it pass the maximum addressing in the memory and it stucks the computer. is there a solution for that problem?????? X|
>4GB?? You're never going to read the entire file into memory. You have to process it piece by piece.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
I tries to open file big than 2^32 bytes. it's not working because it pass the maximum addressing in the memory and it stucks the computer. is there a solution for that problem?????? X|
As long as you're running NTFS, you should be able to open the file. You can't read it all into memory, of course; that's what FileStream [^]is for: read in small chunks at a time.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Master's Decree: It's By My Spirit (audio) The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
I tries to open file big than 2^32 bytes. it's not working because it pass the maximum addressing in the memory and it stucks the computer. is there a solution for that problem?????? X|
computer cannot run this line if i try to open file bigger than 4GB fs = File.OpenRead(path) but the question, how can i open it in pieces?:confused: