The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

b32

extendr

R-CMD-check

b32 provides fast, vectorized base32 encoding and decoding with zero dependencies powered by rust 🦀

[!TIP]

Need base64 instead? Check out {b64}.

Installation

You can install the development version of b32 like so:

pak::pak("extendr/b32")

Example

Encode to base32 using encode():

library(b32)

encoded <- encode(c("Hello", "from", "extendr"))
encoded
#> [1] "91JPRV3F"     "CSS6YV8"      "CNW78SBECHS0"

Decode using decode_as_string() to get back your original string:

decode_as_string(encoded)
#> [1] "Hello"   "from"    "extendr"

You can also decode to raw vectors with decode() which returns a "blob" object. The blob package is only a suggested dependency, but if you attach it, its print method will be used:

library(blob)

decode(encoded)
#> <blob[3]>
#> [1] blob[5 B] blob[4 B] blob[7 B]

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.