All Projects → mr-tron → base58

mr-tron / base58

Licence: MIT license
Fast implementation of base58 encoding on golang.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to base58

Pbf
A low-level, lightweight protocol buffers implementation in JavaScript.
Stars: ✭ 618 (+410.74%)
Mutual labels:  fast, encoding
base58
fast/simple Base58 encoding/decoding in golang.
Stars: ✭ 39 (-67.77%)
Mutual labels:  fast, base58
scure-base
Secure, audited & 0-deps implementation of bech32, base64, base32, base16 & base58
Stars: ✭ 27 (-77.69%)
Mutual labels:  encoding, base58
multibase
multi base encoding/decoding utility
Stars: ✭ 15 (-87.6%)
Mutual labels:  encoding, base58
FastHttpClient
封装OkHttp3,对外提供了POST请求、GET请求、上传文件、下载文件、https请求、cookie管理等功能
Stars: ✭ 60 (-50.41%)
Mutual labels:  fast
stone paper scissor defeator using opencv keras
In this repository i tried to replicate a cool project by a japanese scientist who made a machine which had 100 % accuracy in defeating humans in the game of stone-paper and scissors
Stars: ✭ 22 (-81.82%)
Mutual labels:  fast
react-redux-fork
React Redux, but just up to 98x faster. (Forked from 6.0) Make React Redux great again!
Stars: ✭ 62 (-48.76%)
Mutual labels:  fast
DiffEqPhysics.jl
A library for building differential equations arising from physical problems for physics-informed and scientific machine learning (SciML)
Stars: ✭ 46 (-61.98%)
Mutual labels:  fast
deen
Generic data DEcoding/ENcoding application built with PyQt5.
Stars: ✭ 45 (-62.81%)
Mutual labels:  encoding
better-serializer
General serializer for PHP. An alternative to JmsSerializer.
Stars: ✭ 27 (-77.69%)
Mutual labels:  fast
gologger
A concurrent, fast queue/service worker based filesystem logging system perfect for servers with concurrent connections
Stars: ✭ 16 (-86.78%)
Mutual labels:  fast
hash-wasm
Lightning fast hash functions using hand-tuned WebAssembly binaries
Stars: ✭ 382 (+215.7%)
Mutual labels:  fast
urdu-characters
📄 Complete collection of Urdu language characters & unicode code points.
Stars: ✭ 24 (-80.17%)
Mutual labels:  encoding
h264-roi
H.264 video Region of Interest encoding tool, using x264
Stars: ✭ 44 (-63.64%)
Mutual labels:  encoding
ormsgpack
Msgpack serialization/deserialization library for Python, written in Rust using PyO3 and rust-msgpack. Reboot of orjson. msgpack.org[Python]
Stars: ✭ 88 (-27.27%)
Mutual labels:  fast
go-kml
Package kml provides convenience methods for creating and writing KML documents.
Stars: ✭ 67 (-44.63%)
Mutual labels:  encoding
wotpp
A small macro language for producing and manipulating strings.
Stars: ✭ 75 (-38.02%)
Mutual labels:  fast
framework
Cygnite PHP Framework- A Modern Toolkit For Web Developers
Stars: ✭ 43 (-64.46%)
Mutual labels:  fast
harsh
Hashids implementation in Rust
Stars: ✭ 48 (-60.33%)
Mutual labels:  encoding
XDP-Firewall
An XDP firewall that is capable of filtering specific packets based off of filtering rules specified in a config file. IPv6 is supported!
Stars: ✭ 129 (+6.61%)
Mutual labels:  fast

Fast Implementation of Base58 encoding

GoDoc Go Report Card Used By

Fast implementation of base58 encoding in Go.

Base algorithm is adapted from https://github.com/trezor/trezor-crypto/blob/master/base58.c

Benchmark

  • Trivial - encoding based on big.Int (most libraries use such an implementation)
  • Fast - optimized algorithm provided by this module
BenchmarkTrivialBase58Encoding-4          123063              9568 ns/op
BenchmarkFastBase58Encoding-4             690040              1598 ns/op

BenchmarkTrivialBase58Decoding-4          275216              4301 ns/op
BenchmarkFastBase58Decoding-4            1812105               658 ns/op

Encoding - faster by 6 times

Decoding - faster by 6 times

Usage example

package main

import (
	"fmt"
	"github.com/mr-tron/base58"
)

func main() {

	encoded := "1QCaxc8hutpdZ62iKZsn1TCG3nh7uPZojq"
	num, err := base58.Decode(encoded)
	if err != nil {
		fmt.Printf("Demo %v, got error %s\n", encoded, err)	
	}
	chk := base58.Encode(num)
	if encoded == string(chk) {
		fmt.Printf ( "Successfully decoded then re-encoded %s\n", encoded )
	} 
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].