I don't think I see the problem.  If the data is truncated, inf.inflate() will return 0.  0 is not > 0, so the loop will break, and the method will return to the caller in PackFile.  The caller checks for inf.finished(), and marks the object corrupt if it returned false.