Skip to content

mroth/revhex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

revhex ⏪

PkgGoDev

Go module that implements reverse hexadecimal encoding and decoding, as used in the Jujutsu version control system.

The reverse hex format is normal 16-base hexadecimal encoding but using z-k as the alphabet instead of 0-9a-f.

import (
	"encoding/hex"
	"fmt"

	"github.com/mroth/revhex"
)

func Example() {
	src := []byte("Hello!")
	fmt.Println("hex:    ", hex.EncodeToString(src))
	fmt.Println("revhex: ", revhex.EncodeToString(src))

	// Output:
	// hex:     48656c6c6f21
	// revhex:  vrtutntntkxy
}

The implementations in this package are modeled after the standard library encoding/hex package, and have identical APIs and performance characteristics.

About

⏪ Reverse hex encoding for Go

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages