function Utf8ArrayToStr(array) {
let out = "", i = 0, len, c;
let char2, char3;
len = array.length;
while (i < len) {
c = array[i++];
switch (c >> 4) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
out += String.fromCharCode(c);
break;
case 12:
case 13:
char2 = array[i++];
out += String.fromCharCode(
(c & 31) << 6 | char2 & 63
);
break;
case 14:
char2 = array[i++];
char3 = array[i++];
out += String.fromCharCode(
(c & 15) << 12 | (char2 & 63) << 6 | (char3 & 63) << 0
);
break;
}
}
return out;
}