[Tutor] Read-ahead for large fixed-width binary files?
Alan Gauld
alan.gauld at btinternet.com
Sat Nov 17 01:36:27 CET 2007
"Marc Tompkins" <marc.tompkins at gmail.com> wrote
> realized I can implement this myself, using 'read(bigsize)' -
> currently I'm using 'read(recordsize)'; I just need to add an extra
> loop around my record reads. Please disregard...
If you just want to navigate to a specific record then it might be
easier to use seek(), that will save you having to read all the
previous records into memory.
HTH,
--
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld
More information about the Tutor
mailing list