compress
fun Path.compress(compressorName: String, fileExtension: String? = null, readOptions: Array<OpenOption> = emptyArray(), writeOptions: Array<OpenOption> = emptyArray()): Path
Compresses a file and outputs it in the same directory.
Parameters
compressorName
The name of the compressor to use.
fileExtension
File extension to append to the name of the compressed file. Defaults to the file extension returned by mapCompressorExtension if null
.
readOptions
The options to use when opening the input file for reading.
writeOptions
The options to use when opening the output file for writing.