Encode/decode typed arrays (e.g. Float32Array, Uint8Array) to and from base64 strings.
Takes a typed array of any format and returns a base64-encoded string.
Given a base64-encoded
string, populate a typed array with the original
type is a string dtype which should match
the original data type you were using. It defaults to
uint8, but if you
want to encode other types you'll need to pass this in or you'll get mangled
results. This example should work:
var data = 97 98 99var original =var copy = // [97, 98, 99]
Alternatively, you can pass a second
output array instead of a
type to push
data straight into that array.
MIT. See LICENSE.md for details.