Apache Commons Compress™The Apache Commons Compress library defines an API for working with ar, cpio, Unix dump, tar, zip, gzip, XZ, Pack200, bzip2, 7z, arj, LZMA, snappy, DEFLATE, lz4, Brotli, Zstandard, DEFLATE64 and Z files. The code in this component has many origins:
StatusThe current release requires Java 8 or above. For a list of changes see the Changes Report. DocumentationThe compress component is split into compressors and
archivers. While compressors
(un)compress streams that usually store a single
entry, archivers deal with archives that contain
structured content represented
by Currently the bzip2, Pack200, XZ, gzip, LZMA, brotli,
Zstandard and Z formats are
supported as compressors where gzip support is mostly provided by
the The ar, arj, cpio, dump, tar, 7z and zip formats are supported as archivers where the zip implementation provides capabilities that go beyond the features found in java.util.zip. As of Commons Compress 1.21 support for the dump and arj formats is read-only - 7z can read most compressed and encrypted archives but only write unencrypted ones. LZMA(2) support in 7z requires XZ for Java as well. The compress component provides abstract base classes for compressors and archivers together with factories that can be used to choose implementations by algorithm name. In the case of input streams the factories can also be used to guess the format and provide the matching implementation.
Releases |