0
\$\begingroup\$

I'm seeing a lot of binary-code submissions in base64 encoding. Wouldn't Hex be better, from a presentation point of view? I can read hex, I can't read base64.

\$\endgroup\$
  • \$\begingroup\$ after reading a little more deeply into base64 I suppose I could learn to read it. It is more readable than ASCII85. \$\endgroup\$ – luser droog Dec 26 '12 at 4:48
2
\$\begingroup\$

Personally I like hexdump format, as used in one of my answers. That way, any readable stuff is actually, well, readable. :-)

\$\endgroup\$
  • \$\begingroup\$ Yes. That makes it somewhat more accessible. As much as can reasonably be done. \$\endgroup\$ – luser droog Dec 21 '12 at 6:05
2
\$\begingroup\$

I think both forms have their usefulness.

If the vast majority of the program consists of random binary data, a hex representation isn't going to be very useful. A base64 encoding, on the other hand, gives users the ability to test your program directly, without having to perform any manual conversion - especially if you provide a wrapper which generates the program, such as provided for this answer or this answer.

For shorter answers, and those with a minimal amount of non-ascii characters, I do agree that a hex representation will be more useful.

\$\endgroup\$
  • \$\begingroup\$ yeah. ... what if ... there were a low-impact syntax to interject a little binary into a mostly ascii source. Sounds like a job for M4. But it would need some reconfigurable escape indicator. IIRC '@' was the latest addition to ascii (it's not part of C's execution charset), so that'd be my choice for a default escape char least likely to get in the way. ... rambling. ignore if. \$\endgroup\$ – luser droog Dec 26 '12 at 4:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .