Create a New ZIP Archive File in Java

Creating a ZIP file is one of the best ways to compress large amounts of data into an easily shareable format. The format was originally developed in 1989 for use by PKWARE Inc.’s PKZIP utility and was quickly picked and implemented by other software utilities, such as Microsoft and Apple. Since then, the term “zipping a file” has become synonymous with file compression.

There are many advantages to zipping files, with the most obvious reason being to optimize file storage. If you have an abundance of infrequently used files, they can be archived into a single, easily located ZIP file. Other advantages of zipping files include the ability to securely email a previously unmanageable amount of information to a client, as well as the easy transference to USB flash drives.