@cronosstudio/axmf-core
v0.1.6
Published
Axen Message Format - Binary AMF3-style + zlib compression
Maintainers
Readme
AxMF Core (@axmf/core)
Axen Message Format — a modern binary format combining AMF3-style object encoding with zlib compression for efficient, reusable, and compact data transfer.
🚀 Features
- AMF3-like binary encoder/decoder
- String, object, trait reuse
- Zlib compression wrapper
- Human-friendly API
- Module-friendly (npm-ready)
📦 Install
pnpm add @axmf/core🧪 Example
import { encodeAxMF, decodeAxMF } from '@axmf/core';
const original = { name: 'Axen', age: 38, city: 'Jakarta' };
const encoded = encodeAxMF(original);
const decoded = decodeAxMF(encoded);
console.log(decoded); // { name: 'Axen', age: 38, city: 'Jakarta' }🧰 API
encodeAxMF(data: any, options?: { debug?: boolean }): Uint8Array
- Encodes and compresses the object using AMF3-style + zlib
decodeAxMF(buffer: Uint8Array, options?: { debug?: boolean }): any
- Decompresses and decodes AxMF buffer
📁 Structure
src/→ encoder, decoder, zlib wrappertest/→ simple round-trip test
📜 License
MIT
