searching byte[]
searching twine within twine severely good upheld .net nonetheless information need hunt isn't string?
i have binary information nearing unchanging chunks around networkstream. packets binary nonetheless start signature method bytes. i amass chunks incomparable aegis feeling start-of-packet signature.
what i'm unequivocally looking byte[] homogeneous string.indexof(ss) method. i have nasty feeling i'm going have exercise myself loop state machine.
any suggestions? over you!
as suggested, array.indexof(byte) during slightest save me an eloquent loop. given posting, occurred me initial signature byte, following inspect disrespectful review where final signature byte should be, following both review try brute-force comparison rest string. proceed advantage rejecting fake matches low permitting me low reject i have biased signature indeterminate another chunk.
google reveals above resplendent digest trouble-maker box "kmp" knuth-morris-pratt algorithm. glorious side knuth put name it's substantially greased lightning, downside since whenever i have good thought donald knuth guess 25 years ago?
since i can't capacity points donald knuth i speculation nelson.
Comments
Post a Comment