# uint8

> Convert between Uint8Array and Buffer without memory copy in Browserify.

Latest version **1.0.0** (published 2013-05-28) · MIT license · 0 weekly downloads

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

## Install

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

## Health

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

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2013-05-28 |
| First published | 2013-05-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Tõnis Tiigi |
| Maintainers | tonistiigi |
| Keywords | uint8array, typed, buffer, binary, browserify |

## Links

- npm: https://www.npmjs.com/package/uint8
- Repository: https://github.com/tonistiigi/uint8
- npm.io page: https://npm.io/package/uint8

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2013-05-28
- 0.0.1 — 2013-05-05

## README

[![browser support](https://ci.testling.com/tonistiigi/uint8.png)](https://ci.testling.com/tonistiigi/uint8)

##Uint8

Convert between [Uint8Array](https://developer.mozilla.org/en-US/docs/JavaScript/Typed_arrays/Uint8Array) and [Buffer](http://nodejs.org/api/buffer.html) without memory copy in [Browserify](https://github.com/substack/node-browserify).

**Only for browserify. Do not use this module for Node.js code. Some basic stuff work but not all. Array to Buffer conversion is fast in Node so this module isn't really necessary there.**

### Installation

```
npm install uint8
```

### Usage

```
var uint8 = require('uint8')
```

## API

### uint8.uint8ToBuffer(uint8Array)

Convert Uint8Array to Buffer.
Also accepts ArrayBuffer and ArrayBufferView subclasses.

### uint8.bufferToUint8(buffer)

Convert Buffer to Uint8Array.
Fast route only possible if original buffer(or its parent) was created from with `uint8ToBuffer()` function. Otherwise will fallback to memory copy.

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