I need to be able to parse a binary file with Ruby. This file contains chunks of data that are found via a header that includes the file offset and length of each chunk.
How do I get the data out correctly? I've been unable so far to seek around in the file based on the offsets I read out since they come out in strings that I don't know how to convert to a format IO#seek understands.
Any help? A general way to convert the offset and length into something usable (like an integer or something) would be helpful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With