basf64 encoding
Why use simple letters, if you can use chemical symbols?
basf64 encoding
Why use simple letters, if you can use chemical symbols?
This shitpost took way too much effort...
@Error Nice :)
If I wasn't so hyperfixated on something else right now, I would rewrite-it-in-rust™ ( already did so with kittenmoji (https://crates.io/crates/kittenmoji).
Though if you really want to analyse your data for radioactivity, you probably also have to take isotopes into account :)
>>> len(ALPHABET)
63
But BASF64 requires a 64 element long alphabet.
>>> basf64_encode_group(b'\xff\xff\xff')
Traceback (most recent call last):
[…]
File "<python-input-2>", line 35, in basf64_encode_group
encoded += ALPHABET[sextet]
~~~~~~~~^^^^^^^^
IndexError: list index out of range
@daniel_bohrer @Error But no test for it to be actually correct.
@Error nice! but uhm, obviously OO should get turned into O₂ . it doesn't do that yet, does it? tnx for this great work!
@Error Euh, I know this is a shit post but I encountered some issues.
Decoding an empty string crashes the code.
Decoding a string without the expected padding crashes the code.
Decoding starts each decoded triplet with a null byte. So "hello\n" encoded and decoded gives "\0hel\0lo\n"
@Kroppeb it's just a shitpost, I didn't do much testing; feel free to send a PR, but be aware that I don't intend to really maintain this
@Error Gave me flashbacks of buying expensive chrome tapes and floppy discs to ... ahem ... make recordings on.