Skip to content

string_decoder: reset decoder on end

This resets the StringDecoder's state after calling #end. Further writes to the decoder will act as if it were a brand new instance, allowing simple reuse.

This supersedes #16594, which seems abandoned.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

string_decoder

Refs: https://github.com/nodejs/node/pull/16594 Fixes: https://github.com/nodejs/node/issues/16564

Merge request reports

Loading