For example, let's say I wanted to encode a 64-bit signed integer in base64, how could I (if possible) do this in Javascript?
To clarify, I want to encode the actual bits / bytes of the data, not a string or string representation of the data.
those. the integer 15 in decimal is 0000 1111 in binary, which is Dw == in base64.
I donβt want to encode the string representation of the integer 15. For comparison, if you encode the string β15β in base64, you actually encode 0011 0001 0011 0101, which will give you MTU = in base64 form (this is what window.atob() does window.atob() ).
source share