Searching in byte buffer



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.

Is there a Delphi function that I can use? I found StrUtils.SearchBuf(), but it operates on strings.

Jatin
==================
.



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: why I can not write to the file after initialize the MFC in a service program
    ... you check EVERY return from a call that can fail, ... Why do you need an intermedate buffer to write literal strings anyway? ... For example, if AfxWinInit fails, you copy a 45-character string into a ... So you are going to try to initialize MFC EACH TIME THROUGH THE LOOP? ...
    (microsoft.public.vc.mfc)