Re: Searching in byte buffer




"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.


.



Relevant Pages

  • Re: Discovering variable types...
    ... >- but I suppose MS expect us to use wrappers ... memory allocations for your variables from disk as well. ... >They most certainly are of fixed size, changing the size of a String ... >>me to keep buffer size and current postion right in the memory block. ...
    (comp.lang.pascal.delphi.misc)
  • Re: Secure C library
    ... I read much of the new "security TR", and gee, I don't know. ... the buffer from the buffer size. ... It is not hard to design a better form of buffer and string handling. ... but this is just one example of how thoughtful interface design can ...
    (comp.std.c)
  • Re: regular expression reverse match?
    ... > determines if the buffer is acceptable against a pattern as the string ... > added to the buffer as long as it's within the pattern. ... least on reachable end-state. ...
    (comp.lang.python)
  • Re: Secure C library
    ... >> string functions don't make much sense once you add bounds-checking ... >> designing an interface just for the purpose of reducing the frequency ... > make buffer size decisions more visible, ... Bstrlib is also very interoperable with char *'s, ...
    (comp.std.c)
  • Re: Calling dll functions from vb.net with pointer returns!
    ... (ByRef pulLen As Integer, ByVal pszFilter As String, ByVal ulFlags As ... OUT PTCHAR Buffer, ... Address of a buffer to receive a set of NULL-terminated device instance ... pszFilter must specify the name of a device ...
    (microsoft.public.dotnet.languages.vb)