# bootbuffer

Latest version **0.3.0** (published 2020-06-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install bootbuffer
pnpm add bootbuffer
yarn add bootbuffer
bun add bootbuffer
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2020-06-18 |
| First published | 2019-11-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 50.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | heineiuo |
| Maintainers | heineiuo |

## Links

- npm: https://www.npmjs.com/package/bootbuffer
- Repository: https://github.com/heineiuo/bootbuffer
- Homepage: https://github.com/heineiuo/bootbuffer#readme
- Issues: https://github.com/heineiuo/bootbuffer/issues
- npm.io page: https://npm.io/package/bootbuffer

## Dependencies (1)

- [varint](https://npm.io/package/varint.md) ^5.0.0

## Recent versions

- 0.3.0 (latest) — 2020-06-18
- 0.2.1 — 2019-11-09
- 0.2.0 — 2019-11-08
- 0.1.2 — 2019-11-07
- 0.1.1 — 2019-11-07
- 0.1.0 — 2019-11-07

## README

# BootBuffer

<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/bootbuffer"><img style="max-width:100%" alt="Coverage status" src="https://coveralls.io/repos/github/heineiuo/bootbuffer/badge.svg"></a>
  <a href="https://www.npmjs.com/package/bootbuffer"><img style="max-width:100%" alt="npm version" src="https://img.shields.io/npm/v/bootbuffer.svg?style=flat"></a>
  <a href="https://gitter.im/heineiuo/bootbuffer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"><img style="max-width:100%" alt="Join the chat at https://gitter.im/heineiuo/bootbuffer" src="https://badges.gitter.im/heineiuo/bootbuffer.svg"></a>
</p>


A binary-encoded serialization, for dababase columns, data transfer and others.

## Get Started

```tsx
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 |
```



## License

[MIT License](./LICENSE)

---
_Source: https://npm.io/package/bootbuffer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
