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

Function stringToZip

docs/v1/data.js:22–28  ·  view source on GitHub ↗
(string, callback)

Source from the content-addressed store, hash-verified

20}
21
22function stringToZip(string, callback) {
23 LZMA.compress(string, 9, function(result, error) {
24 if (error) console.error(error);
25 var base64String = btoa(String.fromCharCode.apply(null, new Uint8Array(result)));
26 return callback(base64String);
27 });
28}
29
30function decompressDataURI(dataURI, preamble, callback) {
31 var base64Index = dataURI.indexOf(LZMA64_MARKER);

Callers 3

compressDataURIFunction · 0.70
fetchCodepenFunction · 0.70
handleInputFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected