Skip to main content

Module string_decoder

Module string_decoder 

Source
Expand description

Node string_decoder core module: new StringDecoder(encoding) with .write(buffer) / .end([buffer]). A StringDecoder turns byte chunks into a string, holding back an incomplete trailing multibyte sequence until the next chunk completes it.

node-js decodes each chunk whole (buffering a split UTF-8 tail): enough for the iconv-lite internal codec that requires this module, and correct for any single-chunk decode.

Functionsยง

construct
new StringDecoder([encoding]).
instance_call