Touffy / client-zip

A client-side streaming ZIP generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Read a zip

Androz2091 opened this issue · comments

commented

Hello
Could you add a way to read a zip file? Jszip is pretty slow for that too

Hi there. First, do you have a use case for reading ZIP files in the client ? just curious.

Reading ZIP files (reliably) is pretty tricky, considering all the different, more or less quirky pieces of software that make them. Depending on what you expect and what kind of ZIP files you'll need to handle (which extra fields you care about, which compression algorithms and other features), there's a lot of work there.

Also, reading ZIP files cannot be implemented on a stream in the general case, and working around the browser limitations on memory and random access would be an additional source of complexity.

Now, I do think it is an interesting project. But it's not something I think fits into client-zip. I am of course open to arguments for unzipping in client-zip, but meanwhile, I can suggest another library. While searching for Zip64 information last week I discovered Conflux, it's modern and more ambitious in scope than client-zip (it unzips, and has compression), uses streams too. Doesn't do Zip64 yet, despite the search that lead me there. I'm not sure how actively it's being developed right now, but give it a shot ? If you care about speed, you should open a PR there to port my CRC32 WebAssembly code.

I'm closing this for now. Like I said, by design, client-zip is not a Zip reader.