(data, callback)
| 44 | } |
| 45 | |
| 46 | function 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 | |
| 55 | function stringToData(string, callback) { |
| 56 | if (!string.length) return callback(""); |
no test coverage detected