computer-wilco/socket.io-compact-parser ? reverse-engineered prompt

Reverse engineered prompt

Build me a lightweight Socket.IO parser that replaces the default JSON parser with a compact binary one, so messages take up less space and are faster to send.

I want it to work in both Node and the browser, and to plug into Socket.IO as a drop in parser on both the server and client. It should stay compatible with the current Socket.IO protocol, and handle the usual message fields like type, namespace, data, and id in a very compact way. Use MessagePack style encoding under the hood, and make sure it can handle buffers and Uint8Array values cleanly.

Please include a simple way to import it as a module, and also make a browser version I can load from a script tag. If you need to check current docs for Socket.IO or MessagePack behavior, go ahead and look them up online.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab