I\'m not overly familiar with tar, so, this may be a stupid question, but I have a situation where I want to grab a tarball from the server (preferably compressed, but that\'s n
Noting down another option here,
Library Name : Apache Commons Compress Apache License, Version 2.0
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.
Example here: Java TAR example – compress and decompress *.tar or *.tar.gz files This demonstrates how to compress files or directories recursively in .tar or .tar.gz format and how to decompress a .tar or .tar.gz file