Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/niamtokik/berl32

Quick and Dirty Crockford Base32 Erlang Implementation
https://github.com/niamtokik/berl32

base32 crockford encoding erlang

Last synced: 23 days ago
JSON representation

Quick and Dirty Crockford Base32 Erlang Implementation

Awesome Lists containing this project

README

        

# berl32

Quick and Dirty Crockford Base32 Erlang Implementation

## Build

$ rebar3 compile

## Encoding

> berl32:encode("*").
{ok,<<"1A">>}

> berl32:encode(<<"*">>).
{ok,<<"1A">>}

> berl32:encode("test").
{ok,<<"1T6AWVM">>}

> berl32:encode(<<"test">>).
{ok,<<"1T6AWVM">>}

> berl32:encode(<<18446744073709551615:64/integer>>).
{ok, <<"FZZZZZZZZZZZZ">>}

## Decoding

> berl32:decode(<<"1A">>).
{ok,<<"*">>}

> berl32:decode("1A").
{ok, <<"*">>}

> berl32:decode(<<"FZZZZZZZZZZZZZZ">>).
{ok,<<"ÿÿÿÿÿÿÿÿÿ">>}

## Todo

* add checksum/control character support
* add more unit test
* add more documentation
* add profiling and benchmarking