Aspose.ZIP for Java class library allows your Java applications to compress/decompress files and folders without getting into the complexity of coding new compression algorithms or understanding the existing ones. Enable your programs to work with a vast range of features, such as, creating archives, saving archives, archive extraction, encrypting/decrypting archives, compressing single or multiple files as well as directory contents. It also allows you to apply security to your archived and compressed files and folders via password using ZipCrypto or AES (128, 192, 256) encryption or mixed encryption.
Directory | Description |
---|---|
Examples | A collection of Java examples that help you learn the product features. |
- Compress files and folders into standard ZIP format using Deflate, Bzip2, LZMA or PPMd compression algorithm.
- Extract RAR4 and RAR5 archives, with and without encryption.
- Apply simple password or
AES128
,AES192
,AES256
encryption to archives. - Employ different protection scheme to each file within an archive.
- Append more files to an existing zipped archive.
- Use
Gzip
,Bzip2
,Xz
,Z
andLzip
to pack files & folders into aTAR
orCpio
archive. - Supports
LZMA
,LZMA2
orBzip2
compression & optional encryption to create7z
archives. - Track progress of compression.
- Create self-extracting compressed archives.
Compression: Zip, Tar, Cpio, GZip, Bz2, Z, Xz, Lzip, 7z
Decompression: Zip, Rar, Cab, Tar, Cpio, GZip, Bz2, Z, Xz, Lzip
- Microsoft Windows: Windows Desktop & Server (x86, x64)
- macOS: Mac OS X
- Linux: Ubuntu, OpenSUSE, CentOS, and others
- Java Versions:
J2SE 8.0 (1.8)
or above
Aspose hosts all Java APIs at the Aspose Repository. You can easily use Aspose.ZIP for Java API directly in your Maven projects with simple configurations. For the detailed instructions please visit Installing Aspose.ZIP for Java from Maven Repository documentation page.
try (Archive archive = new Archive()) {
archive.createEntry("entry_name.dat", "input_file.dat");
archive.save("result_archive.zip");
}
try (Archive archive = new Archive("input_archive.zip")) {
archive.extractToDirectory("outputDirectory");
}
try (SevenZipArchive archive = new SevenZipArchive(
new SevenZipEntrySettings(null, new SevenZipAESEncryptionSettings("p@s$")))) {
archive.createEntry("data.bin", new ByteArrayInputStream(new byte[] { 0x00, (byte)0xFF }));
archive.save("result_archive.7z");
}
Home | Product Page | Docs | API Reference | Examples | Blog | Search | Free Support | Temporary License