Skip to content

juliotpaez/G60

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A G60 format (de)encoder for rust.

G60 is an encoding that uses 60 distinct ASCII characters, specifically all letters and digits except for capital I and O. G60 encodes 8 bytes to 11 characters, increasing the length in bytes by 37.5%, barely more than the 33⅓% for base64, and much less than the 60% for base-32.

G60 was developed by Galen Huntington. This is just a Rust implementation of his work. See the whole definition of the format in his repo.

Docs

Example

use g60::{encode, decode};

fn main() {
    let origin = b"Hello, world!";
    let encoded = "Gt4CGFiHehzRzjCF16";

    assert_eq!(g60::encode(origin), encoded);
    assert_eq!(origin, g60::decode(&encoded).unwrap());
}

License

This project is licensed under MIT.

About

A G60 format (de)encoder for rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages