https://github.com/theodesp/base62
Base62 encoding/decoding in Racket Scheme
https://github.com/theodesp/base62
base62 racket scheme
Last synced: 5 months ago
JSON representation
Base62 encoding/decoding in Racket Scheme
- Host: GitHub
- URL: https://github.com/theodesp/base62
- Owner: theodesp
- License: mit
- Created: 2018-09-19T14:54:11.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-19T14:55:00.000Z (over 7 years ago)
- Last Synced: 2025-04-06T03:27:15.673Z (about 1 year ago)
- Topics: base62, racket, scheme
- Language: Racket
- Size: 1.95 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# base62
Simple base62 encoder/decoder in Racket Scheme
## What is Base62 encoding?
Base62 encoding converts numbers to ASCII strings (0-9, a-z and A-Z) and vice
versa, which typically results in comparatively short strings. Such identifiers
also tend to more readily identifiable by humans.
* `999` ≙ `"g7"`
* `9999` ≙ `"2Bh"`
* `238327` ≙ `"ZZZ"`
Example
--
```racket
#lang racket
(require "base62.rkt")
(base62-encode 100) ; "1C"
(base62-decode "1C") ; 100
(base62-encode "!") ; Throws
(base62-decode 1) ; Throws
```
License
---
MIT License © 2018 Theo Despoudis