inflate: Uncompress a raw GZIP stream

View source: R/inflate.R

inflateR Documentation

Uncompress a raw GZIP stream

Description

Uncompress a raw GZIP stream

Usage

inflate(buffer, pos = 1L, size = NULL)

Arguments

buffer

Raw vector, containing the data to uncompress.

pos

Start position of data to uncompress in buffer.

size

Uncompressed size estimate, or NULL. If not given, or too small, the output buffer is resized multiple times.

Value

Named list with three entries:

  • output: raw vector, the uncompressed data,

  • bytes_read: number of bytes used from buffer,

  • bytes_written: number of bytes written to the output buffer.

See Also

base::memDecompress() does the same with type = "gzip", but it does not tell you the number of bytes read from the input.

Examples

data_gz <- deflate(charToRaw("Hello world!"))
inflate(data_gz$output)

zip documentation built on April 17, 2023, 5:08 p.m.

Related to inflate in zip...