Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/juliotpaez/g60

A G60 format (de)encoder for rust
https://github.com/juliotpaez/g60

Last synced: about 2 months ago
JSON representation

A G60 format (de)encoder for rust

Awesome Lists containing this project

README

        

# [G60](https://crates.io/crates/g60)
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](https://github.com/galenhuntington). This is just a Rust implementation of his work. See the whole definition of the format in his [repo](https://github.com/galenhuntington/g60).

[![](https://img.shields.io/crates/v/g60.svg)](https://crates.io/crates/g60)
[![Docs](https://docs.rs/g60/badge.svg)](https://docs.rs/g60)

## Example

```rust
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.