1
0
Fork 0
mirror of https://github.com/codedread/bitjs synced 2025-10-05 02:19:24 +02:00

Fix issue #44, make decompress work in NodeJS (use Worker only where possible).

This commit is contained in:
Jeff Schiller 2023-12-11 22:00:35 -08:00
parent 5ad89892bd
commit f71c893f63
6 changed files with 59 additions and 34 deletions

View file

@ -20,13 +20,6 @@ import { findMimeType } from '../file/sniffer.js';
* @property {Uint8Array} fileData
*/
/**
* An enum for threading mode. Currently supporting only WebWorkers.
*/
export const ThreadingMode = {
WEB_WORKER: 'WEB_WORKER',
}
/**
* @typedef UnarchiverOptions
* @property {string} pathToBitJS The path to the bitjs folder.
@ -232,7 +225,7 @@ export class UnzipperInternal extends Unarchiver {
}
getMIMEType() { return 'application/zip'; }
getScriptFileName() { return 'archive/unzip.js'; }
getScriptFileName() { return './unzip.js'; }
}
export class UnrarrerInternal extends Unarchiver {
@ -241,7 +234,7 @@ export class UnrarrerInternal extends Unarchiver {
}
getMIMEType() { return 'application/x-rar-compressed'; }
getScriptFileName() { return 'archive/unrar.js'; }
getScriptFileName() { return './unrar.js'; }
}
export class UntarrerInternal extends Unarchiver {
@ -250,7 +243,7 @@ export class UntarrerInternal extends Unarchiver {
}
getMIMEType() { return 'application/x-tar'; }
getScriptFileName() { return 'archive/untar.js'; };
getScriptFileName() { return './untar.js'; };
}
/**