# pypacker

> Handle binary strings in buffers similar to Python's struct library.

Latest version **0.2.1** (published 2012-08-19) · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2012-08-19 |
| First published | 2012-08-19 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Chris Barna |
| Maintainers | ctbarna |

## Links

- npm: https://www.npmjs.com/package/pypacker
- Repository: git@github.com:ctbarna/node-packer
- npm.io page: https://npm.io/package/pypacker

## Recent versions

- 0.2.1 (latest) — 2012-08-19
- 0.2.0 — 2012-08-19
- 0.1.0 — 2012-08-19

## README

# PyPacker
`pypacker` is a binary packer and unpacker inspired by Python's [struct
library](http://docs.python.org/library/struct.html) for node.js.
Currently, it packs/unpacks to and from a Buffer object. When unpacking,
an array is returned with the requested values.

Interfacing is exactly the same as the Python struct python class except
there are no 8-byte integers.

## Installation
`npm install pypacker`

## Usage
```JavaScript
Packer = require('pypacker');
var unpack_array = new Packer('>H')
  .unpack(new Buffer([0x00, 0x01]));
// unpack_array will be an array containing [1]

var packed_buffer = new Packer('>H')
  .pack(1);
// packed_buffer will be a Buffer of length 2 containing 00 01
```

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