How do I parse serialized protobuff messages in js?

I have a flask app that sends a large (100mb) binary message to js. I can send the files easily, however, I can’t seem to decode my message in js. I am using this library:

https://github.com/protobufjs/protobuf.js

The message is encoded by python using the standard code generator protoc.

The encoded message looks something like ""res = u0008�Iu0008�u0015u0008�u0016u0008�u0015u0008�)u0008�? [...]"

According to the documentation I’ve read so far, I need to convert res before I can decode. The following fails:

j = new TextEncoder("utf-8").encode(res);
protoMsg.decode(j);

I get the error message:

Uncaught Error: invalid wire type 6 at offset 198