mirror of
https://github.com/codedread/bitjs
synced 2025-10-03 17:49:16 +02:00
Experiment with marking ArrayBuffers are Transferable across the Worker thread boundary for unzip.
This commit is contained in:
parent
2a90e32c89
commit
85dcee80ec
3 changed files with 36 additions and 20 deletions
|
@ -109,6 +109,7 @@ class ZipLocalFile {
|
|||
}
|
||||
|
||||
// Read in the compressed data if we have no data descriptor.
|
||||
/** @type {Uint8Array} */
|
||||
this.fileData = null;
|
||||
let descriptorSize = 0;
|
||||
if (this.hasDataDescriptor) {
|
||||
|
@ -622,7 +623,7 @@ function archiveUnzip() {
|
|||
oneLocalFile.unzip();
|
||||
|
||||
if (oneLocalFile.fileData != null) {
|
||||
postMessage({ type: 'extract', unarchivedFile: oneLocalFile });
|
||||
postMessage({ type: 'extract', unarchivedFile: oneLocalFile }, [oneLocalFile.fileData.buffer]);
|
||||
postProgress();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue