Introduction
XZ for Java aims to be a complete implementation of XZ data compression in pure Java.
Features:
-
Single-threaded streamed compression and decompression
-
Random access decompression
-
LZMA2, Delta, and BCJ filters
-
Support for the old .lzma format in addition to .xz
-
Raw compressed streams without any file format headers
Threading is planned but has not been implemented.
The main source code is Java 8 compatible. Module support and speed optimizations are available for Java 9 and later as multi-release JAR.
Documentation
The API documentation was generated from the latest release with javadoc.
Security issues
There are no known security issues.
It has been reported that some vulnerability scanners incorrectly
claim that one or more XZ Utils CVEs apply to XZ for Java.
Possibly the tools consider
XZ Utils’ CPE cpe:2.3:a:tukaani:xz
to match XZ for Java’s Maven coordinates org.tukaani:xz.
If one is unsure about the result from a vulnerability scanner,
one should look at the package version numbers
which differ considerably between XZ Utils and XZ for Java.
Releases
Version 1.11 was released on 2025-11-19. See the NEWS.md file for the summary of changes between versions.
The release files have been signed with this OpenPGP key.
Development
The Git repository is on GitHub:
git clone https://github.com/tukaani-project/xz-java
The repository is mirrored to git.tukaani.org as well.
Licensing
From the version 1.10 onwards, XZ for Java is under the BSD Zero Clause License (0BSD).
Version 1.9 and older are in the public domain.
Reporting bugs
Bugs can be reported on GitHub or via email or IRC. If a security issue has been discovered, please report it privately via email (encrypted if possible) or use the Report a vulnerability button in the security section on GitHub.