compressFile

fun compressFile(relativePath: String, compressorName: String, keepOriginal: Boolean = false): Path

Compresses a file relative to context.outPaths.hostRoot.

The compressed file will be written to the same filename suffixed with a compressor-dependent file extension.

Parameters

compressorName

The compressor to compress the file with. See CompressorStreamFactory[https://commons.apache.org/proper/commons-compress/apidocs/org/apache/commons/compress/compressors/CompressorStreamFactory.html] for a list of supported compressors.

keepOriginal

Whether to keep the original file after compression.