@coderbuzz/velox-ws-wire
v0.1.17
Published
Velox WebSocket Wire Protocol — compact binary framing codec for WebSocket messages.
Maintainers
Readme
Velox WS Wire — @coderbuzz/velox-ws-wire
Binary framing protocol for WebSocket messages. 80-93% bandwidth reduction over JSON. Zero dependencies.
Why?
Standard JSON.stringify/JSON.parse overhead adds up fast for high-throughput WebSocket connections. Wire Protocol eliminates the waste with a compact binary frame format.
Quick Start
import { encode, decode } from "@coderbuzz/velox-ws-wire";
const frame = encode("hello");
const msg = decode(frame); // "hello"Size Comparison
| Frame type | JSON | Wire | Savings | |---|---|---|---| | Heartbeat | ~18 bytes | 1 byte | ~94% | | Pub/sub message | ~55 bytes | ~8 bytes + data | ~85% | | Request-response | ~70 bytes | ~12 bytes + data | ~83% |
Installation
npm install @coderbuzz/velox-ws-wireFull docs: DOCS.md
License
MIT
