Binary pattern matching when input is a stream

Might need more of an example of what you are wanting to do, like pseudo-code or something?

You should be able to just parse it out as normal though. And how large are they?