cettia-javascript-client icon indicating copy to clipboard operation
cettia-javascript-client copied to clipboard

Decode Base64 string to ArrayBuffer correctly

Open flowersinthesand opened this issue 6 years ago • 0 comments

HTTP streaming transport decodes a base 64 string chunk into an ArrayBuffer to deal with binary data. The current implementation may have some bugs in that a byte sequence may not be a valid unicode character and a unicode character may not be one byte.

https://github.com/niklasvh/base64-arraybuffer/blob/master/lib/base64-arraybuffer.js looks like a good fallback.

flowersinthesand avatar May 04 '19 06:05 flowersinthesand