You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 28, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 28, 2025. It is now read-only.
Should base64 advance alone or should it be part of a larger proposal? #7
Somewhat related to my worries in #6, I worry that working on a one-binary-encoding-per-proposal basis might have subpar ecosystem impacts. If base64 gets promoted to first-class language support, but base64url or hex require packages, that might not be the best outcome.
I understand from the discussions in #4 that the champions here don't like the API shape of https://github.com/lucacasonato/proposal-binary-encoding, but I think that proposal does a better job of putting multiple binary encodings on equal footing and ensuring they all get implemented together.
I intend to support both base64 and base64url in this proposal. Hex is the only other format which is particularly common, and I agree it probably makes sense to include it here rather than doing it as a follow-on. I've opened #8 to track that explicitly.
Base32 and UU also exist, but as far as I can tell mostly only historically - I haven't ever encountered either in the wild. Base85/Ascii85 is used in PDFs and git-patch but does not seem to be common otherwise. I don't think it makes sense to include any of those.
Elsewhere, @bakkot says that apparently Node.js's Buffer.from(x, "base64"), as well as CSP, support mixing base64 and base64 URL in the same string, when decoding. That might be a variant worth supporting in the API as well.
Reacted by Linus Unnebäck and Christopher Bradshaw
Activity
bakkot commentedon Jul 1, 2021
I intend to support both base64 and base64url in this proposal. Hex is the only other format which is particularly common, and I agree it probably makes sense to include it here rather than doing it as a follow-on. I've opened #8 to track that explicitly.
Base32 and UU also exist, but as far as I can tell mostly only historically - I haven't ever encountered either in the wild. Base85/Ascii85 is used in PDFs and git-patch but does not seem to be common otherwise. I don't think it makes sense to include any of those.
Just to look around at our fellows a bit:
domenic commentedon Jul 7, 2021
Elsewhere, @bakkot says that apparently Node.js's
Buffer.from(x, "base64"), as well as CSP, support mixing base64 and base64 URL in the same string, when decoding. That might be a variant worth supporting in the API as well.