zlib port to javascript