Searching a byte array for a pattern of bytes

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I am reading a binary file into a one dimensional byte array. Now I need to search that array for a pattern of bytes.
In other words, this is the equivilent of String.IndexOf()
I want to search the binary array and return the index of the subvalue that I searched for.
For whatever reason, Im having trouble wrapping my head around this. Can anyone give me an example of how to achieve this?

View the full article
 
Back
Top