CompressionUtil
CompressionUtil
provides utility methods for compressing and decompressing files in various formats such as TAR.GZ and ZIP. It offers functionalities to compress multiple files into a single archive and to decompress archives into specified directories.
Methods
compressTarGzipFile(File: inputFile, String: outputFileName): File
compressTarGzipFile(File: inputFile, String: outputFileName): File
Compresses file into a single TAR.GZ file.
@paraminputFiles
— - A file path to be compressed.
@paramoutputFileName
— - The name of the output TAR.GZ file.
@returns — The File with the compressed ZIP file.
compressTarGzipFiles(File[]: inputFiles, String: outputFileName): File
compressTarGzipFiles(File[]: inputFiles, String: outputFileName): File
Compresses multiple files into a single TAR.GZ file.
@paraminputFiles
— - An array of file paths to be compressed.
@paramoutputFileName
— - The name of the output TAR.GZ file.
@returns — The File with the compressed ZIP file.
compressZipFile(File: inputFile, String: outputFileName): File
compressZipFile(File: inputFile, String: outputFileName): File
Compresses file into a single ZIP file.
@paraminputFile
— - A file path to be compressed.
@paramoutputFileName
— - The name of the output ZIP file.
@returns — The File with the compressed ZIP file.
compressZipFiles(File[]: inputFiles, String: outputFileName): File
compressZipFiles(File[]: inputFiles, String: outputFileName): File
Compresses multiple files into a single ZIP file.
@paraminputFiles
— - An array of file paths to be compressed.
@paramoutputFileName
— - The name of the output ZIP file.
@returns — The File with the compressed ZIP file.
decompressTarGzipFile(File: inputFiles, String: outputDirName): File
decompressTarGzipFile(File: inputFiles, String: outputDirName): File
Decompresses a TAR.GZ file into a specified directory.
@paraminputFile
— - The path of the TAR.GZ file to be decompressed.
@paramoutputDirName
— - The name of the output directory.
@returns — A File path of the output directory.
decompressZipFile(File: inputFiles, String: outputDirName): File
decompressZipFile(File: inputFiles, String: outputDirName): File
Decompresses a ZIP file into a specified directory.
@paraminputFile
— - The path of the ZIP file to be decompressed.
@paramoutputDirName
— - The name of the output directory.
@returns — A File path of the output directory.
Last updated