(data, password,callbackFn)
| 289 | //data: Array of [{ name: 'arc_name.txt', content: File|Blob }] */ |
| 290 | let start=false; |
| 291 | var readRARContentWorkerFS = function (data, password,callbackFn) { |
| 292 | if(data == null || data.length==0 || data.length<1) return null; |
| 293 | let files=[]; |
| 294 | let blobs=[]; |
| 295 | for (let d of data) if(d.content instanceof File) files.push(d.content); else blobs.push({ name: d.name, data: d.content }); |
| 296 | if(!start) Module.FS.mkdir('/x') |
| 297 | Module.FS.mount(Module.WORKERFS, { |
| 298 | files: files, |
| 299 | blobs: blobs, |
| 300 | encoding: 'binary', |
| 301 | canOwn: true, |
| 302 | flags: 'w+' |
| 303 | }, '/x') |
| 304 | if(!start) Module.FS.chdir('/x'); |
| 305 | start = true; |
| 306 | return _readRARContent(data, password,'W',callbackFn) |
| 307 | } |
| 308 | |
| 309 | /**Everything is loaded to the memory so make sure you have enough free memory to hold BOTH the RAR file AND the decompressed content |
| 310 | data: Array of [{ name: 'arc_name.txt', content: UTF8string|ArrayBufferView }] */ |
nothing calls this directly
no test coverage detected