I'm trying to find settings for compression level in Apache Commons Compress lib for tar and gzip archive types.
Could you please tell is it supported by the library? If yes, how can I configure it?
You can't.
First, tar does not compress at all; it's simply an archive format.
Second, gzip uses a single compression type, deflate. Compression schemes that allow "levels" uses those levels to select between algorithms (or, in the case of lossy compression, how much information to discard).
tar is not a compressed format on its own, it just bundles multiple files into a single one (hence the name, the files stick together just like they were covered in tar).
You cannot change the compression level, if you need better compression, use bzip2 instead of gzip.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With