PSBT encoding : what's the aim of convertBytes function?
PSBT uses Base64 encoding. As every Base64 character has 64 = 26 possibilities, they can store 6 bits of information. The ConvertBits function you link to takes input bytes (which consist of 8 bits each), and rearranges them into groups of 6 bits, which are then mapped to the Base64 character set.
ConvertBits&lt;A,B&gt; is not converting from base-A to base-B; it is converting from base-2A to base-2B.