Crates.io | h-encoder |
lib.rs | h-encoder |
version | 1.0.0 |
source | src |
created_at | 2021-06-01 22:20:12.368478 |
updated_at | 2021-06-01 22:20:12.368478 |
description | For the dead week 𝓮𝓷𝓳𝓸𝔂𝓮𝓻. |
homepage | https://github.com/krashanoff/H |
repository | https://github.com/krashanoff/H |
max_upload_size | |
id | 404929 |
size | 6,293 |
For the dead week 𝓮𝓷𝓳𝓸𝔂𝓮𝓻. A sophisticated twist on Fernsicles/h.
H [eEdD] (-|.*)
e|E
encodes capture group one. d|D
decodes capture group one. Specifying -
reads from stdin
as capture group one, and anything else reads the remaining arguments as capture group one.
For encoding, the program parses your input as a bitstream of half-byte values, converting each to some variant of the letter H.
For decoding, the program parses your input as a Vec<char>
, then performs the reverse lookup. If
an invalid char
is passed, the program will interpret it as a zero byte 0x00
.
Since we can't declare a static hash table in Rust without use of external dependencies, we just use functions instead.