-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is jszip unmaintained? #915
Comments
I would be open to co-maintaing the library. @Stuk - would you be open to that? |
Tagging along for the answer. Again, @Stuk it's an awesome util, just want to know current state for planning choices! |
Same question. Also I'm considering whether it would be worth forking jszip to remove pako as a dependency, as nodejs comes with zlib. (and even browsers seem to have (de)compression support now - https://developer.mozilla.org/en-US/docs/Web/API/Compression_Streams_API - although I'm personally only interested in the serverside use case now) |
Great work ! But is it still maintained ? What are the alternatives ? |
For nodejs, https://www.npmjs.com/package/node-stream-zip is an alternative for decompressing - I've just successfully integrated it. You can pass a file path to it which reduces the memory requirements - in nodejs, jszip wants the file to be decompressed in a Buffer, which is not an option for me with multi-GB zip files Neither supports nodejs's Blobs unfortunately - jszip seems to have some support for Blobs but only in its browser supporting parts, not in the nodejs parts. (I checked if there was quick fix for that, but jszip relies on FileReader to read Blobs which isn't available in Node 20) |
Thanks for your reply, but my needs is essentially for creating a zip archive. |
I did some tests with https://gildas-lormeau.github.io/zip.js/ and it seems pretty convincing. I was able to compress much faster that with jszip (factor 3 on my macbook air). Also it should be able to deal with Zip64 files (yes I have a zip of 29Gb ...) but I didn't try yet. |
@lpatiny nice find. zip.js wasn't on my shortlist yet. It seems to tick all the boxes...
interestingly no mention of nodejs, but that's probably considered t one implicit, https://github.com/gildas-lormeau/zip.js/blob/master/package.json shows support for nodejs >= 16.5
yeah I was hoping for such numbers when not having to deal with a WASM version of zlib |
I tested it with nodeJS (type=module). Not sure the best way to use this library. import { readdir, readFile } from 'fs/promises'
import { writeFileSync } from 'fs'
import { join } from 'path'
import { BlobWriter, Uint8ArrayReader, ZipWriter } from '@zip.js/zip.js'
const source = 'node_modules'
const lastPart = source.split('/').pop();
const files = (await readdir(new URL(source, import.meta.url), { recursive: true, withFileTypes: true })).filter(entry => entry.isFile());
// Creates a BlobWriter object where the zip content will be written.
const blobWriter = new BlobWriter();
const zipWriter = new ZipWriter(blobWriter);
const promises = [];
const pathReplacer = new RegExp(".*/" + lastPart);
for (const file of files) {
const currentDir = file.path.replace(pathReplacer, '');
const path = currentDir + (currentDir ? '/' : '') + file.name;
promises.push(
(async () => {
const data = await readFile(join(file.path, file.name))
const unit8ArrayReader = new Uint8ArrayReader(data);
await zipWriter.add(path, unit8ArrayReader);
})()
);
}
await Promise.all(promises);
await zipWriter.close();
const zipFileBlob = await blobWriter.getData();
const array = new Uint8Array(await zipFileBlob.arrayBuffer());
writeFileSync(new URL('zipjs.zip', import.meta.url), array);
|
Is jszip unmaintained? No release or commit since August of 2022. There are plenty of merge requests and issues.
I am not judging, I wanted to know the status. Maybe some backgrounds like: Lack of interest? Lack of money? Would someone be interested in taking over this project?
The text was updated successfully, but these errors were encountered: