decompressobj {zlib}R Documentation

Create a new decompressor object

Description

Initializes a new decompressor object for zlib-based decompression.

Usage

decompressobj(wbits = 0)

Arguments

wbits

The window size bits parameter. Default is 0.

Details

The returned decompressor object has methods for performing chunk-wise decompression on compressed data using the zlib library.

Value

A decompressor object with methods for decompression.

Methods

Examples

compressor <- zlib$compressobj(zlib$Z_DEFAULT_COMPRESSION, zlib$DEFLATED, zlib$MAX_WBITS + 16)
compressed_data <- compressor$compress(charToRaw("some data"))
compressed_data <- c(compressed_data, compressor$flush())
decompressor <- decompressobj(zlib$MAX_WBITS + 16)
decompressed_data <- c(decompressor$decompress(compressed_data), decompressor$flush())


[Package zlib version 1.0.3 Index]