All formats

TAR libraries for Java

The JDK has no TAR support (only ZIP and GZIP), so Java code uses Apache Commons Compress. It reads ustar, pax, GNU and star archives, writes pax or GNU extensions for long names and big files, and gives both streaming (TarArchiveInputStream, TarArchiveOutputStream) and random access (TarFile). Combine it with the JDK’s GZIPInputStream or Commons Compress’s own bzip2, xz and zstd streams for compressed tar.