Learn R Programming

qs (version 0.25.2)

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)

Arguments

x

The object to serialize.

compress_level

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

Value

The compressed data as a raw vector.

Examples

Run this code
# NOT RUN {
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