(string, callback)
| 20 | } |
| 21 | |
| 22 | function 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 | |
| 30 | function decompressDataURI(dataURI, preamble, callback) { |
| 31 | var base64Index = dataURI.indexOf(LZMA64_MARKER); |
no outgoing calls
no test coverage detected