Hello all,

I am trying to do some stream parsing, in where I would like to be able to parse HTTP headers, but this question i guess is more in general.

The parsing at least is time critical, so I want the fastest way to do this. String comparison is always a nasty thing. What would be i.e. the fastest way, to find the end of the HTTP header section (the empty CRLF line).

I guess, I could do it, by searching for the CRLF in the data stream part I just read. Or I could use a regular expression. QRegExp probably uses string comparison, as QByteArray may compare by byte values, which would be faster??

Or any other ideas? Has someone encountered this problem before and can give me some heads up on what would be the best solution here?

Thanks