6 ms·
Base 64 = 256 Ascii represented in 64. Base64 < 256 Base 1024 = ? Wouldn't "A" be "A", because it is a subset of 1024? Looks more like obfuscation code for
by xtf 9y ago
Base 64 = 256 Ascii represented in 64. Base64 < 256
Base 1024 = ?
Wouldn't "A" be "A", because it is a subset of 1024?
Looks more like obfuscation code for me.
- Xeoncross 9y agoBase encodings don't always start at "A" (or even include it). They just mean that the alphabet they use has N glyphs in it to represent the numbers 0-N. For example, base10 can be: 0123456789 or qwertyuiop or abcdefghij or ...
- cpburns2009 9y agoI think it's meant to be a joke library. There's no sensible reason to encode binary data using Unicode Emojii. I also don't see any mention of the Unicode encoding being used. Is it UTF-8, UTF-16 LE or BE?
- kazinator 9y agoBase64 is groups of six bits of arbitrary binary data, being interpreted as 6 bit integers (valued 0 to 63) which index into a table of 64 printable characters. That coding then gives the binary data a printed representation that we can store in strings and plain text files. The ASCII datum "A" doesn't turn to "A" in Base64, and in fact it doesn't turn to any specific Base64 code. In a stream of 8 bit characters where "A" occurs, that "A" byte will be split into two 6-bit groups in one of three ways: 2-6, 4-4 or 6-2. In those groups that get only 2 or 4 bits of that "A", there will likely be other non-zero bits from adjacent characters/data which help determine the code. In base 1024, we have 10 bit units that can be packed with data. The Base64 code letter "A" is the first entry in the Base64 table table; it corresponds to zero: a sequence of six zero bits.