alloc_compressor | R Documentation |
Create a new libdeflate compressor at the specified compression level.
alloc_compressor(level = 6L)
level |
Default '6L'. Integer in [0, 12] giving the compression level (0 = no compression, 1 = fastest, 6 = default, 12 = slowest). |
An external pointer ('externalptr') to a libdeflate compressor.
[base::memDecompress()] also provides DEFLATE compression via libdeflate, but it fixes the compression level at 6. # allocate a compressor and compress a simple string cmp = alloc_compressor() raw_in = charToRaw("Example data") raw_cmp = deflate_compress(cmp, raw_in) stopifnot(is.raw(raw_cmp))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.