Re:Tell HN: ChatGPT Can Decode Base64
by Supply5411 on Thursday September 21, 2023 @04:18PM
(#37603680)
There isn't a 1-1 of ascii character to base64 character is the thing. 3 ascii character = 4 base64 characters, so changing one of the input changes 1 or 2 of the output.
Re:Tell HN: ChatGPT Can Decode Base64
by moritzwarhier on Thursday September 21, 2023 @04:26PM
(#37603806)
Fair enough, what I meant by 1:1 wasn't the length, more the prefix-freeness thing.
Trivially, there is a 1:1-correspondence between the set of all possible ASCII strings and the image of that set under Base64 encoding, because otherwise it wouldn't be an encoding anymore :)
This doesn't guarantee that a Base64-encoded string can't be identical to a substring of a different Base64-encoded string. And for arbitrarily short substring length (bit), this doesn't make sense either.
So we rely on some definitions and minimal data structures such as bytes.
What I meant was that AFAIK, the ASCII character set might have an image under Base64 encoding that allows for prefix-free encoding given a minimum read length.
Still very impressive.
What's even more interesting are the edge cases as presented above. Now that we consider almost-perfect natural translation a given, we're obsessed with marrying this to basic rule-based logic.
Me too, in every conversation I had with ChatGPT.
Because marrying the two seems almost magical and scary.