ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
My program needs to handle very large binary files (bigger than 4GB), and I can't find a way to open those files for reading / writing on my old 32bit laptop.
when trying to use FILE* h=fopen64(filename, "rb"), i get only 4 bytes pointer.
it there some sort of FILE64*, or a way to overcome this issues on 32 bits machines?
My program needs to handle very large binary files (bigger than 4GB), and I can't find a way to open those files for reading / writing on my old 32bit laptop.
when trying to use FILE* h=fopen64(filename, "rb"), i get only 4 bytes pointer.
it there some sort of FILE64*, or a way to overcome this issues on 32 bits machines?
I'm fighting a fire with pressure at 4 gals / second. I've changed my pressure gauge to 8 gals / second. Why didn't I get a new hose?
analogy aside, the file pointer is just a descriptor that carries stream information. The thing that overcomes the 32-bit limitation is buried deep within the read/seek/write api that is used with that file descriptor (I think there are separate fread64 and fwrite64 functions that exist, but I could be wrong here).
isn't fread64() more efficient then fgetc() for reading more than one character?
i need to read only portion of files. with performance as top priority, is there any more efficient way then using fopen64, fsetpos64/fseek, fread64/memcpy, fclose sequences?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.