C# Array Subset fetching

后端 未结 3 1754
清酒与你
清酒与你 2021-01-23 00:30

I have an array of bytes and i want to determine if the contents of this array of bytes exists within another larger array as a continuous sequence. What is the simplest way to

3条回答
  •  孤城傲影
    2021-01-23 00:38

    Try to adapt some string search algorithm. One of the fastest is Boyer-Moore . It's quite easy as well. For binary data, Knuth-Morris-Pratt algorithm might work very efficiently as well.

提交回复
热议问题