# amp

> Abstract messaging protocol

Latest version **0.3.1** (published 2013-11-13) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types package; no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2013-11-13 |
| First published | 2013-10-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/amp) |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 135 |
| Maintainers | tjholowaychuk |
| Keywords | amp, actor, message, messaging, zmq, zeromq |

## Links

- npm: https://www.npmjs.com/package/amp
- Repository: https://github.com/visionmedia/node-amp
- Issues: https://github.com/visionmedia/node-amp/issues
- npm.io page: https://npm.io/package/amp

## Recent versions

- 0.3.1 (latest) — 2013-11-13
- 0.3.0 — 2013-10-31
- 0.2.0 — 2013-10-30
- 0.1.0 — 2013-10-28
- 0.0.1 — 2013-10-28

## README

# amp

  Abstract Message Protocol codec and streaming parser for nodejs.

## Installation

```
$ npm install amp
```

## Example

```js
var bin = amp.encode([Buffer.from('hello'), Buffer.from('world')]);
var msg = amp.decode(bin);
console.log(msg);
```

## Protocol

  AMP is a simple versioned protocol for framed messages containing
  zero or more "arguments". Each argument is opaque binary, thus you
  may use JSON, BSON, msgpack and others on top of AMP. Multiple argument
  support is used to allow a hybrid of binary/non-binary message args without
  requiring higher level serialization libraries like msgpack or BSON.

  All multi-byte integers are big endian. The `version` and `argc` integers
  are stored in the first byte, followed by a sequence of zero or more
  `<length>` / `<data>` pairs, where `length` is a 32-bit unsigned integer.

```
      0        1 2 3 4     <length>    ...
+------------+----------+------------+
| <ver/argc> | <length> | <data>     | additional arguments
+------------+----------+------------+
```

# License

  MIT

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