R/has_binary_null.R

Defines functions has_binary_null

has_binary_null <- function(path, n = 2048L) {
  con <- gzfile(path, open = "rb")
  on.exit(close(con))
  hdr <- readBin(con, what = "raw", n = n)
  any(hdr == 0)
}
2DegreesInvesting/PACTA_analysis documentation built on April 19, 2023, 6:42 p.m.