Comment by gruez
7 months ago
Depending on the language/library that might not always be possible. For instance python's zip library only provides an extract function, without a way to hook into the decompression process, or limit how much can be written out. Sure, you can probably fork the library to add in the checks yourself, but from a maintainability perspective it might be less work to do with the partition solution.
It also provides an open function for the files in a zip file. I see no reason something like this won't bail after a small limit: