README
eax
eax is a simple way of storing key-value pairs in a binary format. It has several advantages over JSON, but lacks many of the features.
eax files are much smaller than JSON files. For example, the following JSON data:
{
"name": "foo",
"age": 24
}
could be encoded in only 7 bytes by eax. This is a significant size advantage, but it is not without it's downsides. The major downsides are that one must know the keys that will be present in the binary, and that so far, only string and uint8 types are supported. Support for arrays is planned vai. pointer bytes, and larger number types will be added shortly.
usage
$ npm i eax
// Typescript
import { Eax, Types } from "./index"
let eax = new Eax({name: Types.String, age: Types.Int})
let enc = eax.encode({name: "foo", age: 24})
console.log(enc)
console.log(eax.decode(enc));