antelle / node-stream-zip

node.js library for fast reading of large ZIPs
Other
447 stars 63 forks source link

[Question] How to check if the file is corrupted? #88

Closed felinto-dev closed 2 years ago

felinto-dev commented 2 years ago

I would check ONLY if the file is corrupted. I would use the less memory and CPU possible.

What method should I use?

antelle commented 2 years ago

Hi, You just read the file without extracting any entry. Then it should throw an exception if it's invalid.

felinto-dev commented 2 years ago

In the examples shown in the documentation, I necessarily need to know a valid example file. Users can upload any ZIP file they want and I won't know the contents. I just want to know if the file is corrupted. What do you suggest?