MCPcopy Create free account
hub / github.com/microsoft/SandDance / encodeChunk

Function encodeChunk

docs/app/js/sanddance-app.js:114152–114160  ·  view source on GitHub ↗
(uint8, start, end)

Source from the content-addressed store, hash-verified

114150 return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F];
114151}
114152function encodeChunk(uint8, start, end) {
114153 var tmp;
114154 var output = [];
114155 for(var i2 = start; i2 < end; i2 += 3){
114156 tmp = (uint8[i2] << 16 & 0xFF0000) + (uint8[i2 + 1] << 8 & 0xFF00) + (uint8[i2 + 2] & 0xFF);
114157 output.push(tripletToBase64(tmp));
114158 }
114159 return output.join("");
114160}
114161function fromByteArray(uint8) {
114162 var tmp;
114163 var len3 = uint8.length;

Callers 1

fromByteArrayFunction · 0.70

Calls 1

tripletToBase64Function · 0.70

Tested by

no test coverage detected