Live data from Hacker News

Javascript RAR reader

github.com

1–10 of 15 posts

Re: Javascript RAR reader

#3
That'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's also the GPL'd "unrar" based on UnRAR 2 (which doesn't handle modern RAR 3.x archives), and the GPL'd "unar"². Given that this is under the MIT licence, it can't be derived from any of those other tool, so I guess it must be a from-scratch reimplementation.

Well done!

¹: http://www.rarlab.com/rar/unrarsrc-5.0.12.tar.gz ²: http://unarchiver.c3.cx/commandline

Re: Javascript RAR reader

#5

That'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's also the GPL'd "unrar" based on UnRAR 2 (which doesn't handle modern RAR 3.x archives), and the GPL'd "unar"². Given that this is under the MIT licence, it can't be derived from any of those other tool, so I gu…

A more likely explanation is that the author frankly doesn't give a damn about such restriction.

Re: Javascript RAR reader

#6
It would be good to note that this implementation doesn't actually support de-compression (as is also noted in the to-do list).

It is able to read headers and other metadata, as well as unpack files, but only if they're stored without compression: https://github.com/43081j/rar.js/blob/master/dist/rar.js#L54...

If I understand RAR, it actually uses a embedded virtual machine to specify the compression algorithm. That would have been the fun part.

Re: Javascript RAR reader

#7

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.

Imagine a photo-sharing webapp that allowed users to drag a rar file in and then pick which images to upload.

I'm sure there are other use cases, but that one immediately comes to mind.

Re: Javascript RAR reader

#8

That'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's also the GPL'd "unrar" based on UnRAR 2 (which doesn't handle modern RAR 3.x archives), and the GPL'd "unar"². Given that this is under the MIT licence, it can't be derived from any of those other tool, so I gu…

[deleted]

Re: Javascript RAR reader

#9

That'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's also the GPL'd "unrar" based on UnRAR 2 (which doesn't handle modern RAR 3.x archives), and the GPL'd "unar"². Given that this is under the MIT licence, it can't be derived from any of those other tool, so I gu…

This doesn't look like it actually does decompression, which makes the amount of reverse-engineering it needs to do considerably less.
Post reply on HN