Open Source Java Compression & Archiving Library
Generate & Extract ZIP, TAR, and GZIP Archives via Open Source Free Java API
Jarchivelib is an open source Java library that allows developers to create a new archiver to handle zip archives inside their own applications. It is a simple archiving and compression library that automatically generates ZIP, TAR.gz, TAR.bz2, and TAR archived source code.
Jarchivelib has included support for several important features such as creating ZIP archives using all the available files in a directory, creating password-protected ZIP files, extracting ZIP file contents to a directory, and many more.
Getting Started with Jarchivelib
To run your project using Jarchivelib, first of all, you need to have Java 7 & above. You can manually download the repository from GitHub. Use the following command to install it.
Install via Git command
git clone https://github.com/thrau/jarchivelib.git
Jarchivelib Maven Dependency
<dependency>
<groupId>org.rauschig</groupId>
<artifactId>jarchivelib</artifactId>
<version>0.7.1</version>
</dependency>
<dependency>
Compress and Decompress Files via Java Library
Jarchivelib provides the functionally for compressing and decompressing files inside Java applications. It allows to compresses of the given input file to the given destination directory or file. It requires the source to be a readable File, and the destination to be either a file or a directory. The API also supports decompressing the given source file to the given destination directory or file.
Create a New ZIP Archives using Java
Jarchivelib enables software developers to create a new archiver to handle zip archives inside their own Java applications. If the File has a composite file extension such as ".tar.gz", the created Archiver will also handle ".gz" compression. Developers can omit the filename extension in the archive name, as it will be appended by the archiver automatically if it is missing. Developers can also create a new tar archive with gzip compression that can contain the entire directory.