Package Exports
- @coderbuzz/msgpack
Readme
Msgpack — @coderbuzz/msgpack
High-performance MessagePack serialization for TypeScript. 55% smaller than JSON for compact objects. Zero-copy encode. Buffer reuse. Pre-allocation.
Why @coderbuzz/msgpack?
- Reusable internal buffer — minimizes GC pressure across encode calls
encodeUnsafe()— zero-copy, returns view of internal bufferencodeInto()— writes to caller-owned buffer (pre-allocation)encodedSize()— exact byte count without allocating- Smart integer encoding — always selects smallest possible format
- Fast paths — inline UTF-8 for short strings, ASCII scan for <=24 bytes
- <3 KB gzip vs @msgpack/msgpack ~10 KB
Installation
npm install @coderbuzz/msgpackQuick Start
import { decode, encode } from "@coderbuzz/msgpack";
const bytes = encode({ name: "Alice", age: 30, active: true });
// ~20 bytes vs ~45 bytes JSON
const value = decode(bytes);
// => { name: "Alice", age: 30, active: true }Documentation
Full API reference, wire format details, and performance tips: DOCS.md
License
MIT © 2026 Indra Gunawan