GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Buffer api for conversion from/to ArrayBuffer · Issue #535 · nodejs/node

Buffer api for conversion from/to ArrayBuffer #535

New issue
Copy link
New issue
Copy link
Closed
Closed
Buffer api for conversion from/to ArrayBuffer#535
Copy link

Description

@kyriosli
kyriosli
opened on Jan 21, 2015
Issue body actions

Js side conversion (like new Uint8Array(buffer) or new Buffer(bufferView)) is really slow cause it treats input as an integer array rather than a pointer to a memory address.

In older version of node.js which is compiled with v8 that does not support ArrayBuffer, ArrayBufferViews are constructed with node's Buffer, so there is no such problem.

Could we afford a new api like:

    var buf = new Buffer(1<<28);
    var arrBuf = buf.toArrayBuffer();
    var buf2 = Buffer.fromArrayBuffer(arrBuf);

Activity

  1. Fishrock123 commented on Jan 21, 2015

    @Fishrock123
    Fishrock123
    on Jan 21, 2015
    Contributor
    More actions

    Partial Duplicate of #106

  2. Fishrock123 commented on Jan 22, 2015

    @Fishrock123
    Fishrock123
    on Jan 22, 2015
    Contributor
    More actions

    Duplicate of #177

  3. Fishrock123
    closed this as completedon Jan 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.