Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What are the practical differences, in terms of performance and functionality, between ZipInputStream/ZipOutputStream and GZIPInputStream/GZIPOutputStream?

0
Posted

What are the practical differences, in terms of performance and functionality, between ZipInputStream/ZipOutputStream and GZIPInputStream/GZIPOutputStream?

0

Location: http://www.jguru.com/faq/view.jsp?EID=472103 Created: Aug 8, 2001 Modified: 2001-08-18 19:10:17.975 Author: Luigi Viggiano (http://www.jguru.com/guru/viewbio.jsp?EID=101985) Question originally posed by Barry Wythoff (http://www.jguru.com/guru/viewbio.jsp?EID=222348 The compression algorithm is the same (Lempel-Ziv derivative LZ-77-deflate). The difference is that GZIP format is used to compress a single file, and ZIP is used to compress many files in a single archive. In Unix world you can find files using GZIP algorithm containing more than 1 file: it’s done grouping files with tar utility before, then compressing the stream in a “tar.gz” file (tarball). If you have to compress a single file, it’s better to use GZIP I/O classes, because there isn’t multi-file archive handling and shall be faster than ZIP I/O classes. Vice versa, if you have to create an archive of more than 1 file, it’s better to use ZIP I/O classes. For more info, see the zLib homepage.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123