// the find
mcollina/msgpack5
A msgpack v5 implementation for node.js, with extension points / msgpack.org[Node]
A msgpack v5 implementation for Node.js and the browser with support for custom extension types. Built by Matteo Collina (Node.js core contributor), so it's well-understood at the protocol level. The extension point API is the main differentiator — you can register your own types and get round-trip encoding for custom classes.
The custom type registration system is genuinely useful: separate encoder/decoder registration means you can decode types you didn't encode, which matters for heterogeneous systems. Test coverage is thorough and organized by msgpack spec section — every integer width, every container size boundary, float edge cases, NaN. The `protoAction` option handles prototype poisoning explicitly, which most msgpack libs ignore. LevelUp encoding interface is a nice fit if you're using leveldb.
The README still uses `new Buffer()` in example code, which has been deprecated since Node.js 6 — a red flag for a library that handles binary data. The last push was February 2024 and there's been no activity since; the ecosystem has largely moved to `@msgpack/msgpack` (the official JS implementation) which is faster and actively maintained. Performance is not competitive — the `bl` dependency adds allocations and the pure-JS approach loses badly to implementations using typed arrays directly. No TypeScript types included, so you're adding `@types/msgpack5` or writing your own.