bootbuffer
v0.3.0
Published
<p> <a href="https://github.com/heineiuo/bootbuffer/actions"><img style="max-width:100%" alt="GitHub Actions status" src="https://github.com/heineiuo/bootbuffer/workflows/Node%20CI/badge.svg"></a> <a href="https://coveralls.io/github/heineiuo/bootbuff
Downloads
15
Readme
BootBuffer
A binary-encoded serialization, for dababase columns, data transfer and others.
Get Started
import { BootBuffer } from 'bootbuffer' // install from npm
const bb = new BootBuffer()
bb.add('foo', 'bar')
bb.add('int8', 13)
bb.add('float', 13.2456741)
bb.add('double', 13.2456741123)
bb.add('json1', { foo: 'bar' })
for await (const entry of BootBuffer.read(bb.buffer)) {
console.log(entry.key, entry.value)
// foo, bar
// int8, 13
// float, 13.2456741
// double, 13.2456741123
// json1, { foo: "bar" }
}
Support types
buffer
string
uint8
uint16
uint32
bigint
float
double
boolean
json
Format
ValueType<varint> | KeyLength<varint> | ValueLength<varint> | Key<Buffer> | Value<Buffer> | ...repeat |