This repository has been archived by the owner. It is now read-only.
LZ4 Data Compression and Decompression for R
C R C++
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
R
man
src
tests
.Rbuildignore
.lintr
.travis.yml
DESCRIPTION
LICENSE
NAMESPACE
README.md

README.md

DEFUNCT

This package will not be maintained. Instead, use the better 'fst' package, see http://www.fstpackage.org/, which now includes faster and better in-memory compression methods fst::compress_fst and fst::decompress_fst covered here, as well as several file-based compression options.

Note that neither this package nor the fst package include proper streaming options to arbitrary connections...something someone should add to fst!

lz4 Data Compression/Decompression Functions

Installation

Easiest to install with the devtools package:

devtools::install_github("bwlewis/lz4")

library(lz4)
?lzCompress

TODO

Add data streaming functions! ANYONE WANT TO HELP ADD THESE?

Overview of the lz4 algorithms

LZ4 is lossless compression algorithm, providing compression speed at 400 MB/s per core (0.16 Bytes/cycle). It features an extremely fast decoder, with speed in multiple GB/s per core (0.71 Bytes/cycle).

References

At least two other R packages, the http://www.bioconductor.org/packages/release/bioc/html/gdsfmt.html package from the Bioconductor, and https://github.com/fstPackage, use the lz4 library. However both packages are sufficiently specialized implementation that I decided to write this much simpler, limited package with a focus only on compression to promote software modularity.

See http://www.lz4.org for more on lz4.

Status

Travis CI status

The code coverage is too damn low!

Because we're using a tiny fraction of the lz4 library capabilities, but checking all library lines of code. This is just an incentive to implement more of the lz4 functionality at the R level!