README.md

brotli

A New Format for Lossless and Lossy Image Compression

CRAN_Status_Badge CRAN RStudio mirror downloads

A lossless compressed data format that uses a combination of the LZ77 algorithm and Huffman coding. Brotli is similar in speed to deflate (gzip) but offers more dense compression.

Documentation

About the R package:

Other resources:

Hello World

# Simple example
myfile <- file.path(R.home(), "COPYING")
x <- readBin(myfile, raw(), file.info(myfile)$size)
y <- brotli_compress(x)
stopifnot(identical(x, brotli_decompress(y)))

# Compare to other algorithms
length(x)
length(brotli_compress(x))
length(memCompress(x, "gzip"))
length(memCompress(x, "bzip2"))
length(memCompress(x, "xz"))

Installation

The libbrotli source code is bundled with the package:

install.package("brotli")


jeroenooms/brotli documentation built on Oct. 20, 2022, 1:38 a.m.