TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Javascript RAR reader

35 pointsby nilgradisnikover 11 years ago

6 comments

thristianover 11 years ago
That&#x27;s interesting. So far as I know, the only documentation of the RAR compression algorithm is the official UnRAR tool¹, which (among other things) restricts you from using it to create a RAR-writer. There&#x27;s also the GPL&#x27;d &quot;unrar&quot; based on UnRAR 2 (which doesn&#x27;t handle modern RAR 3.x archives), and the GPL&#x27;d &quot;unar&quot;². Given that this is under the MIT licence, it can&#x27;t be derived from any of those other tool, so I guess it must be a from-scratch reimplementation.<p>Well done!<p>¹: <a href="http://www.rarlab.com/rar/unrarsrc-5.0.12.tar.gz" rel="nofollow">http:&#x2F;&#x2F;www.rarlab.com&#x2F;rar&#x2F;unrarsrc-5.0.12.tar.gz</a> ²: <a href="http://unarchiver.c3.cx/commandline" rel="nofollow">http:&#x2F;&#x2F;unarchiver.c3.cx&#x2F;commandline</a>
评论 #6674142 未加载
评论 #6674365 未加载
评论 #6674382 未加载
评论 #6674879 未加载
tdjover 11 years ago
It would be good to note that this implementation doesn&#x27;t actually support de-compression (as is also noted in the to-do list).<p>It is able to read headers and other metadata, as well as unpack files, but only if they&#x27;re stored without compression: <a href="https://github.com/43081j/rar.js/blob/master/dist/rar.js#L545" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;43081j&#x2F;rar.js&#x2F;blob&#x2F;master&#x2F;dist&#x2F;rar.js#L54...</a><p>If I understand RAR, it actually uses a embedded virtual machine to specify the compression algorithm. That would have been the fun part.
newsmasterover 11 years ago
Very nice. Client side JS is getting more and more powerful. I&#x27;ve been playing with a JS gif compiler lately and I&#x27;m amazed it&#x27;s even possible.
bigdover 11 years ago
$(document).ready(unrar(totallyL3git.rar))
评论 #6674788 未加载
tallesover 11 years ago
Extremely useful, nice.
goggles99over 11 years ago
Is this just a POC to prove that JavaScript can be fast? This is a serious question. I am having a difficult time thinking of practical uses for this.
评论 #6674165 未加载