I have a binary file containing multiple UDP packets received from a server. Each UDP packet starts with 0xAAAA and ends with 0xD6D6 (start marker and end marker). I read the file and store it in a NumPy array. Now I have to split that into multiple smaller arrays corresponding to individual packets.
I tried np.array_split, but it gives n chunks of the same size. However, what I need is to get it split at every 0xD6D6 and 0xAAAA points.