The path to the source file.
Optional
dest: null | PathLikeThe path to the destination file. If omitted, it will be generated by appending the appropriate file extension to the source file path.
Optional
options: CompressFileOptionsCompression options.
The path to the compressed file.
Compress a file using the specified compression algorithm.
The destination file path can be omitted, in which case it will be generated by appending the appropriate file extension to the source file path.
By default, the source file will be deleted after compression. This can be changed by setting the
keepSource
option totrue
.Supported compression algorithms are Brotli, Gzip, and Zstd.