Project

b32

0.0
No commit activity in last 3 years
No release in over 3 years
Base32 Ruby C Extension
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

Base32 Encoder/Decoder

Travis Build

B32 is a Ruby native extension that wraps the base32 library found in tpmtotop

Usage

require 'b32'
encoded = B32.encode('My string')
decoded = B32.decode(encoded)

Benchmark

From Core i7 Macbook Pro (2014). Ruby 2.5.3

                                     user     system      total        real
     base32 pure ruby (encode)   1.348343   0.000489   1.348832 (  1.349179)
   base32 c extension (encode)   0.001638   0.000002   0.001640 (  0.001629)
     base32 pure ruby (decode)   1.334840   0.000574   1.335414 (  1.335513)
   base32 c extension (decode)   0.003613   0.000331   0.003944 (  0.003933)

Requirements

  • Ruby 2.2+
  • gcc/clang

Developing

Simply make your changes and re-run the tests. Compilation is automatic.

rake test

License

MIT