Bug 118570 - Support StringView as a new extension of ArrayBufferView
Summary: Support StringView as a new extension of ArrayBufferView
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chang Shu
URL:
Keywords:
Depends on: 126644
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-11 10:21 PDT by Chang Shu
Modified: 2016-05-18 20:57 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chang Shu 2013-07-11 10:21:55 PDT
https://developer.mozilla.org/en-US/docs/Code_snippets/StringView

The introduction from the proposal above provides a good reason for adding this feature.
"As web applications become more and more powerful, adding features such as audio and video manipulation, access to raw data using WebSockets, and so forth, it has become clear that there are times when it would be helpful for JavaScript code to be able to quickly and easily manipulate raw binary data. In the past, this had to be simulated by treating the raw data as a string and using the charCodeAt() method to read the bytes from the data buffer.

However, this is slow and error-prone, due to the need for multiple conversions (especially if the binary data is not actually byte-format data, but, for example, 32-bit integers or floats).

JavaScript typed arrays provide a mechanism for accessing raw binary data much more efficiently. The StringView constructor is one level above typed arrays."
Comment 1 Chang Shu 2013-07-11 14:16:54 PDT
It seems DataView serves the same purpose.
https://bugs.webkit.org/show_bug.cgi?id=46541
Comment 2 Brent Fulgham 2016-05-18 20:57:49 PDT
I think this seeks to duplicate the DataView concept. Please re-open the bug if I have misunderstood.