Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/juliotpaez/g60
- Owner: juliotpaez
- License: mit
- Created: 2021-09-22T09:55:36.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-07T09:09:43.000Z (4 months ago)
- Last Synced: 2024-11-08T23:46:43.173Z (about 2 months ago)
- Language: Rust
- Size: 55.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.