I want to take data from an IP packet which is a byte array and split it into a collection of byte arrays that start with 0x47 i.e. mpeg-2 transport packets.
For example the original byte array looks like this:
08 FF FF 47 FF FF FF 47 FF FF 47 FF 47 FF FF FF FF 47 FF FF
How would you split the byte array on 0x47 and retain the deliminator 0x47 so it looks like this? In order words an array of byte arrays that start on a particular hexadecimal?
[0] 08 FF FF
[1] 47 FF FF FF
[2] 47 FF FF
[3] 47 FF
[4] 47 FF FF FF FF
[5] 47 FF FF