RSSAmplifier

(untitled) · Dec 29, 2015

How to convert a Buffer to ArrayBuffer

0
Sign in to vote or save

This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.

Convert a Buffer to ArrayBuffer . var isArrayBufferSupported = ( new Buffer( 0 )).buffer instanceof ArrayBuffer; var bufferToArrayBuffer = isArrayBufferSupported ? bufferToArrayBufferSlice : bufferToArrayBufferCycle; function bufferToArrayBufferSlice(buffer) { return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength); } function bufferToArrayBufferCycle(buffer) { var ab…

Read on miguelmota.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.