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

Function zipToString

docs/v1/data.js:46–53  ·  view source on GitHub ↗
(data, callback)

Source from the content-addressed store, hash-verified

44}
45
46function zipToString(data, callback) {
47 var array = base64ToByteArray(data);
48 LZMA.decompress(array, function(result, error) {
49 if (!(typeof result === 'string')) result = new Uint8Array(result)
50 if (error) console.error(error);
51 callback(result);
52 });
53}
54
55function stringToData(string, callback) {
56 if (!string.length) return callback("");

Callers 2

decompressDataURIFunction · 0.70
edit.jsFile · 0.70

Calls 1

base64ToByteArrayFunction · 0.70

Tested by

no test coverage detected