Closed
Description
Just came cross there is a second option can be passed to decoder, My first thought about it is a buffer, so I can do
decoder.decode( new Uint8ArrayBuffer([97, 98, 99]), { stream: true })
and append another buffer
decoder.decode( new Uint8ArrayBuffer([100, 101 , 102]), { stream: true })
and finally get me a string back which include the 2 parts
const finalString = decoder.decode( new Uint8ArrayBuffer([]) , { stream: false })
but it isn't the case
the first two expression return "abc" and "def" the third give me empty, just like them without the stream option. and I've tried TextDecoder in Nodejs, it have the same behaviour
Can anyone can tell me how to use it correctly?
Metadata
Metadata
Assignees
Labels
No labels