W3C home > Mailing lists > Public > public-webapi@w3.org > June 2007

Re: ECMAScript octet representation (was: Re: Bindings spec ready for FPWD?)

From: liorean <liorean@gmail.com>
Date: Thu, 28 Jun 2007 20:39:18 +0200
Message-ID: <cee13aa30706281139o1d27019aod77f51617c0a2dd6@mail.gmail.com>
To: public-webapi@w3.org
> Anne van Kesteren:
> > It would still be very good to have an octet / byte representation in
> > ECMAScript. I'm aware of a couple of implementations of such a thing, but
> > I haven't been able to play with them or figure out how they work exactly
> > myself:


> >   2. I heard Adobe Flex has some notion of a byte array to represent files.


On 28/06/07, Cameron McCormack <cam@mcc.id.au> wrote:
> Does sequence<octet> not cover that?  Would you prefer it to be
> "looser", in that [[Get]]s and [[Put]]s work like an array, but it is
> not an ECMAScript Array object (so that it can have some more efficient
> representation underneath)?

I would prefer that. The ES4 built-ins include a ByteArray object that
sounds promising for this, and as Maciej pointed out to me in a mail
on an entirely different topic ES4 library functionality can be added
to ES3 implementations. (Unless it violates ES3 rules in some way, of
course.) The proposal on the public export ES4 wiki misses some wanted
functionality, but then again considerable time has passed since last

The first prerelease of the reference implementation of ES4 specified
ByteArray fleshes it out some from the public export proposal. (See

Even if you find ByteArray unsuitable for the bindings since ES3
engines don't have it as built-in, I'd like to see it specified in
such a way that ES4 engines are allowed to use the native ByteArray
instead of having either a less performant ES3 Array-based solution or
a second ByteArray-like DOM host object.
David "liorean" Andersson

Received on Thursday, 28 June 2007 18:39:23 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:23 UTC