mirror of
https://github.com/codedread/bitjs
synced 2025-10-03 17:49:16 +02:00
Make buffers transferable out of the Worker for unrar/untar too
This commit is contained in:
parent
85dcee80ec
commit
755aba54bd
2 changed files with 4 additions and 2 deletions
|
@ -100,6 +100,7 @@ class TarLocalFile {
|
|||
|
||||
// Done header, now rest of blocks are the file contents.
|
||||
this.filename = this.name;
|
||||
/** @type {Uint8Array} */
|
||||
this.fileData = null;
|
||||
|
||||
info("Untarring file '" + this.filename + "'");
|
||||
|
@ -146,7 +147,7 @@ const untar = function () {
|
|||
currentFileNumber = totalFilesInArchive++;
|
||||
currentBytesUnarchivedInFile = oneLocalFile.size;
|
||||
currentBytesUnarchived += oneLocalFile.size;
|
||||
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