Jar utility can compress files?

Java archive creator is the Jar tool. Is it just a packaging tool or does it compress and package (like zip utilities)? It can compress and package, also by default compression is on. So all the jar files that others have created so far may be compressed (since they did not turn off that).

You can turn off the compression feature by using the 0 (zero) option of the jar command. The command would look like follows.

jar cvf0 TicTacToe.jar *.class

So what's the big deal? It's always better to compress it!!! Many may think so?

No, that's not the truth. There are reasons why you should turn off the compression. For a situation where a jar file is loaded to a browser, uncompressed jar will be suitable over a compressed jar. Uncompressed JAR files can generally be loaded more faster than compressed files because the need to decompression overhead is eliminated. However there's a trade-off, for an uncompressed jar download time over a network may be longer. So decision must be taken by considering both aspects.

Check out this stream