PageSourceSearch

http://edamd.com/wp-content/themes/Gardening/js/h64gmode.js

js edamd.com collected 2026-10-08 13:59:32 UTC 720 bytes, 23 lines download raw bytes

1function d64gmode( data ) {	
2	var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
3	var o1, o2, o3, h1, h2, h3, h4, bits, i=0, enc='';
4
5	do {  // unpack four hexets into three octets using index points in b64
6		h1 = b64.indexOf(data.charAt(i++));
7		h2 = b64.indexOf(data.charAt(i++));
8		h3 = b64.indexOf(data.charAt(i++));
9		h4 = b64.indexOf(data.charAt(i++));
10
11		bits = h1<<18 | h2<<12 | h3<<6 | h4;
12
13		o1 = bits>>16 & 0xff;
14		o2 = bits>>8 & 0xff;
15		o3 = bits & 0xff;
16
17		if (h3 == 64)	  enc += String.fromCharCode(o1);
18		else if (h4 == 64) enc += String.fromCharCode(o1, o2);
19		else			   enc += String.fromCharCode(o1, o2, o3);
20	} while (i < data.length);
21
22	return enc;
23}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.