powered by
Uncompress a raw GZIP stream
inflate(buffer, pos = 1L, size = NULL)
Named list with three entries:
output: raw vector, the uncompressed data,
output
bytes_read: number of bytes used from buffer,
bytes_read
buffer
bytes_written: number of bytes written to the output buffer.
bytes_written
Raw vector, containing the data to uncompress.
Start position of data to uncompress in buffer.
Uncompressed size estimate, or NULL. If not given, or too small, the output buffer is resized multiple times.
NULL
base::memDecompress() does the same with type = "gzip", but it does not tell you the number of bytes read from the input.
base::memDecompress()
type = "gzip"
data_gz <- deflate(charToRaw("Hello world!")) inflate(data_gz$output)
Run the code above in your browser using DataLab