Closed mdsumner closed 7 years ago
Yeehar, Z-compressed files here we come!
Hmm. Maybe. The underlying (compressed) file still needs to be a supported archive format (https://github.com/libarchive/libarchive/wiki/LibarchiveFormats). So Z-compressed binary or netCDF don't seem to work out of the box. Maybe we can leverage just the Z-decompression (e.g. https://github.com/libarchive/libarchive/wiki/FormatRaw) but I'm not sure this is possible through Jim's bindings yet.
I was thinking of the decompression to stand-alone, not streaming from the archive - this is still a step up from system calls right?
Sure, I just don't see how to do it (yet)!
Update: now have file_read
which can be used to decompress .Z files:
ff <- file_read("20160101.nc.Z")
writeBin(readBin(ff,"raw",10e7),"20160101.nc")
close(ff)
Implemented: repo config entries can now specify "uncompress" or "uncompress_delete" as a postprocessing step. The CERSAT sea ice default definition has been updated to use this.
https://github.com/jimhester/archive