Learn R Programming

qs2 (version 0.1.6)

zstd_compress_file: Zstd file compression

Description

A utility function to compresses a file with zstd.

Usage

zstd_compress_file(input_file, output_file, compress_level = qopt("compress_level"))

Value

No value is returned. The file is written to disk.

Arguments

input_file

Path to the file to compress.

output_file

Path for the compressed file.

compress_level

The compression level used.

Examples

Run this code
infile <- tempfile()
writeBin(as.raw(1:5), infile)
outfile <- tempfile()
zstd_compress_file(infile, outfile, compress_level = 1)
stopifnot(file.exists(outfile))

Run the code above in your browser using DataLab