code: function encodeBlock(input, inputOffset, output, outputOffset) {
  	output[outputOffset + 0] = Alphabet[input[inputOffset + 0] >> 3];
  	output[outputOffset + 1] = Alphabet[((input[inputOffset + 0] & 0x07) << 2) | (input[inputOffset + 1] >> 6)];
  	output[outputOffset + 2] = Alphabet[(input[inputOffset + 1] & 0x3E) >> 1];
  	output[outputOffset + 3] = Alphabet[((input[inputOffset + 1] & 0x01) << 4) | (input[inputOffset + 2] >> 4)];
  	output[outputOffset + 4] = Alphabet[((input[inputOffset + 2] & 0x0F) << 1) | (input[inputOffset + 3] >> 7)];
  	output[outputOffset + 5] = Alphabet[(input[inputOffset + 3] & 0x7F) >> 2];
  	output[outputOffset + 6] = Alphabet[((input[inputOffset + 3] & 0x03) << 3) | (input[inputOffset + 4] >> 5)];
  	output[outputOffset + 7] = Alphabet[input[inputOffset + 4] & 0x1F];
  }
docs: region encode