Hello everyone,
I've attempted to use ifstream to open and read a 20GB file but failed to do so (it takes a very very very long period of time...). So, I need find a fast way to open and read a 20GB .txt file in C++. Thank you!
Tygawr
-12
Newbie Poster
Recommended Answers
Jump to PostIs the file arranged in lines with either a linefeed or a CR/LF delimiter?
20GB (text)? Are you looking for something particular in the file?
Jump to PostOK, to access (let's say) the first three pages would be very quick.
After that, you can seek to the next page group and read in enough pages to allow the user to scroll back and forth with minimal disk hits.If you divide the entire thing into (segments …
All 8 Replies
thines01
401
Postaholic
Team Colleague
Featured Poster
Tygawr
-12
Newbie Poster
thines01
401
Postaholic
Team Colleague
Featured Poster
Tygawr
-12
Newbie Poster
thines01
401
Postaholic
Team Colleague
Featured Poster
thines01
401
Postaholic
Team Colleague
Featured Poster
thines01
401
Postaholic
Team Colleague
Featured Poster
Tygawr
-12
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.