# @picode/binary-reader

> Tool for reading binary data sequentially in JavaScript / TypeScript.

Latest version **1.0.0** (published 2021-02-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @picode/binary-reader
pnpm add @picode/binary-reader
yarn add @picode/binary-reader
bun add @picode/binary-reader
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2021-02-06 |
| First published | 2021-02-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | picode7 |
| Maintainers | picode |
| Keywords | binary, reader, picode |

## Links

- npm: https://www.npmjs.com/package/@picode/binary-reader
- Repository: https://github.com/picode7/binary-reader
- Homepage: https://github.com/picode7/binary-reader#readme
- Issues: https://github.com/picode7/binary-reader/issues
- npm.io page: https://npm.io/package/@picode/binary-reader

## Recent versions

- 1.0.0 (latest) — 2021-02-06
- 0.0.5 — 2021-02-06
- 0.0.4 — 2021-02-06
- 0.0.3 — 2021-02-06
- 0.0.2 — 2021-02-06
- 0.0.1 — 2021-02-06

## README

# Binary Reader for JavaScript/TypeScript

[![npm](https://img.shields.io/npm/v/@picode/binary-reader)](https://www.npmjs.com/package/@picode/binary-reader)
![npm bundle size](https://img.shields.io/bundlephobia/minzip/@picode/binary-reader)
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/picode7/binary-reader/CI)](https://github.com/picode7/binary-reader/actions)

Tool for reading binary data sequentially in JavaScript / TypeScript

Requires [DataView.getBigInt64 support](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/getBigInt64#browser_compatibility) for Int64/Uint64

## Installation

```bash
npm install bin-reader
```

## Usage

```ts
import { BinaryReader } from 'bin-reader'

const data = new BinaryReader(uint8Array)

const version = data.readUint32()
const nameLen = data.readUint8()
const name = data.readArrayAsString(nameLen)
```

## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License

[MIT](/LICENSE)

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