Compress Files Zip Format Java
We will create sample program to compress multiple files in Zip format using Java program. Java API gives java.util.zip package doing the zip compatible format data compression also it gives API which can be use to create, modify and read files in Zip and GZIP format. Please have example below:
Note: This program will compress all files in current directory and to handle zip for sub-directory we will cover in next demo program.
For more information about zip please refer oracle documentation here