Convert a decimal number string to a Base36 number string

There are 2 ways to make this conversion…


WAY 1

If the encoding have to result in a string having only “printable” characters (#32..#126) then an easy packing method not requiring any complex calculation would be BCD: pack two digits into a byte, giving a 50% size reduction:

WAY 2

This DecimalStrToBase36Str seems to work on smaller inputs, but check output on the larger inputs.