% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/download.R
\name{cblib_download}
\alias{cblib_download}
\title{Download a Single CBLIB Instance}
\usage{
cblib_download(
  instance,
  folder,
  url = .CBLIB_DOWNLOAD_ALL_URL,
  method = NULL,
  quiet = TRUE,
  force = FALSE,
  decompress = TRUE,
  keep_archive = !decompress
)
}
\arguments{
\item{instance}{Character string. Instance name, with or without the
\code{.cbf.gz} suffix.}

\item{folder}{Character string. Destination directory. No default is
provided; pass \code{tempdir()} for a temporary location.}

\item{url}{Character string. Base URL of the CBLIB download directory.}

\item{method}{Character string passed to \code{\link[utils]{download.file}}.}

\item{quiet}{Logical. Passed to \code{\link[utils]{download.file}}.}

\item{force}{Logical. If \code{TRUE}, download again even if the target file
already exists.}

\item{decompress}{Logical. If \code{TRUE} (default), decompress the archive
to \code{.cbf} after download.}

\item{keep_archive}{Logical. If \code{TRUE}, keep the downloaded
\code{.cbf.gz} archive after decompression.}
}
\value{
Character string giving the path to the downloaded file. Returns the
  decompressed \code{.cbf} path when \code{decompress = TRUE}, otherwise the
  \code{.cbf.gz} archive path.
}
\description{
Downloads one Conic Benchmark Library (CBLIB) instance from
\url{https://cblib.zib.de/download/all/}. By default the downloaded
\code{.cbf.gz} archive is decompressed to a plain \code{.cbf} file so it can
be passed directly to \code{\link{read_cbf}}.
}
\details{
The CBLIB download README documents recursive retrieval from
\url{https://cblib.zib.de/download/all/} using \code{wget}. These helpers
provide the same access pattern directly from R for either a single instance
or the full directory listing.
}
\examples{
\dontrun{
path <- cblib_download("CBLIB_ex1.cbf", folder = tempdir())
op   <- read_cbf(path)
}

}
\seealso{
\code{\link{cblib_download_all}}, \code{\link{read_cbf}}
}
