if(url.exists("https://www.omegahat.net/RCurl/xmlParse.html.gz")) {
buf = binaryBuffer()
# Now fetch the binary file.
getURI("https://www.omegahat.net/RCurl/xmlParse.html.gz",
write = getNativeSymbolInfo("R_curl_write_binary_data")$address,
file = buf@ref)
# Convert the internal data structure into an R raw vector
b = as(buf, "raw")
if (getRversion() >= "4")
txt = memDecompress(b, asChar = TRUE)
## or txt = Rcompression::gunzip(b)
}
Run the code above in your browser using DataLab