v23.01-2.2 · all platforms green LGPL-2.1 Java 8+

The 7-Zip engine,
bound to Java.

Extract 20+ archive formats — 7z, ZIP, RAR, TAR, XZ and more — and create 7z, ZIP, TAR, GZip, BZip2 & XZ, with the real 7-Zip engine and native performance. One small library, every platform, no external tools. All I/O is callback-driven: run fully in memory, stream from any source — even a remote archive fetched piece by piece — and abort at any time.

12platform builds
8845JUnit tests
23.017-Zip engine
2007maintained since

Why 7-Zip-JBinding

Everything the 7-Zip engine can do — as a Java API

Not a wrapper around an external binary: the engine is compiled into a small native library, driven through JNI by a clean Java interface.

📦20+ formats, one API

7z, ZIP, RAR/RAR5, TAR, GZip, BZip2, XZ, ISO, CAB, NTFS, … — with archive-format auto-detection, password support and multi-volume archives.

Native performance

The original 7-Zip 23.01 C/C++ engine, running in-process. Stream-based: extract from and compress to memory, files or your own I/O callbacks.

🗜️Create & update archives

Write 7z, ZIP, TAR, GZip, BZip2 and XZ. Update existing archives in place — add, replace and remove items without repacking everything.

One jar, every platform

Windows, Linux (glibc & musl/Alpine, x86 & ARM v5–v8) and macOS (universal: Intel + Apple Silicon). Runtime auto-detection picks the right native library.

🔒Encryption support

Open and create password-protected archives, including 7z header encryption and encrypted RAR5 archives.

Tested like it matters

8845 JUnit tests, run on every supported platform — real VMs, real ARM hardware, both with the per-platform jar and the all-platforms jar.


How it works

The real engine, one JNI hop away

Your code talks to a small Java API. Behind it, a single native library contains the C++ binding layer and the unmodified 7-Zip engine — no external processes, no temp executables, no shelling out.

Java Virtual Machine any JVM language · Java 8+ Your application 7-Zip-JBinding API sevenzipjbinding.jar JNI Native library lib7-Zip-JBinding.so · .dylib · .dll JNI binding layer C++ 7-Zip engine 23.01 · C/C++ the real thing, in-process one small jar on your classpath auto-detected & loaded at runtime — 12 platform builds

Callback-driven I/O

Your callbacks are the I/O layer

Extraction and compression never touch the disk unless you want them to. The engine asks for bytes — your code decides where they come from and where they go. That unlocks patterns that are impossible with an external unzip tool:

Fully in-memorycompress & extract byte arrays — no files, no temp dirs
Any data sourceimplement one stream interface: file, memory, network, database, S3, …
Random access, on demandthe engine reads only what it needs — serve just those byte ranges
Partial extractionpull a few items out of a huge archive that is never stored locally
Remote archiveslist & extract while downloading only the required parts
Abort any timecancel a running operation from a callback — cleanly
Progress reportingfine-grained progress for UIs and job monitoring
Multi-volume on demandsupply volumes as they appear — even wait for one to be mounted
Smart cachingcache hot regions of large archives in your stream layer
Password callbacksasked only when actually needed — per archive or per item

Example: extract two files from a 40 GB remote backup — your IInStream serves the engine's reads via HTTP range requests, downloading megabytes instead of gigabytes. See the snippets →


Quick start

Two dependencies. Five lines of code.

Add the API jar and the native-libraries jar from Maven Central. The right native library is detected and loaded at runtime.

<dependency>
    <groupId>net.sf.sevenzipjbinding</groupId>
    <artifactId>sevenzipjbinding</artifactId>
    <version>23.01-2.2</version>
</dependency>
<dependency>
    <groupId>net.sf.sevenzipjbinding</groupId>
    <artifactId>sevenzipjbinding-all-platforms</artifactId>
    <version>23.01-2.2</version>
</dependency>
implementation("net.sf.sevenzipjbinding:sevenzipjbinding:23.01-2.2")
implementation("net.sf.sevenzipjbinding:sevenzipjbinding-all-platforms:23.01-2.2")
implementation 'net.sf.sevenzipjbinding:sevenzipjbinding:23.01-2.2'
implementation 'net.sf.sevenzipjbinding:sevenzipjbinding-all-platforms:23.01-2.2'
libraryDependencies += "net.sf.sevenzipjbinding" % "sevenzipjbinding" % "23.01-2.2"
libraryDependencies += "net.sf.sevenzipjbinding" % "sevenzipjbinding-all-platforms" % "23.01-2.2"
<dependency org="net.sf.sevenzipjbinding" name="sevenzipjbinding" rev="23.01-2.2"/>
<dependency org="net.sf.sevenzipjbinding" name="sevenzipjbinding-all-platforms" rev="23.01-2.2"/>
ListArchive.java
RandomAccessFile file = new RandomAccessFile("archive.7z", "r");
try (IInArchive archive = SevenZip.openInArchive(null, // autodetect format
        new RandomAccessFileInStream(file))) {

    for (ISimpleInArchiveItem item : archive.getSimpleInterface().getArchiveItems()) {
        System.out.println(item.getPath() + "  (" + item.getSize() + " bytes)");
    }
}

Want more? Every example on this site is a real, tested program — its output is verified by the test suite on every release. Browse the code snippets →


Platforms

12 native builds, verified on real systems

Ship -all-platforms and forget about it — or pick a single platform jar to keep your artifact small.

Windowsx86 · amd64
Linux (glibc)i386 · amd64 · ARM v5/v6/v7 · ARM64
Linux (musl / Alpine)amd64 · ARMv7 · ARM64
macOSuniversal — Intel + Apple Silicon
every build: 18/18 test bundles green runtime detection: OS · arch · ARM level · glibc/musl

Latest release

23.01-2.2 · September 2026

7-Zip engine 23.01 · Java 8 baseline · XZ compression · Apple Silicon · musl/Alpine builds · runtime platform auto-detection

⚠️
Known security issue — CVE-2024-11477 (7-Zip Zstandard decompression, HIGH). The bundled 7-Zip engine (23.01) predates the upstream fix released in 7-Zip 24.07; processing untrusted Zstandard data may be affected — do not open/extract untrusted Zstandard input. Planned to be addressed by a later engine bump. Tracking: issue #72.