if (requireNamespace("data.table", quietly = TRUE)) {
zfile <- tempfile(fileext = ".csv.zst")
zstd_out(data.table::fwrite, mtcars, file = zfile)
dt <- zstd_in(data.table::fread, file = zfile)
print(nrow(dt))
}
Run the code above in your browser using DataLab