GithubHelp home page GithubHelp logo

vitaly-z / to-arraybuffer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jhiesey/to-arraybuffer

0.0 0.0 0.0 4 KB

Get an ArrayBuffer from a Buffer as fast as possible

License: MIT License

JavaScript 100.00%

to-arraybuffer's Introduction

to-arraybuffer Build Status

Sauce Test Status

Convert from a Buffer to an ArrayBuffer as fast as possible.

Note that in some cases the returned ArrayBuffer is backed by the same memory as the original Buffer (but in other cases it is a copy), so modifying the ArrayBuffer is not recommended.

This module is designed to work both in node.js and in all browsers with ArrayBuffer support when using the Buffer implementation provided by Browserify.

Usage

var toArrayBuffer = require('to-arraybuffer')

var buffer = new Buffer(100)
// Fill the buffer with some data

var ab = toArrayBuffer(buffer)
// `ab` now contains the same data as `buffer`

License

MIT

to-arraybuffer's People

Contributors

jhiesey avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.