Forum: Object-Pascal / Delphi-Language
Delphi
by WojTec,
19. Sep 2013
Wow, I didn't know about Boyer-Moore and Aho-Corasick, but as I see I go in right direction, because what I tried to do was similar to BM :-D
Do you know some? I found for strings, but as I understand is applicable for any data where need to find sequence.
For performance?
Forum: Object-Pascal / Delphi-Language
Delphi
by WojTec,
19. Sep 2013
Ok, I wrote this and don't know how implement your description :(
type
TOffsets = array of Cardinal;
function OffsetsLookup(const AStream: TStream; const APattern: TBytes): TOffsets; overload;
var
Memory: TMemoryStream;
Buffer: Byte;
Offset: Cardinal;
Forum: Object-Pascal / Delphi-Language
Delphi
by WojTec,
19. Sep 2013
Hello, today I have a bit more advanced problem. I need (1) search stream for specified bytes sequence and (2) do it fast. I've no idea how to do it. Please F1.