¡@

Home 

c# Programming Glossary: bytesequence.length

Best way to find position in the Stream where given byte sequence starts

http://stackoverflow.com/questions/1471975/best-way-to-find-position-in-the-stream-where-given-byte-sequence-starts

long FindPosition Stream stream byte byteSequence if byteSequence.Length stream.Length return 1 byte buffer new byte byteSequence.Length.. stream.Length return 1 byte buffer new byte byteSequence.Length using BufferedStream bufStream new BufferedStream stream byteSequence.Length.. using BufferedStream bufStream new BufferedStream stream byteSequence.Length int i while i bufStream.Read buffer 0 byteSequence.Length byteSequence.Length..