Closed Saya47 closed 3 months ago
Use the stream mode can get a gzip stream then read it into Buffer array.
const gzipStream = new compressing.gzip.FileStream({ source: 'file/path/to/compress' });
const gzipChunks = [];
for await (const chunk of gzipStream) {
gzipChunks.push(chunk);
}
console.log(gzipChunks);
Please add support folder destination to be a buffer! So instead of writing the compressed file to a path, we can store it in a buffer.
Example: