tech explanation of replied post
The RLE string looks something like this: "70b5a3b"
the decoding function then goes through the string, character by character. If it's a number, it needs to increment it's count, if it sees a letter, it will expand it to current count times that letter. I can either directly draw current count pixels, or store the result as an expanded string with lots of a's and b's, and draw it after the decode.
The RLE implementation I found online keeps the count as a string like this:
count = ''
if current is a number:
count += current number (concatinate as a string)
else:
parse count as an integer
I did a more efficient implementation with just arithmetic, because strings are expensive.
if current is a number:
count = count*10 + current number
as seen from the speedtest, this is quite a bit faster