Learn R Programming

qs (version 0.27.3)

lz4_compress_raw: lz4 compression

Description

Compresses to a raw vector using the lz4 algorithm. Exports the main lz4 compression function.

Usage

lz4_compress_raw(x, compress_level)

Value

The compressed data as a raw vector.

Arguments

x

The object to serialize.

compress_level

The compression level used. A number > 1 (higher is less compressed).

Examples

Run this code
x <- 1:1e6
xserialized <- serialize(x, connection=NULL)
xcompressed <- lz4_compress_raw(xserialized, compress_level = 1)
xrecovered <- unserialize(lz4_decompress_raw(xcompressed))

Run the code above in your browser using DataLab