Java – Decompress a Gzip file
In previous article, we show how to compress a file in Gzip format. This article shows how to decompress a Gzip file. We copy the GZIPInputStream into a FileOutputStream to decompress a Gzip file. Instead, we can use NIO File.copy to copy a file. Also we can decompress a Gzip file into a byte[] directly without saving it into a local file.