Apache Commons logo Commons Compress

This page lists the known limitations and problems of Apache Commons Compress™ grouped by the archiving/compression format they apply to.

7Z

  • the format requires the otherwise optional XZ for Java library.
  • only Files are supported as input/output, not streams. In Compress 1.7 ArchiveStreamFactory will not auto-detect 7z archives, starting with 1.8 it will throw a StreamingNotSupportedException when reading from a 7z archive.
  • Encryption, solid compression, header compression and LZMA (not LZMA2) are only supported when reading archives
  • Several of the "methods" supported by 7z are not implemented in Compress.
  • No support for multi-volume archives
  • Support for some BCJ filters and the DELTA filter has been added with Compress 1.8. Because of a known bug in version 1.4 of the XZ for Java library, archives using BCJ filters will cause an AssertionError when read. If you need support for BCJ filters you must use XZ for Java 1.5 or later.

AR

AR archives can not contain directories - this is a limitation of the format rather than one of Compress' implementation.

  • file names longer than 16 characters are only fully supported using the BSD dialect, the GNU/SRV4 dialect is only supported when reading archives.

ARJ

  • read-only support
  • no support for compression, encryption or multi-volume archives

BZIP2

We are not aware of any problems.

Versions of Compress prior to 1.4.1 are vulnerable to a possible denial of service attack, see the Security Reports page for details.

CPIO

We are not aware of any problems.

DEFLATE

  • CompressorStreamFactory is not able to auto-detect streams using DEFLATE compression.

DUMP

  • read-only support
  • only the new-fs format is supported
  • the only compression algorithm supported is zlib

GZIP

We are not aware of any problems.

JAR

JAR archives are special ZIP archives, all limitations of ZIP apply to JAR as well.

  • ArchiveStreamFactory cannot tell JAR archives from ZIP archives and will not auto-detect JARs.
  • Compress doesn't provide special access to the archive's MANIFEST

LZMA

  • the format requires the otherwise optional XZ for Java library.
  • read-only support

PACK200

We are not aware of any problems.

SNAPPY

  • read-only support

TAR

  • sparse files can neither be read nor written
  • only a subset of the GNU and POSIX extensions are supported
  • In Compress 1.6 TarArchiveInputStream could fail to read the full contents of an entry unless the stream was wrapped in a bufferng stream.

XZ

  • the format requires the otherwise optional XZ for Java library.

Z

  • In Compress 1.7 and 1.8 CompressorStreamFactory is not able to auto-detect streams using .Z compression.
  • read-only support

ZIP

  • ZipArchiveInputStream is limited and may even return false contents in some cases, use ZipFile whenever possible. See the ZIP documentation page for details. This limitation is a result of streaming data vs using random access and not a limitation of Compress' specific implementation.
  • only a subset of compression methods are supported, including the most common STORED and DEFLATEd. IMPLODE and SHRINK support is read-only.
  • no support for encryption or multi-volume archives
  • In versions prior to Compress 1.6 ZipArchiveEntries read from an archive will contain non-zero millisecond values when using Java8 rather than the expected two-second granularity.
  • Compress 1.7 has a known bug where the very first entry of an archive will not be read correctly by ZipArchiveInputStream if it used the STORED method.