i just played around a little bit... it's small it's simple
it's unoptimized and ugly it's me being bored again...
Posted on 2002-03-19 06:06:36 by mob
What exactly does:

mov al,4 ;there are more than 3 chars
add esi,4

While I was messing around, I changed both to 0 and nothing changed :)

Maybe I'll sit down and really look at it, but I'd thought I'd ask first

Posted on 2002-03-19 23:51:47 by Sliver
say we've got "AAAABB" and want to compress this string....
a compressed pattern has 3 chars in lenght (seperator|len|char)
so compressing a pattern of chars makes only sense if there
are more than 3 equal chars in a row... that is also the reason
i fill up a full dword and check if the four bytes are equal to
eachother... if thats the case the routine should start counting
how many bytes we got and i start with 4 (mov al,4) coz we
already know that there's a dword waiting to be compressed.
so if you change al (char-count) and esi (the source-string index)
to zero nothing will happen except 4 senseless do-nothing loops.
oh, the compressed result of the string above will look like
0FFh,004h,061h,062h,062h ; |4ABB
Posted on 2002-03-20 03:56:31 by mob