https://github.com/pepijn-devries/blosc
R package for compressing and decompressing data with BLOSC
https://github.com/pepijn-devries/blosc
Last synced: 3 months ago
JSON representation
R package for compressing and decompressing data with BLOSC
- Host: GitHub
- URL: https://github.com/pepijn-devries/blosc
- Owner: pepijn-devries
- License: gpl-3.0
- Created: 2025-07-17T10:06:13.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2025-12-07T11:04:01.000Z (6 months ago)
- Last Synced: 2025-12-08T21:35:56.837Z (6 months ago)
- Language: C++
- Homepage: https://pepijn-devries.github.io/blosc/
- Size: 1.72 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "50%",
fig.width = 5,
fig.height = 4
)
```
# BLOSC 
[](https://github.com/pepijn-devries/blosc/actions/workflows/R-CMD-check.yaml)
[](https://CRAN.R-project.org/package=blosc)
[](https://cran.r-project.org/web/checks/check_results_blosc.html)
[](https://pepijn-devries.r-universe.dev/blosc)
[](https://app.codecov.io/gh/pepijn-devries/blosc)
[Blosc](https://www.blosc.org/) is a blocking, shuffling and lossless compression
algorithm. It is often used to compress n-dimensional structured
array data. It is applied (among others) in the geo-spatial
[zarr](https://zarr.dev/) file format. This package ports BLOSC compressors and
decompressors to R.
## Installation
Install latest developmental version from R-Universe:
``` r
install.packages("blosc", repos = c('https://pepijn-devries.r-universe.dev', 'https://cloud.r-project.org'))
```
MacOS users may first need to install system requirements before installing the package using:
```r
source("https://mac.R-project.org/bin/install.R")
install.libs("blosc")
```
## Example
The blosc package can be used to compress `raw` data, but also vectors of
other data types. The example below shows how data from the volcano matrix
can be compressed with blosc.
```{r example1}
library(blosc)
volcano_compressed <-
blosc_compress(volcano, typesize = 2L, dtype = "