Registry / utility / commons-compress

commons-compress

JSON →
library1.28.0javamavenunverified

Library for working with compression and archive formats including bzip2, gzip, tar, zip, and many others.

<dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-compress</artifactId> <version>1.28.0</version> </dependency>
INSTALL
IMPORT
SIG · COMMONS-COMPRESS
C
commons-compress
utilityjavav1.28.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ArchiveOutputStream
org.apache.commons.compress.archivers.ArchiveOutputStream

Create a zip archive with a single entry

import org.apache.commons.compress.archivers.ArchiveOutputStream; import org.apache.commons.compress.archivers.ArchiveEntry; import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream; import java.io.FileOutputStream; public class Main { public static void main(String[] args) throws Exception { try (ArchiveOutputStream out = new ZipArchiveOutputStream(new FileOutputStream("output.zip"))) { ArchiveEntry entry = out.createArchiveEntry(new File("input.txt"), "input.txt"); out.putArchiveEntry(entry); out.write("Hello".getBytes()); out.closeArchiveEntry(); } } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.28.0latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
4
Amazon
1
Bingbot
1
Resources
commons-compress — mvn dependency:get commons-compress · libregistry