Aspose.ZIP for Java is a flexible documents compression and archive manipulation API for standard ZIP format. API enables Java applications to achieve files compression/decompression, archiving files as well as folders and encryption of archives. It provides protection via user-defined passwords and traditional encryption using ZipCrypto or AES encryption such as AES128, 192 and AES256.

Aspose.Zip unveils a dynamic Java API, a masterfully crafted solution tailored for File Compression and Archiving. With a keen focus on the evolving landscape of data management, this versatile library empowers developers to wield Java's prowess, seamlessly compressing, archiving, and extracting files.

Java Compression API Features

Easy Integration

Create an archive from one or more files

Add files to archives without compression

Encrypt or decrypt whole archive or specific entries

Add entries to existing archive

Delete entries from existing archive

Compress folder respecting its structure

Decompress to directory respecting archive structure

Compress any size documents by applying parallelism

Integrating Compression API in a Java Application

The compression library integration is simple whereas most of the compress & decompress operations can be performed with just a few lines of code.

Single file compression - Java

      String dir = "full directory path";

      try(Archive arch = new Archive()) {

        arch.createEntry("filename.dat", dir+"file.dat");
        arch.save(dir+"result.zip");

      } 

You can try online Multi-Format Converter, convert your documents to an archive in an easy way.

An important feature of the library is the ability to work with many formats, such as: ZIP, RAR (Coming soon: 7ZIP, TAR, BZ2, GZ, LZ, XZ, Z, CPIO)

  

Support and Learning Resources

  
  

Aspose.Zip offers individual archive processing APIs for other popular development environments, listed below: