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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Show HN: SHA1 Checksum Large Files with HTML5 Typed Arrays and Web Workers

47 点作者 antimatter15超过 13 年前

4 条评论

pygorex超过 13 年前
Cool concept and a great usage of WebWorkers. I can see this being useful to verify the integrity of files uploaded via an HTML form - get the SHA1 client-side and verify it against a SHA1 server-side.<p>Unfortunately this implementation is way too slow for large files. In Chrome 15 OSX running a Core 2 Duo 2.4GHz an ~650MB file takes about 9.3 minutes to calculate the resultant SHA. Using openssl the hash generation takes ~8 seconds. (Bearing in mind that it's not fair to compare an interpreted script against a compiled program.)
评论 #3173654 未加载
评论 #3173941 未加载
评论 #3173582 未加载
deskamess超过 13 年前
In worker.js :<p>//Firefox doesn't support FileReader inside WebWorkers<p>I noticed that Firefox has FileReaderSync available only from Web Workers. <a href="https://developer.mozilla.org/en/DOM/FileReaderSync" rel="nofollow">https://developer.mozilla.org/en/DOM/FileReaderSync</a><p>Per spec (<a href="http://dev.w3.org/2006/webapi/FileAPI/#readingOnThreads" rel="nofollow">http://dev.w3.org/2006/webapi/FileAPI/#readingOnThreads</a>) web workers can use both. The use cases I have will work fine with the sync interface, but I wonder why Firefox chose not to provide the async option in workers.
someone13超过 13 年前
OK, this is pretty cool :-)<p>If you don't mind my asking, what's the license on this, if I'd like to use this in one of my projects?
win7guru超过 13 年前
Wow, this is awesome. I prefer using a desktop program for multiple checking, but this is very nice looking. Thanks for the resource.