GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - esl/base16: The last time I hexadecimify Erlang binaries...

BranchesTags
Open more actions menu

Latest commit

 

History

27 Commits
27 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
src
src
 
 
test
test
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
rebar.config
rebar.config
 
 
rebar.lock
rebar.lock
 
 
rebar.test.config
rebar.test.config
 
 

Repository files navigation

Base16 encoding and decoding

Actions Status codecov Hex

API

Both encode/1 and decode/1 functions are of (binary()) -> binary() type.

The usage looks like:

B = crypto:rand_bytes(10).
H = base16:encode(B).
B = base16:decode(H).

Please, note:

  • base16:encode/1 returns lower-case letters.
  • base16:decode/1 requires the argument to be a binary of odd-number size, and it parses both in upper-case or lower-case encoding.

Implementation

Code is implemented using lookup tables, which tremendously speeds-up the algorithm and consumes constant memory. It's the fastest you can get using pure Erlang code!

NOTE

Note that, lookup tables also means that the code-size is bigger. If you're running on embedded, where smaller code-sizes are the actual best, you might benefit from using the version 1.0.0, both available on github and hex.

License

The library itself is licensed under the MIT License.

The tests, due to dependency on PropEr, are licensed under the GPLv3 license.

About

The last time I hexadecimify Erlang binaries...

tools.ietf.org/html/rfc4648

Topics

base16erlanghexadecimalhexadecimal-converterrfc-4648rfc4648

Resources

Readme
MIT license
Activity
Custom properties

Stars

3 stars

Watchers

2 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.