feross/typedarray-to-buffer as an alternative or chrisdickinson/bops as a better solution to this problem.This module does not work any more with Browserifty 3.x and has been deprecated. Use
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.
npm install uint8
var uint8 = require('uint8')
Convert Uint8Array to Buffer. Also accepts ArrayBuffer and ArrayBufferView subclasses.
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.