Move To Front Encode by clock

x=*48..57
x=[C]|x while$><<x.index(C=+getc)

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top