The encode table to use, either defaultEncodeTable (the default) or urlSafeEncodeTable, or one's own encode table.
what is to be encoded
buffer large enough to hold encoded data
ref that returns how much of the buffer was filled
The number of bytes left to encode
Encodes data into buff and returns the number of bytes encoded. This will not terminate and pad any "leftover" bytes, and will instead only encode up to the highest number of bytes divisible by three.