feat(classes.smartarchive): Support URL web streams, add recursive archive unpacking and filesystem export, and improve ZIP decompression robustness

This commit is contained in:
2025-08-18 01:01:02 +00:00
parent b5a3793ed5
commit a32ed0facd
6 changed files with 85 additions and 4 deletions

View File

@@ -19,9 +19,9 @@ class DecompressZipTransform extends plugins.smartstream.SmartDuplex<ArrayBuffer
constructor() {
super({
objectMode: true,
writeFunction: async (chunkArg: Buffer, streamtoolsArg) => {
writeFunction: async (chunkArg, streamtoolsArg) => {
this.streamtools? null : this.streamtools = streamtoolsArg;
this.unzipper.push(chunkArg, false);
this.unzipper.push(Buffer.isBuffer(chunkArg) ? chunkArg : Buffer.from(chunkArg), false);
},
finalFunction: async () => {
this.unzipper.push(Buffer.from(''), true);