Created
September 25, 2017 12:33
-
-
Save vshymanskyy/6369e04f8dfb1ad7ac9e9f3f81e82075 to your computer and use it in GitHub Desktop.
TypedArray to base64 and back
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input = new Float64Array([1,2,3,4]) | |
encoded = Buffer.from(input.buffer).toString('base64') | |
buff = Buffer.from(encoded, 'base64'); | |
decoded = new Float64Array(Uint8Array.from(buff).buffer) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment