zip utility implemented with JavaScript