Package io.github.connellite.compress
Class CompressFile
java.lang.Object
io.github.connellite.compress.CompressFile
GZIP compression and decompression for local files.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcompressGzipFile(File sourceFile, File gzipFile) Gzip-compresses a file and writes the result to another file.static voidcompressGzipFile(Path sourceFile, Path gzipFile) Gzip-compresses a file and writes the result to another file.static voiddecompressGzipFile(File gzipFile, File outputFile) Decompresses a.gzfile into a plain file.static voiddecompressGzipFile(Path gzipFile, Path outputFile) Decompresses a.gzfile into a plain file.
-
Constructor Details
-
CompressFile
public CompressFile()
-
-
Method Details
-
decompressGzipFile
Decompresses a.gzfile into a plain file.- Parameters:
gzipFile- gzip-compressed source file; must not benulloutputFile- destination file (created or overwritten); must not benull- Throws:
IOException- if reading or writing fails
-
decompressGzipFile
Decompresses a.gzfile into a plain file.- Parameters:
gzipFile- gzip-compressed source path; must not benulloutputFile- destination path (created or overwritten); must not benull- Throws:
IOException- if reading or writing fails
-
compressGzipFile
Gzip-compresses a file and writes the result to another file.- Parameters:
sourceFile- plain source file; must not benullgzipFile- destination gzip file (created or overwritten); must not benull- Throws:
IOException- if reading or writing fails
-
compressGzipFile
Gzip-compresses a file and writes the result to another file.- Parameters:
sourceFile- plain source path; must not benullgzipFile- destination gzip path (created or overwritten); must not benull- Throws:
IOException- if reading or writing fails
-