Package 'lz4lite'

Title: Extremely Fast Compression with LZ4
Description: Extremely fast compression of R objects with LZ4.
Authors: mikefc
Maintainer: mikefc <[email protected]>
License: MIT + file LICENSE
Version: 0.2.0
Built: 2024-11-15 04:21:15 UTC
Source: https://github.com/coolbutuseless/lz4lite

Help Index


Compress a vector of raw, integer, real or logical values.

Description

Compress a vector of raw, integer, real or logical values.

Compress a vector of raw, integer, real or logical values.

Usage

lz4_compress(src, acceleration = 1)

lz4hc_compress(src, level = 9L)

lz4_compress(src, acceleration = 1)

lz4hc_compress(src, level = 9L)

Arguments

src

source vector containing data to be compressed. Data must be raw, integer, real or logical only.

acceleration

Acceleration, Default 1. Higher values run faster but with lower compression. This value is ignored if use_hc = TRUE

level

compression level for LZ4HC compression. default 9L. Valid range 3-12.

Value

raw vector of compressed data

raw vector of compressed data


Serialize arbitrary objects to a compressed stream of bytes using LZ4

Description

Serialize arbitrary objects to a compressed stream of bytes using LZ4

Usage

lz4_serialize(robj, acceleration = 1L)

lz4hc_serialize(robj, level = 9L)

lz4_unserialize(raw_vec)

Arguments

robj

Any R object understood by base::serialize()

acceleration

Default: 50

level

compression level. Default: 9. Valid range 3-12

raw_vec

Raw vector containing a compressed serialized representation of an R object

Value

serialized representation compressed into a raw byte vector


Uncompress a raw vector into the original data.

Description

The src vector must be a raw vector created by lz4_compress as it relies on the bespoke framing created there. This function will not decompress an object compressed with another LZ4 implementation e.g. fst

The src vector must be a raw vector created by lz4_compress as it relies on the bespoke framing created there. This function will not decompress an object compressed with another LZ4 implementation e.g. fst

Usage

lz4_uncompress(src)

lz4_uncompress(src)

Arguments

src

raw vector of compressed data

Value

uncompressed vector

uncompressed vector