Implemented StreamDecoder, moved code in transformer.js back to parsers.js.