unjs / unenv

🕊️ Convert javaScript code to be runtime agnostic

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reduce size of Buffer polyfills

pi0 opened this issue · comments

The Buffer polyfill we provided, is a much more compacted version of browserify Buffer that is used in most of the other implementations.

Although I have previously spend some time to optimize it, I belive it can be furhor more optimized in terms of both size and performance by migrating to more modern native APIs.

Steps:

  • Add test suite for Buffer
  • Enable typecheck on all buffer related files
  • Get rid of old browser/js compact syntax and workarounds
  • Investigate native integrations

(if you like to contribute, separate PR is welcome for each top-down ❤️ )