[Rd] Allow passing of a compression argument to saveRDS
Tim Taylor
t|m@t@y|or @end|ng |rom h|ddene|eph@nt@@co@uk
Wed May 20 17:23:06 CEST 2026
When `saveRDS()` is called and you are not using a connection, the compression value remains at the default for the underlying connection (i.e. 6 for `gzfile`, 9 for `bzfile`, 6 for `xzfile` and 9 for `zstdfile`). It would be convenient to be able to pass these values directly to `saveRDS()` without setting up a connection directly.
Hugo Gruson has kindly pointed that there was an off-list discussion of this topic prior/during one of the previous R dev days (see https://github.com/r-devel/r-dev-day/issues/89). Here there was also a similar (but more involved due to touching C code) request for memCompress to accept different levels of compression as an argument.
Raising here for discussion prior to submitting a 'wish' to bugzilla.
Best
Tim
More information about the R-devel
mailing list