TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Faster-than-native toHex() for JavaScript Uint8Arrays

1 点作者 gmac6 个月前

1 comment

gmac6 个月前
Firefox 133b7 and Safari Tech Preview both have a new Uint8Array.toHex() method, but otherwise browsers don&#x27;t yet have a native way to turn binary data into hex strings.<p>I put this tiny package together to fill this gap using a significantly faster technique than I&#x27;ve seen elsewhere.<p>Surprisingly, it&#x27;s actually faster than the current native Firefox implementation (at least on a recent MacBook Pro). Hopefully that won&#x27;t remain the case for too much longer ...