Re:Show HN: People forget that you can stick any data at the...
by dheera on Wednesday July 05, 2023 @04:45PM
(#36606842)
Is there an encoding that is less wasteful that base64 but not vulnerable to text editor corruption issues? I think avoiding 0x0 to 0x20 should be enough to not get corrupted by text editors, though base64 avoids a lot more than that.
[ Parent
| on HN ]
Re:Show HN: People forget that you can stick any data at the...
by ElectricalUnion on Wednesday July 05, 2023 @04:54PM
(#36606956)
If you can count on every printable ascii character being not-mangled, you can use ascii85/base85/Z85 (5 "ascii characters" to 4 bytes) instead of base64.
Re:Show HN: People forget that you can stick any data at the...
by raverbashing on Wednesday July 05, 2023 @05:19PM
(#36607304)
There's probably a base(bigger number) with Unicode chars today
Re:Show HN: People forget that you can stick any data at the...
by CaptainFever on Wednesday July 05, 2023 @05:29PM
(#36607421)
Base65536? https://github.com/qntm/base65536
Re:Show HN: People forget that you can stick any data at the...
by bashinator on Wednesday July 05, 2023 @05:28PM
(#36607420)
base65536, and look who the author is :-D
Re:Show HN: People forget that you can stick any data at the...
by cassianoleal on Wednesday July 05, 2023 @05:51PM
(#36607675)
Who is the author?
Re:Show HN: People forget that you can stick any data at the...
by sudobash1 on Wednesday July 05, 2023 @07:07PM
(#36608471)
But you need to make sure to use utf-16 or utf-32 instead of utf-8, or you may be worse off.
Re:Show HN: People forget that you can stick any data at the...
by dheera on Thursday July 06, 2023 @10:25AM
(#36616299)
Those get mangled by text editors that don't support them.
Re:Show HN: People forget that you can stick any data at the...
by Dylan16807 on Wednesday July 05, 2023 @08:40PM
(#36609372)
While a couple of people suggested Base65536, that encoding isn't particularly compact, and it can't be as elegant as 65536 would suggest because it has to dodge special cases in unicode.
It's almost always the case that either Base32768 is denser, or encodings with 2^17 or 2^20 characters are denser.
Re:Show HN: People forget that you can stick any data at the...
by balou23 on Thursday July 06, 2023 @05:23AM
(#36613345)
there's also base91, with an efficiency of 6.5 bits of data per printable character, compared to 6.4 with ascii85, 6.0 with base64
Re:Show HN: People forget that you can stick any data at the...
by delusional on Wednesday July 05, 2023 @05:29PM
(#36607428)
At that point you're basically doing yEnc.
Re:Show HN: People forget that you can stick any data at the...
by doublerabbit on Wednesday July 05, 2023 @05:10PM
(#36607177)
base16
Re:Show HN: People forget that you can stick any data at the...
by doublerabbit on Thursday July 06, 2023 @11:11AM
(#36617232)
Woah, why the downvotes.
Re:Show HN: People forget that you can stick any data at the...
by bazzargh on Thursday July 06, 2023 @05:47AM
(#36613536)
if you mean the thing you want to encode is mostly-ascii, then https://en.wikipedia.org/wiki/Quoted-printable ... it's a real throwback, I've not seen this in the wild since the 90s, but it's there in the python standard library (quopri), perl (MIME::QuotedPrint) etc