MCPcopy Create free account
hub / github.com/PizazzGY/NewTVBox / Utf8ArrayToStr

Function Utf8ArrayToStr

js/drpy2.min.js:675–707  ·  view source on GitHub ↗
(array)

Source from the content-addressed store, hash-verified

673}
674
675function Utf8ArrayToStr(array) {
676 var out, i, len, c;
677 var char2, char3;
678 out = "";
679 len = array.length;
680 i = 0;
681 while (i < len) {
682 c = array[i++];
683 switch (c >> 4) {
684 case 0:
685 case 1:
686 case 2:
687 case 3:
688 case 4:
689 case 5:
690 case 6:
691 case 7:
692 out += String.fromCharCode(c);
693 break;
694 case 12:
695 case 13:
696 char2 = array[i++];
697 out += String.fromCharCode((c & 31) << 6 | char2 & 63);
698 break;
699 case 14:
700 char2 = array[i++];
701 char3 = array[i++];
702 out += String.fromCharCode((c & 15) << 12 | (char2 & 63) << 6 | (char3 & 63) << 0);
703 break
704 }
705 }
706 return out
707}
708
709function gzip(str) {
710 let arr = pako.gzip(str, {});

Callers 1

ungzipFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected