For example, say I wanted to encode a 64-bit signed integer into base64, how could I (if possible) do it in Javascript?
To clarify, I want to encode the actual bits/bytes of data, NOT the string or string representation of the data.
I.e. the integer 15 in decimal is equal to 0000 1111 in binary, which is equal to Dw== in base64 form.
I do not want to encode the string representation of the integer 15. For comparison, if you encode the string "15" in base64, you are actually encoding 0011 0001 0011 0101, which will give you MTU= in base64 form (this is what window.atob()
does).