This function has an advantage over the other ones as it does not require the caller to read in the entire contents of a file or URL all at once, thus saving memory at a tiny hit to speed.

hash_con(con, buffer_size = 32768L)

Arguments

con

a connection

buffer_size

(int) how big of a read buffer to use? This is the "chunk size" for each call to readBin().

Value

data frame

Examples

# All 3 shld be the same
hash_con(url("https://en.wikipedia.org/wiki/Donald_Knuth"))
hash_con(file(system.file("knuth", "local.html", package = "ssdeepr")))
hash_con(gzfile(system.file("knuth", "local.gz", package = "ssdeepr")))