This package has been deprecated

Author message:

Deprecated in favor of typedarray-to-buffer

uint8

1.0.0 • Public • Published

browser support

Uint8

Convert between Uint8Array and Buffer without memory copy in 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.

/uint8/

    Package Sidebar

    Install

    npm i uint8

    Weekly Downloads

    26

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • tonistiigi