I'm looking for an elegant way to scan a ruby File containing binary data for a regular expression.
To be clear, my hangup is not confusion about applying regexes to binary. It's just that because the file is binary, I'd like to avoid gets and readline. And I'd like to avoid reading the entire file at once.
Is there a function in the ruby core that will do this? Or do I need to build and manage my own buffer?