Re: Searching in byte buffer
- From: erewhon@xxxxxxxxxx (J French)
- Date: Sat, 29 Oct 2005 06:54:09 +0000 (UTC)
On Fri, 28 Oct 2005 10:35:57 -0400, "Bruce Roberts"
<dontsendtober@xxxxxxxxxxxxxxxxxxxx> wrote:
>
>"Jatin" <TripleDerby100-ng@xxxxxxxxx> wrote in message
>news:Yrh8f.8786$tV6.5427@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>>I want to search a byte buffer for certain pattern of bytes. It is similar
>>to searching for a substring within a string, however I want to perform
>>search on a byte buffer (array) for series of bytes. Also, it needs to be
>>a fast search, as search is performed on bytes retrieved from soundcard
>>buffer.
>I suspect that the Boyer-Moore algorithm might prove useful. While its
>always talked about in terms of textual searches there is no reason, AFAIK,
>that a variant couldn't be used for general buffer searches.
True - in fact there are a few wrinkles
A text search is not strictly speaking a byte search, because of those
confounded MBCS 'things', which is why it is always wise digging down
into the library to see whether ASCIIZ string routines are used or an
API ANSI comparison routine.
The other wrinkle is that Boyers-Moore is good for repeated search for
the same thing, but because it has considerably more 'setup' it might
not be quicker for non-repetitive searches.
.
- 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
- Searching in byte buffer
- Prev by Date: Re: Dang 'em Rags
- Next by Date: Re: Version after Version
- Previous by thread: Re: Searching in byte buffer
- Next by thread: Re: Searching in byte buffer
- Index(es):
Relevant Pages
|