Displaying 1 result from an estimated 1 matches for "curlopt_accept_encoding".
2025 Apr 03
0
Enable compression in download.file()
...eroen.github.io/data/nycflights13.json'
tmp <- tempfile()
system.time(download.file(url, tmp, quiet = F)
system.time(curl::curl_download(url, tmp, quiet = F))
Because this is an uncompressed file, the gzipped download is about 7x faster.
For the solution see https://curl.se/libcurl/c/CURLOPT_ACCEPT_ENCODING.html :
> To aid applications not having to bother about what specific algorithms this particular libcurl build supports, libcurl allows a zero-length string to be set ("") to ask for an Accept-Encoding: header to be used that contains all built-in supported encodings.