deflate_decompress | R Documentation |
Decompress a raw DEFLATE stream to its original length.
deflate_decompress(decompressor, input, out_len)
decompressor |
An external pointer created by 'alloc_decompressor()'. |
input |
A raw vector containing the compressed DEFLATE stream. |
out_len |
Integer giving the expected uncompressed length (in bytes). |
A raw vector of length 'out_len' containing the decompressed data.
# round-trip example
msg = "Round-trip test: 123123123123"
raw_in = charToRaw(msg)
cmp = alloc_compressor(12L)
raw_cmp = deflate_compress(cmp, raw_in)
dcmp = alloc_decompressor()
raw_out = deflate_decompress(dcmp, raw_cmp, length(raw_in))
stopifnot(identical(raw_out, raw_in))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.