Re: [encoding] Serializing internal TextDecoder state? (#7)

@annevk,
> One use case might be that you download large files and save the result, decoded, to disk. If at some point the connection gets cut you might want to have state available so you know how to properly resume. In particular when you want to support resumption across application reboots.

But who is downloading massive text files and wishing to incrementally save the decoded UTF-16 (where? in IndexedDB?) instead of saving the bytes?

@bsittler, I was hoping to see a description of a concrete use case and not just "large inputs". I still don't know what kind of app would have large inputs and why.

@inexorabletash, Storing a byte sequence that needs to be prepended to the current input was what I had in mind, but then I figured that doing the prepending would be a perf or, alternatively, complexity problem. (FWIW, the `java.nio` API can run in a mode where the caller needs to manage such prepending. It's not cool.)

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/encoding/issues/7#issuecomment-154408235

Received on Friday, 6 November 2015 13:25:38 UTC