// Converts a base64 numeral into a bit buffer. The input string is terminated by the first
// non base64 character, normally a space or null, or terminated when the bit buffer is full.
// A correct length base64 numeral does not need a terminating space or null.
// If successful, returns a length equal to the bit buffer length. If the input string is too
// short, returns a length shorter than the bit buffer. If the bit buffer is not a multiple of six bits, and the last base64 numeral of the bit buffer has trailing binary ones, returns a length greater than the size of the bitbuffer, without writing the trailing binary bits into the bit buffer.