DRYed out zlib.js; 120+ less lines

WARNING: Not tested.