mem_inflate: Inflate a raw vector that was compressed

Description Usage Arguments Value Examples

Description

Inflate a raw vector that was compressed

Usage

1
mem_inflate(r_source, format, r_guess_size)

Arguments

r_source

raw vector of compressed data.

format

A character scalar indicating the type of compression that was applied. This must be one of "gzip", "zlib" or "raw".

r_guess_size

your best guess as to the size of uncompressed data. Not ideal, and this won't be necessary in future releases. Reember, this is a direct port from the defunct Rcompression package.

Aim high as you'll only get back the actual number of bytes in the uncompressed data.

Value

Raw vector of expanded data.

Examples

1
2
3
raw <- charToRaw("The quick brown fox jumps over the lazy dog.")
compressed <- mem_compress(raw, format = "gzip")
decompressed <- mem_inflate(compressed, format = "gzip", 1000)

hrbrmstr/gzmem documentation built on May 17, 2019, 5:08 p.m.