Closed szydlovski closed 3 years ago
Hi, we do not have any system for reporting errors in compressed data. If you give UZIP.js an invalid ZIP file, it is not guaranteed to do any meaningful work.
If we did any compressed data validation, I am afraid that our code would be 2x bigger and 2x slower.
So is there no way to make sure that parse
won't just hang forever for a given input? Doing meaningful work is one but going into an infinite loop is another.
We could add something like:
if(data.length==0) throw "invalid input";
but there still will be many invalid inputs, for which UZIP could do infinite loops.
I understand, thank you for responding!
When executed, this code appears to go into an infinite loop. No errors are thrown. Is this expected behavior?