From: Robert Klemme Date: 2006-03-30T01:53:42+09:00 Subject: Re: reading/writing binary problem Daniel Harple wrote: > On Mar 29, 2006, at 6:31 PM, ara.t.howard@noaa.gov wrote: > >> open(path){|f| f.seek(13312); f.read(1024*1024*2)} > > If you are using Windows don't forget to open it in binary mode: > > open(..., 'rb') ... In fact I recommend to use that switch regardless of OS used: it's more portable and also serves as documentation hint that the file is actually binary. Kind regards robert