Replying to:HTV04
Wait, so is this 2 to 1 CHR compression? 12Me21 made a much smaller function for this:
2 to 1:
T$ = CHR$(ASC("A")+(ASC("B")<<8))1 to 2:
X = ASC("?") A$ = CHR$(X AND 255) B$ = CHR$(X>>8)I suppose you could adapt your functions to feed every two characters into these and make your code a lot smaller.
My code works with exactly the same principles. All it does extra is wrap the character code values to the range of 0-255 and store a length char to work on strings with odd-numbered length.
(Actually, now that I think about it, all I really need to store is the string_len mod 2. That would work for a string of any size.)