MCPcopy Create free account
hub / github.com/arfct/itty-bitty / base64ToByteArray

Function base64ToByteArray

docs/v1/data.js:12–20  ·  view source on GitHub ↗
(base64)

Source from the content-addressed store, hash-verified

10}
11
12function base64ToByteArray(base64) {
13 var raw = window.atob(base64);
14 var rawLength = raw.length;
15 var array = new Uint8Array(new ArrayBuffer(rawLength));
16 for(i = 0; i < rawLength; i++) {
17 array[i] = raw.charCodeAt(i);
18 }
19 return array;
20}
21
22function stringToZip(string, callback) {
23 LZMA.compress(string, 9, function(result, error) {

Callers 2

compressDataURIFunction · 0.70
zipToStringFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected