项目作者: jamescook

项目描述 :
Base32 encoder/decoder
高级语言: C
项目地址: git://github.com/jamescook/b32.git
创建时间: 2019-04-24T00:51:34Z
项目社区:https://github.com/jamescook/b32

开源协议:MIT License

下载


Base32 Encoder/Decoder

Travis Build

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

Usage

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

Benchmark

From Core i7 Macbook Pro (2014). Ruby 2.5.3

  1. user system total real
  2. base32 pure ruby (encode) 1.348343 0.000489 1.348832 ( 1.349179)
  3. base32 c extension (encode) 0.001638 0.000002 0.001640 ( 0.001629)
  4. base32 pure ruby (decode) 1.334840 0.000574 1.335414 ( 1.335513)
  5. 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.

  1. rake test

License

MIT