Also according to this, https://www.securecoding.cert.org/confluence/display/java/IDS04-J.+Safely+extract+files+from+ZipInputStream, a simple way to prevent is to check the size of zip entries before unzipping them, and throw an error if a file is too big.

All in all I'd rather use a library to do this stuff.