Re: Overlap between StreamReader and FileReader

On Wed, Jul 10, 2013 at 11:02 PM, Anne van Kesteren <annevk@annevk.nl>wrote:

> I see. I kinda thought that if you omitted size it would just give you
>  everything in stream's buffer and not everything until end-of-stream.
>
>
OK. So, are you fine with making read() without size param read contents
until EoS?


>
> >> Do we even need that? It seems just passing ArrayBuffer in and out
> >> could be sufficient for now?
> >
> > As one of read()'s arguments?
>
> As for what it would return. Or do we have use cases where decoding to
> strings and/or Blobs are important?
>
>
Decoding to DOMString may be useful though it would involves messy
character decoding code/spec.

It's possible that for some specified maxSize, the result ends in the
middle of a multibyte sequence.

We could keep an incomplete sequence inside Stream and return it once it
completes for the following read() ops.

Received on Wednesday, 17 July 2013 05:47:30 UTC