Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/poissonconsulting/flobr

An R package to convert files to and from Binary Objects (BLOBs)
https://github.com/poissonconsulting/flobr

blob cran flob r rstats

Last synced: 28 days ago
JSON representation

An R package to convert files to and from Binary Objects (BLOBs)

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
[![R-CMD-check](https://github.com/poissonconsulting/flobr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/poissonconsulting/flobr/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/poissonconsulting/flobr/graph/badge.svg)](https://app.codecov.io/gh/poissonconsulting/flobr)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/license/mit/)
[![CRAN status](https://www.r-pkg.org/badges/version/flobr)](https://cran.r-project.org/package=flobr)
![CRAN Downloads](https://cranlogs.r-pkg.org/badges/flobr)

# flobr

## Introduction

`flobr` is an R package to convert files to and from flobs.

A flob is a file that was
read into binary in integer-mode as little endian,
saved as the single element of a named list (where the name is the name of the original file including its extension) and then serialized before being coerced into a blob.

Flobs are useful for writing and reading files to and from databases.

## Demonstration

```{r}
library(flobr)

path <- system.file("extdata", "flobr.pdf", package = "flobr")

flob <- flob(path)
str(flob)
flob_name(flob)
flob_ext(flob)

unflob(flob, tempdir())

all.equal(flob, flob(file.path(tempdir(), "flobr.pdf")), check.attributes = FALSE)
```

## Installation

To install the latest release from [CRAN](https://cran.r-project.org)
```r
install.packages("flobr")
```

To install the developmental version from [GitHub](https://github.com/poissonconsulting/flobr)
```r
# install.packages("remotes")
remotes::install_github("poissonconsulting/flobr")
```

## Creditation

The [blob](https://github.com/tidyverse/blob) package.

The hex was designed by [The Forest](https://www.theforest.ca/).

## Contribution

Please report any [issues](https://github.com/poissonconsulting/flobr/issues).

[Pull requests](https://github.com/poissonconsulting/flobr/pulls) are always welcome.

## Code of Conduct

Please note that the flobr project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html).
By contributing to this project, you agree to abide by its terms.