Open
Bug 687418
Opened 13 years ago
Updated 2 years ago
base64 for typed arrays
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
NEW
People
(Reporter: db48x, Unassigned)
Details
The browser provides btoa and atob for Base64 encoding/decoding of strings, but now that we can deal with binary data via typed arrays, we have to rewrite that in javascript regardless. I don't think it would be useful to extend these functions to take and return typed arrays directly (for how would you tell atob which type to return). Instead, perhaps we could add methods to ArrayBuffer? Either ArrayBuffer.btoa, or ArrayBuffer.encodeBase64 would work.
Comment 1•13 years ago
|
||
Seems like a JS-side kind of thing, no?
Assignee: nobody → general
Component: DOM → JavaScript Engine
QA Contact: general → general
Reporter | ||
Comment 2•13 years ago
|
||
DOM0, JS Enginge, it's all the same :)
Component: JavaScript Engine → DOM
Comment 3•13 years ago
|
||
ArrayBuffer and friends are the WebGL spec's ambit, right? So you should propose .btoa or .encodeBase64 to them, maybe (although I very much doubt they want or need anything to do with atob/btoa). Or maybe WhatWG should do it (but not on ArrayBuffer or some typed-array structure directly), since they're doing atob/btoa, should handle it. The implementation might live in JS engine code in the end, but a prerequisite to it, for stuff exposed to the web, is its standardization in some appropriate place. There's a component/QA mismatch now, but since I have no idea which component this really should live in, I'm just not going to bother touching it. :-)
Reporter | ||
Comment 5•13 years ago
|
||
Oops, I didn't mean to change the component :) Anyway, I bet we could ask dherman, see what he thinks.
Component: JavaScript Engine → DOM
Assignee | ||
Updated•10 years ago
|
Assignee: general → nobody
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•