# cosBuffer

> buffer api for Node.JS

Latest version **0.0.1** (published 2016-04-07) · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

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

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2016-04-07 |
| First published | 2016-04-07 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | wanchao.huang |
| Maintainers | hwclegend |
| Keywords | buffer |

## Links

- npm: https://www.npmjs.com/package/cosBuffer
- Repository: https://github.com/hwclegend/cosBuffer
- Issues: https://github.com/hwclegend/cosBuffer/issues
- npm.io page: https://npm.io/package/cosBuffer

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2016-04-07

## README

cosBuffer - a node.js buffer api
===========================

Install with:

    npm install cosBuffer

## Usage

Simple example, included as `test.js`:

```js
    var cosBuff = require('./')();
    cosBuff.incHeader = true;
    var buf = cosBuff.packet('chat','this is a message');
    var msg = cosBuff.parse(buf);
    console.log('Type:',msg.type);
    console.log('Data:',msg.data);
```



## Demo

test.js

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