Welcome to the JavaRanch. Zip and Gzip are different and incompatible file formats, that's why there's two different classes to handle them. Winzip is smart enough to know the difference and handle it. It can also handle JAR files (which are Zip files plus a manifest file) which is very useful when trying to resolve ClassNotFound errors.
Originally posted by Joe Ess: Welcome to the JavaRanch. Zip and Gzip are different and incompatible file formats, that's why there's two different classes to handle them.
Hmm... I understand, thanks.
The reason for my question: I'm reading the .gz-File through a GZIPInputStream and I implemented a Progressbar to visualize the process. The problem is: to calculate the actual status of the progressbar, I need the uncompressed filesize. I googled a lot for a hint to solve the problem - yet unsuccessful.
If you can't determine the length of a task, you can use an indeterminate progress bar to indicate that something is taking place (see the Swing Tutorial page on Progress Bar). You could also just fudge the uncompressed length. Just multiple the compressed size by some factor (there's a table of different file types, compression algorithms and compression ration here if you want some good estimates).
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com