Re: [whatwg/encoding] TextEncoder#encode - write to existing Uint8Array (#69)

I've thought about this some more. If we are doing the bring your own `ArrayBuffer` thing only for UTF-8 encode, it's not too onerous to wrap encoding_rs's UTF-8 encoder with something that performs slow but exact buffer filling for the last couple of bytes.

I'd be unhappy to have to do that for all encodings, though, so let's be careful if we ever get a request for _decoding_ to `ArrayBuffer`s.

In any case, the exact buffer filling behavior in the last 3 bytes of the output buffer is an area that is going to need special interop attention to avoid compatibility problems in cases where Web devs misuse a streaming API as a non-streaming API.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/encoding/issues/69#issuecomment-360411906

Received on Thursday, 25 January 2018 09:35:06 UTC