All Projects → eknkc → basex

eknkc / basex

Licence: MIT License
Arbitrary base encoding in GO

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to basex

Base62
PHP Base62 encoder and decoder for integers and big integers with Laravel 5 support.
Stars: ✭ 16 (-58.97%)
Mutual labels:  encoding, base62
gulp-convert-encoding
Plugin for gulp to convert files from one encoding to another.
Stars: ✭ 15 (-61.54%)
Mutual labels:  encoding
babelfish
Universal translater for encodings
Stars: ✭ 13 (-66.67%)
Mutual labels:  encoding
nginx-module-url
Nginx url encoding converting module
Stars: ✭ 17 (-56.41%)
Mutual labels:  encoding
sia
Sia - Binary serialisation and deserialisation
Stars: ✭ 52 (+33.33%)
Mutual labels:  encoding
zbase32
Human-oriented encoding for binary data
Stars: ✭ 31 (-20.51%)
Mutual labels:  encoding
gb-convert
Gameboy tile conversion and map editor tool
Stars: ✭ 26 (-33.33%)
Mutual labels:  encoding
lzbase62
LZ77(LZSS) based compression algorithm in base62 for JavaScript.
Stars: ✭ 38 (-2.56%)
Mutual labels:  base62
Zipangu
A library for compatibility about Japan.
Stars: ✭ 27 (-30.77%)
Mutual labels:  encoding
cattonum
Encode Categorical Features
Stars: ✭ 31 (-20.51%)
Mutual labels:  encoding
x264
🎥 A safe x264 wrapper for Rust.
Stars: ✭ 35 (-10.26%)
Mutual labels:  encoding
scure-base
Secure, audited & 0-deps implementation of bech32, base64, base32, base16 & base58
Stars: ✭ 27 (-30.77%)
Mutual labels:  encoding
base62
Compact and high performace implementation of base62 algorithm for Golang.
Stars: ✭ 28 (-28.21%)
Mutual labels:  base62
base62.js
base62 encode/decode library
Stars: ✭ 18 (-53.85%)
Mutual labels:  base62
node-uid-generator
Generates cryptographically strong pseudo-random UIDs with custom size and base-encoding
Stars: ✭ 21 (-46.15%)
Mutual labels:  encoding
VarintBitConverter
Varint encoding and decoding for .NET
Stars: ✭ 21 (-46.15%)
Mutual labels:  encoding
Crypto
封装多种CTF和平时常见加密及编码C#类库
Stars: ✭ 20 (-48.72%)
Mutual labels:  encoding
Dockerfiles
Optimized media, analytics and graphics software stack images. Use the dockerfile(s) in your project or as a recipe book for bare metal installation.
Stars: ✭ 98 (+151.28%)
Mutual labels:  encoding
AnimatedGif
📼 A high performance .NET library for reading and creating animated GIFs
Stars: ✭ 106 (+171.79%)
Mutual labels:  encoding
SublimeXssEncode
Converts characters from one encoding to another using a transformation.
Stars: ✭ 37 (-5.13%)
Mutual labels:  encoding

basex

Actions Status

import "github.com/eknkc/basex"

Package basex provides fast base encoding / decoding of any given alphabet using bitcoin style leading zero compression. It is a GO port of https://github.com/cryptocoinjs/base-x

Usage

type Encoding

type Encoding struct {
}

Encoding is a custom base encoding defined by an alphabet. It should bre created using NewEncoding function

func NewEncoding

func NewEncoding(alphabet string) (*Encoding, error)

NewEncoding returns a custom base encoder defined by the alphabet string. The alphabet should contain non-repeating characters. Ordering is important. Example alphabets:

- base2: 01
- base16: 0123456789abcdef
- base32: 0123456789ABCDEFGHJKMNPQRSTVWXYZ
- base62: 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ

func (*Encoding) Decode

func (e *Encoding) Decode(source string) ([]byte, error)

Decode function decodes a string previously obtained from Encode, using the same alphabet and returns a byte slice In case the input is not valid an arror will be returned

func (*Encoding) Encode

func (e *Encoding) Encode(source []byte) string

Encode function receives a byte slice and encodes it to a string using the alphabet provided

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].