Closed cldsnchz closed 5 years ago
Yes, it's possible to extract gzip compressed files. Unfortunately compressors aren't reconciled with the Archiver API nicely, but you can use the Compressor
interface.
Compressor compressor = CompressorFactory.createCompressor(logFile)
compressor.decompress(logFile, new File("path/to/target.txt"));
Perfect, worked fine. Thanks!
Is it possible to extract a .gz file (not .tar.gz)?
I get
Unknown archive file extension .gz
when callArchiver logArchiver = ArchiverFactory.createArchiver(logFile);
I tried several combinations but couldn't find a way to generate an Archiver that works for only .gz files.