Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeroen/brotli
https://github.com/jeroen/brotli
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jeroen/brotli
- Owner: jeroen
- License: other
- Created: 2015-09-22T11:13:31.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-10-03T18:18:34.000Z (about 1 month ago)
- Last Synced: 2024-10-11T18:19:49.329Z (25 days ago)
- Language: C
- Size: 2.69 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: NEWS
- License: LICENSE
Awesome Lists containing this project
README
# brotli
##### *A New Format for Lossless and Lossy Image Compression*
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/brotli)](http://cran.r-project.org/package=brotli)
[![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/brotli)](https://cran.r-project.org/package=brotli)> 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:
- Vignette: [Text Compression in R: brotli, gzip, xz and bz2](https://cran.r-project.org/web/packages/brotli/vignettes/benchmarks.html)
Other resources:
- [RFC 7932: Brotli Compressed Data Format](https://www.rfc-editor.org/rfc/rfc7932)
- [Comparison of Brotli, Deflate, Zopfli, LZMA, LZHAM and Bzip2 Compression Algorithms](https://cran.r-project.org/web/packages/brotli/vignettes/brotli-2015-09-22.pdf)## Hello World
```r
# 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:
```r
install.package("brotli")
```