Skip to content

Commit

Permalink
make encoding table explicit, to address concern raised in Issue agno…
Browse files Browse the repository at this point in the history
  • Loading branch information
lemon-gith committed May 11, 2024
1 parent ca31825 commit 4d70efd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,19 @@ This is a _modified_ [Crockford encoding](https://www.crockford.com/base32.html)
- Each character corresponds to 5 bits of input.
- Lexicographic order of strings is preserved through Base 32 encoding.

### `decimal -> base32` Table

| 00xxx | 01xxx | 10xxx | 11xxx |
| --- | --- | --- | --- |
| 0 -> 0 | 8 -> 8 | 16 -> g | 24 -> r |
| 1 -> 1 | 9 -> 9 | 17 -> h | 25 -> t |
| 2 -> 2 | 10 -> a | 18 -> j | 26 -> u |
| 3 -> 3 | 11 -> b | 19 -> k | 27 -> v |
| 4 -> 4 | 12 -> c | 20 -> m | 28 -> w |
| 5 -> 5 | 13 -> d | 21 -> n | 29 -> x |
| 6 -> 6 | 14 -> e | 22 -> p | 30 -> y |
| 7 -> 7 | 15 -> f | 23 -> q | 31 -> z |

## Formalia

Under MIT License.
Expand Down

0 comments on commit 4d70efd

Please sign in to comment.