Convert nodejs' Buffer to browsers' javascript

前端 未结 3 834
耶瑟儿~
耶瑟儿~ 2020-12-10 11:04

I\'m converting my code from Node.js to browsers\' javascript, but I have a problem with the Buffers in node.js. How can I use them in Javascript?

Here\'s an example

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-10 11:55

    With https://github.com/substack/node-browserify you can work with buffers in the Browser by using: https://github.com/toots/buffer-browserify. However: this can be very slow in the browser: For faster access use https://github.com/chrisdickinson/bops

提交回复
热议问题