memCompress(from, type = c("gzip", "bzip2", "xz", "none")) memDecompress(from, type = c("unknown", "gzip", "bzip2", "xz", "none"), asChar = FALSE)
from | a raw vector or a character string to be compressed or decompressed. If memCompress is given a string vector of length greater and one, the strings are concatenated with a carriage return between them before they are compressed. |
type |
a character string. Indicates the compression type to be compressed or decompressed.
In memDecompress, if type is specified as "unknown", and if it is "bzip2" or "xz", the type is detected. Otherwise, memDecompress generates a warning and "none" is used. (The type "none" indicates that no compression or decompression is done.) |
asChar |
a logical value.
|
x <- memCompress("This is a test", "g") memDecompress(x, "g", asChar = TRUE)## can infer compression type for bzip2 x <- memCompress("This is a test", "bz") memDecompress(x, asChar = TRUE)