Class CompressFile

java.lang.Object
io.github.connellite.compress.CompressFile

public class CompressFile extends Object
GZIP compression and decompression for local files.
  • Constructor Details

    • CompressFile

      public CompressFile()
  • Method Details

    • decompressGzipFile

      public static void decompressGzipFile(File gzipFile, File outputFile) throws IOException
      Decompresses a .gz file into a plain file.
      Parameters:
      gzipFile - gzip-compressed source file; must not be null
      outputFile - destination file (created or overwritten); must not be null
      Throws:
      IOException - if reading or writing fails
    • decompressGzipFile

      public static void decompressGzipFile(Path gzipFile, Path outputFile) throws IOException
      Decompresses a .gz file into a plain file.
      Parameters:
      gzipFile - gzip-compressed source path; must not be null
      outputFile - destination path (created or overwritten); must not be null
      Throws:
      IOException - if reading or writing fails
    • compressGzipFile

      public static void compressGzipFile(File sourceFile, File gzipFile) throws IOException
      Gzip-compresses a file and writes the result to another file.
      Parameters:
      sourceFile - plain source file; must not be null
      gzipFile - destination gzip file (created or overwritten); must not be null
      Throws:
      IOException - if reading or writing fails
    • compressGzipFile

      public static void compressGzipFile(Path sourceFile, Path gzipFile) throws IOException
      Gzip-compresses a file and writes the result to another file.
      Parameters:
      sourceFile - plain source path; must not be null
      gzipFile - destination gzip path (created or overwritten); must not be null
      Throws:
      IOException - if reading or writing fails