From: ChrisH Date: 2006-07-19T00:15:10+09:00 Subject: Re: How can I parse binary files? Fabio Vitale wrote: ... > This now generates: > > >ruby b.rb > # last_write_counter=9872, unused=""> > # filename="\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\r\nmd5", > flags=48, uid=808464432, msg_size=942814256, date=1936535094> > # filename="g\000\000\000\000\000\00006\020\000\000\374P\000\000k\353\246Cmd5", > flags=48, uid=808464432, msg_size=858993712, date=1936535091> > # msg_size=858993712, date=1936535092> ... Looks like you need to investigate #unpack. In any case, Ruby Facets has a BinaryReader mixin (http://facets.rubyforge.org/api/more/classes/BinaryReader.html) that does the reading and upacking for you. Just mix it into File (or a subclass of File) and you should be good to go... Cheers Chris