Re: Searching in byte buffer
- From: Jatin <TripleDerby100-ng@xxxxxxxxx>
- Date: Mon, 31 Oct 2005 16:52:31 GMT
Bruce Roberts wrote:
Very true, however, if one is searching large buffers or many buffers for the same byte-string, this cost is minimal. Especially when one considers that the algorithm allows one to do a search without examining every byte in each buffer.
Although the OP didn't indicate the nature of the byte-strings being sought, if the situation was one in which every incoming buffer had to be searched for an occurrence of an invariant pattern the setup cost, IIRC, is only paid at startup and not for each search. If there are multiple patterns that have to be identified, a state machine might be a better choice.
I am searching relatively small buffers of byte data retrieved from soundcard. The information searched for is textual (not multi-bute characters) which is fed into the sound card through LINE-IN port, from a Ham radio receiver.
Jatin ============= .
- Follow-Ups:
- Re: Searching in byte buffer
- From: Bruce Roberts
- Re: Searching in byte buffer
- References:
- Searching in byte buffer
- From: Jatin
- Re: Searching in byte buffer
- From: Bruce Roberts
- Re: Searching in byte buffer
- From: J French
- Re: Searching in byte buffer
- From: Bruce Roberts
- Searching in byte buffer
- Prev by Date: Re: Searching in byte buffer
- Next by Date: Re: Searching in byte buffer
- Previous by thread: Re: Searching in byte buffer
- Next by thread: Re: Searching in byte buffer
- Index(es):