From kmb56 at berkeley.edu  Thu Dec 15 06:08:17 2016
From: kmb56 at berkeley.edu (Kenny Bell)
Date: Wed, 14 Dec 2016 21:08:17 -0800
Subject: [Rd] Parallel compression support for saving to rds/rdata files?
Message-ID: <CALOjXYSFfDo_gG6c3RqaYJ-A0Kzcpmkfa27_QkAGHKy1c8b8-Q@mail.gmail.com>

Hi,

I have tried to follow the instructions in the ``save`` documentation and
it doesn't seem to work (see below):

mydata <- do.call(rbind, rep(iris, 10000))
con <- pipe("pigz -p8 > fname.gz", "wb");
save(mydata, file = con); close(con) # This runs

R.utils::gunzip("fname.gz", "fname.RData", overwrite = TRUE)
load("fname.RData") # Error: error reading from connection

First question: Should the above work?

Second question: Is it possible to make this dummy friendly by allowing
"pigz" as an option for ``compress`` in saveRDS and save? And in such a way
that the decompressing is hidden from the user like normal?

Thanks!
Kenny


-- 
Kendon Bell
Email: kmb56 at berkeley.edu
Phone: (510) 612-3375

Ph.D. Candidate
Department of Agricultural & Resource Economics
University of California, Berkeley

	[[alternative HTML version deleted]]



[Rd] Parallel compression support for saving to rds/rdata files?
Kenny Bell