is_compressed: is_compressed
Description
Helper function for is_rdata, checks if the file is a compressed (gzip) file. Does not (yet) check for bzip2 or xz compression.
Usage
is_compressed(filename, magic.number = as.raw(c("0x1f", "0x8b")))Arguments
filename
The filename of the file to test for magic compression codes
magic.number
The magic numbers in as a vector of strings with the hexidecimal numbers (e.g. "0x1f")
Value
boolean, TRUE if the file is compressed