From: Robert Klemme Date: 2008-02-28T07:20:02+09:00 Subject: Re: extracting hex keys from file On 27.02.2008 23:15, Robert Klemme wrote: > > Please do not top post. > > On 27.02.2008 22:34, Ben Aroia wrote: >> I've read that. > > So what did you mean by "from a known offset" and "accelerating the > pointer a bit with a simple loop"? > >> I'm looking for an f.gethex (returns a string with "F4" or something) >> I could even deal with converting the f.getc value to a hex value (in >> a string format) I'm considering writing a giant if statement (but my >> fingers are starting to hurt) > > What do you need that for? Are you looking for > http://ruby-doc.org/core/classes/Fixnum.html#M001069 ? PS: there's also String#unpack.