Use shorter code for `base64url.ts`
lgarron opened this issue · 1 comments
lgarron commented
base64urlToBuffer()
and bufferToBase64url()
take up a significant part of the build size. It would be nice to make them as small as possible. I believe there are shorter implementations we could use, especially taking into account that the expected data is only on the order of a hundred bytes.
Note that the minified code size matters the most (not the source code size)!
lgarron commented
I looked into this a while back, and I was unable to use any clever tricks to shrink the size by more than a few bytes. I don't think there are significant gains to be made by simple code changes, unless browsers add more conversion functions.