Recursively Call char_map/map2char on a List
These originally internal functions are exported because they are also useful
for reducing the size of e.g. a data frame before storing it to disk using
saveRDS
. This also improves the (de)serialization speed.
compress_chars( l, limit = 0L, compress_altreps = c("if_allocated", "yes", "no"), class = character() ) uncompress_chars(l, class = character())
l |
an object, typically a list |
limit |
the minimum length of a character vector for
|
compress_altreps |
should a character vector be compressed if it is an ALTREP? The default "if_allocated" only does so if the regular representation was already created. This was chosen as the default because in this case is is the regular representation which would be serialized. |
class |
additional classes to set on the |
Fully supported on Windows.
The object returned by compress_chars
might be an invalid S3
object, e.g. if l
is a data frame. These functions are intended to
be called immediately before and after (de)serializing the object, i.e.
compress -> serialize -> store/transfer -> de-serialize -> uncompress.
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.