JS to ArrayBuffer to JS