[racket-dev] random-access file reading

From: Andreas Rottmann (a.rottmann at gmx.at)
Date: Tue Sep 28 18:04:20 EDT 2010

John Clements <clements at brinckerhoff.org> writes:

> I want to read a chunk from the middle of a 50-megabyte file.  As far
> as I can see, there are no random-access file primitives currently in
> DrRacket.  Also, I don't see a "skip-bytes", so it looks like I should
> be allocating a junk buffer and then repeatedly calling read-bytes to
> read the skipped portion into the junk buffer.
>
> Tell me if there's a simpler way to do this; doc pointers always appreciated.
>
http://docs.racket-lang.org/reference/port-buffers.html?q=binary-input-p#%28def._%28%28quote._~23~25kernel%29._file-position%29%29

I think this should do the job.

Cheers, Rotty
-- 
Andreas Rottmann -- <http://rotty.yi.org/>


Posted on the dev mailing list.