Binary pattern matching when input is a stream

@NobbZ,
How would you do that with binary as the input?