Re: Reading a binary file
- Posted by Bernie <xotron at PCOM.NET> Aug 16, 2000
- 440 views
On Wed, 16 Aug 2000 16:50:51 -0400, Brian Broker <bkb at CNW.COM> wrote: >In the example for 'get_bytes', it shows how to read a binary file 100 >bytes at a time and when then length of the returned sequence is less than >100, the end of the file has been reached: > >while 1 do > chunk = get_bytes(fn, 100) -- read 100 bytes at a time > whole_file &= chunk -- chunk might be empty, that's ok > if length(chunk) < 100 then > exit > end if >end while > >Is there an easier/faster way to read in a binary file to a sequence in one >shot? > Brian: DOSWRAP.E by Jacques Deschenes has a disk BLOCKREAD function. Bernie