% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/qx_functions.R
\name{qs_save}
\alias{qs_save}
\title{qs_save}
\usage{
qs_save(object, file,
         compress_level = qopt("compress_level"),
         shuffle = qopt("shuffle"),
         nthreads = qopt("nthreads"))
}
\arguments{
\item{object}{The object to save.}

\item{file}{The file name/path.}

\item{compress_level}{The compression level used (the initial value is 3L).

The maximum and minimum possible values depend on the version of the ZSTD library used.
As of ZSTD 1.5.7 the maximum compression level is 22, and the minimum is -131072.
Usually, values in the low positive range offer very good performance in terms
of speed and compression.}

\item{shuffle}{Whether to allow byte shuffling when compressing data (the initial value is TRUE).}

\item{nthreads}{The number of threads to use when compressing data (the initial value is 1L). When TBB is not available, values greater than 1 emit a warning and fall back to 1.}
}
\value{
No value is returned. The file is written to disk.
}
\description{
Saves an object to disk using the \code{qs2} format.
}
\examples{
x <- data.frame(int = sample(1e3, replace=TRUE),
         num = rnorm(1e3),
         char = sample(state.name, 1e3, replace=TRUE),
         stringsAsFactors = FALSE)
myfile <- tempfile()
qs_save(x, myfile)
x2 <- qs_read(myfile)
identical(x, x2) # returns TRUE
}
