title: Search for multi-byte pattern in Uint8Array
body: <p>I have a nodejs script where I'd like to parse MP3 frames. Those frames are easy to detect since each frame starts with the two bytes <code>0xff 0xfb</code>.</p>
  
  <p>I'm using a <code>Uint8Array</code> to access the bytes of that file. Using <code>[].indexOf.call(data, 0xff)</code> I can easily search for a single byte but not for two bytes. Obviously I could check the second byte manually but I wonder if there's a clean way to get the index of a certain byte sequence.</p>