I have a binary file, inside of which has multiple frames. Each frame starts with FF FF FF followed by random data of varying length. For example:
FF FF FF XX XX XX XX ......... FF FF FF XX XX XX XX XX XX ......... FF FF FF XX XX XX .... FF FF FF XX XX XX XX XX XX XX XX XX ........
It's safe to assume that FF FF FF will only appear in the frame header and not as part of the random data.
I'm looking for a way of parsing this binary file and extracting each frame into an array using ruby.
Can anyone help?