alias urlencode {
bread "c:\binary.junk" 0 102400 &bin
var %start = $ctime, %i = 1, %temp
while (%i <= 102400) {
var %t = $replace($+(.,$bvar(&bin,%i,225),.),$chr(32),.,.9.,.09.,.8.,.08.,.7.,.07.,.6.,.06.,.5.,.05.,.4.,.04.,.3.,.03.,.2.,.02.,.1.,.01.,.0.,.00.)
var %t = $replacex(%t,.,-,255,FF,254,FE,253,FD,252,FC,251,FB,250,FA,249,F9,248,F8,247,F7,246,F6,245,F5,244,F4,243,F3,242,F2,241,F1,240,F0,239,EF,238,EE,237,ED,236,EC,235,EB,234,EA,233,E9,232,E8,231,E7,230,E6,229,E5,228,E4,227,E3,226,E2,225,E1,224,E0,223,DF,222,DE,221,DD,220,DC,219,DB,218,DA,217,D9,216,D8,215,D7,214,D6,213,D5,212,D4,211,D3,210,D2,209,D1,208,D0,207,CF,206,CE,205,CD,204,CC,203,CB,202,CA,201,C9,200,C8,199,C7,198,C6,197,C5,196,C4,195,C3,194,C2,193,C1,192,C0,191,BF,190,BE,189,BD,188,BC,187,BB,186,BA,185,B9,184,B8,183,B7,182,B6,181,B5,180,B4,179,B3,178,B2,177,B1,176,B0,175,AF,174,AE,173,AD,172,AC,171,AB,170,AA,169,A9,168,A8,167,A7,166,A6,165,A5,164,A4,163,A3,162,A2,161,A1,160,A0,159,9F,158,9E,157,9D,156,9C,155,9B,154,9A,143,8F,142,8E,141,8D,140,8C,139,8B,138,8A,127,7F,126,7E,125,7D,124,7C,123,7B,122,7A,111,6F,110,6E,109,6D)
var %t = $replacex(%t,-,%,108,6C,107,6B,106,6A,95,5F,94,5E,93,5D,92,5C,91,5B,90,5A,79,4F,78,4E,77,4D,76,4C,75,4B,74,4A,63,3F,62,3E,61,3D,60,3C,59,3B,58,3A,47,2F,46,2E,45,2D,44,2C,43,2B,42,2A,31,1F,30,1E,29,1D,28,1C,27,1B,26,1A,153,99,152,98,151,97,150,96,149,95,148,94,147,93,146,92,145,91,144,90,137,89,136,88,135,87,134,86,133,85,132,84,131,83,130,82,129,81,128,80,121,79,120,78,119,77,118,76,117,75,116,74,115,73,114,72,113,71,112,70,105,69,104,68,103,67,102,66,101,65,100,64,99,63,98,62,97,61,96,60,89,59,88,58,87,57,86,56,85,55,84,54,83,53,82,52,81,51,80,50,73,49,72,48,71,47,70,46,69,45,68,44,67,43,66,42,65,41,64,40,57,39,56,38,55,37,54,36,53,35,52,34,51,33,50,32,49,31,48,30,41,29,40,28,39,27,38,26,37,25,36,24,35,23,34,22,33,21,32,20,25,19,24,18,23,17,22,16,21,15,20,14,19,13,18,12,17,11,16,10,15,0F,14,0E,13,0D,12,0C,11,0B,10,0A)
var %t = $left(%t,-1)
inc %i 225
}
echo -s Encoded 100 KB in $calc($ctime - %start) seconds
}