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.
About the R package:
# Simple examplemyfile <- 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 algorithmslength(x)length(brotli_compress(x))length(memCompress(x, "gzip"))length(memCompress(x, "bzip2"))length(memCompress(x, "xz"))
libbrotli source code is bundled with the package: