replace unrar.dll with an existing lgpl alternative
A free file archiver for extremely high compression
Brought to you by:
ipavlov
replace unrar's non free code with unarr from
https://github.com/sumatrapdfreader/sumatrapdf/tree/master/ext/unarr
I've been using their unrar implementation for cbr files without any issues for a few months, dropping the propitiatory unrar code would be a good step for 7zip as most linux's don't distribute it because of license restrictions (I know you can get 7zip from online repositories) but this would make 7zip fully open source
ps. the unarr license is LGPL so it is compatible with 7zip
RAR license things are more complex than you suppose.
Any developer that implements unrar code needs some source (text specification or source code of original unrar).
To write text specification you probably also need to look to original unrar source code. So original unrar source code is used in any case.
It means than any other unrar code probably is not better than my current unrar code. The only difference is that someone claims that the code is pure LGPL. And I don't claim it about my unrar code.
Last edit: Igor Pavlov 2015-02-26
From what I understand legality is a problem.
I remember the sumatrapdf people used lgpl code from the unarchiver project
https://code.google.com/p/theunarchiver/
and just tweaked the objective C to C++ and fixed some bugs, they didn't use any of Roshals's unrar code thus making their (unarr) code free as in free speech not as free beer.
The benefit of using lgpl is legality not speed, by replacing your aka Roshal's (your is derived from his) code you end up with a completely open source project.
But in the end it's your choice, tanks for a great application
I also don't use original unrar code. I only looked original unrar code. So I used that code as reference.
So probably there is no difference between my code and any other "LGPL'ed" unrar code.
The only difference that someone thinks that it's OK to write that it's pure "LGPL". But I'm not sure that I can label such code as pure "LGPL".
From what I understand the original authors from the unarchiver project did a complete reverse engineering of the rar file format ie they didn't use any code or reference from Roshal that's why their code is quite dirty and had no support for solid archives or filters, the sumatra people added solid archives support and filters, and by going on the logic that they used a reversed lgpl code their contribution is also lgpl.
It's the same as with ReactOS it's developers did some reverse engineering from Windows without reading any Microsoft documentation or sources and ReactOS is fully open source dual licensed (L)GPL
https://sourceforge.net/projects/reactos/
It's pretty difficult to write unrar code without looking to source code. So they probably looked to original source code also. It's difficult to check.
Also how to check that their code is OK. It also too difficult. Waste of time in any case. I don't want these difficulties. There are more important things.
I think understand it now, if you read any unrar code you can only license your work (regarding rar) with the unrar license.
I'm not a lawyer and most countries have differences regarding copyright and software patents, but the fact that you used/read Roshal's code bans you from using your knowledge for anything regarding rar.
Sorry for wasting your time.
on a side note the unarchiver people seam to have a lot of experience reverse engeneering archive formats, they've reversed stuffit's sit 5.0 format
AFAIK there is no code or text reference for it available online.
https://code.google.com/p/theunarchiver/wiki/StuffIt5Format
they have done a lot of reverse engineering
https://code.google.com/p/theunarchiver/w/list
Last edit: i_a 2015-02-27
so by using unarchiver code in 7-zip we will also lose this support
the operative word was had
zeniko added solid and image filtering, the code is in sumatra's git, the unarchiver people just need to integrate it, nobody will do that for them.
The problem here is because Igor read the Roshal's code by using his knowledge he might violate the unrar license.
The only way to get this code in 7zip is if it is done by someone else, someone that has not used any Roshal reference.
And no Igor will keep his original (Roshal) inspired unrar implementation
ok let move part of this discussion to unarchiver people ! see you there
Thanks,
UPDATE: from what I understand in
https://code.google.com/p/sumatrapdf/issues/detail?id=2184
www.libarchive.org is the one which not have parsing filters, look at comment #6 and in comment #7 just speaks briefly on Unarchiver .
On other hand unarchiver claims full support of unrar
http://archives.c3.cx/formats
Last edit: Sérgio M. Basto 2015-05-30
The sumatra guys (all both of them) left google code some time ago, you should checkout their git.
this isn't really the place to discuss this but read these sumatra forum pages
According to this libarchive did not support filters at the time but neither did sumatra (it was added latter) not sure by whom I think zeniko as he tweaks the extra file formats code.
http://forums.fofou.org/sumatrapdf/topic?id=3184296
another libarchive bug fixed by them
http://forums.fofou.org/sumatrapdf/topic?id=3184292
I remember a thread regarding cbr's where solid compression was used and well until zeniko fixed it libarchive didn't support it.
as libarchive is a OSX library I've never used it, and as there are no multiarchive cbr comics sumatra doesn't support them officially, you can ask in their forums or at their git, you'd get a better answer from them
http://forums.fofou.org/sumatrapdf/
https://github.com/sumatrapdfreader/sumatrapdf/issues
edit
after re-reading
http://forums.fofou.org/sumatrapdf/topic?id=3184296
a few quotes from zeniko
"All of these files require support for "parsing filters" which libarchive doesn't have yet, mainly due to the utter lack of an open specification (cf. https://code.google.com/p/libarchive/issues/detail?id=262 )."
"The second issue seems to be due to libarchive not supporting solid compression yet. That part should be documented well enough that we might be able to fix it ourselves.
Using solid compression for comic books isn't recommended, though, since it makes it impossible to load pages out of order and always requires decompressing all pages up to the requested one when navigating around."
I have tested sumatra with solid (and image filtered) rar's and it works great
Last edit: i_a 2015-05-30
Hi,
We have libarchive ( www.libarchive.org ) and we have unarchiver ( http://unarchiver.c3.cx/commandline ) which are different projects. please do not confuse it.
yeah "the sumatra guys" drop libarchive and now use unarchiver, in github README [1] is pretty clear : "unarr originated as a port of the RAR extraction features from The Unarchiver project ".
In the AUTHORS file [2] says unarr contains code by: The Unarchiver project (...) also includes lzmasdk/. Public Domain http://www.7-zip.org/sdk.html
Conclusion: we need check if sumatrapdfreader port is very different and 7zip might use one of this projects, just have to choose between unarchiver or sumatrapdfreader unarr port.
Update:
yeah sumatrapdfreaderext/unarr is a lot different of the unarchiver so unarr seems to me the best solution, it was written in C is one of the reasons and looks more active , unarchiver development seems that stopped .
[1] https://github.com/sumatrapdfreader/sumatrapdf/blob/master/ext/unarr/README
[2] https://github.com/sumatrapdfreader/sumatrapdf/blob/master/ext/unarr/AUTHORS
Last edit: Sérgio M. Basto 2015-06-01
A bit late with a reply (sorry bout that)
It seams Gnome's FileRoller has replaced the unrar (Roshal's command line app for Linux) with theunarchiver's unarr library
https://bugzilla.gnome.org/show_bug.cgi?id=646606#c11
If the Gnome people are OK using theunarchiver (sumatrapdf's unarr is based on it) 7zip should be able to do the same (but not Igor as Unrar's license prohibits his involvement)
I will open a feature request at p7zip's page maybe myspace can do it
Last edit: i_a 2015-06-16
Hi,
I could help you, I had thought about do one unrar standalone based on unarr or else make it in 7zip.
I would like have fork of the code (7zip + unarr ) on github to tweak around .
BTW: search on github [1]
We've found 195 repository results
but none if complete or official mirror, copy last source code of sf.net and copy into github isn't the best solution but ...
[1] https://github.com/search?utf8=%E2%9C%93&q=7-Zip
Hi, you are right, file-roller have an free implementation of unrar that works, but isn't the theunarchiver (unar) and I will not talk more about names because it is a big confusion.
So:
./src/fr-command-unarchiver.h
./src/fr-command-unarchiver.c
./src/rar-utils.h
./src/fr-command-rar.c
./src/fr-command-rar.h
./src/rar-utils.c
vi ./src/fr-command-rar.c boilerplates say that is GPL ,
we may found this commit:
Author: Alexandre Rostovtsev <email cleaned="">
Date: Sun Sep 8 19:02:10 2013 -0400
rar: add support for rar-5.00
and with:
we may found this commit:
commit 160fd2dab3977fa9fdf727cb74e6a23b8fc9d20b
Author: Balló György <email cleaned="">
Date: Thu Apr 16 10:34:57 2015 +0200
Give priority to rar and unrar that supports RAR files better rar and unrar supports the RAR5 archive format, while libarchive and p7zip not.
So this implementation is done , now is just copy and paste to 7-Zip !
Thanks,
Last edit: Sérgio M. Basto 2015-07-06
I have studied a little and I realized that was wrong , the file-roller don't have any implementation of rar, it try to use rar or unrar or libarchive or Unarchiver.
Libarchiver ( http://www.libarchive.org/ ) do not support rar5 but is one core library in Linux (Fedora).
The unarchiver ( http://unarchiver.c3.cx/commandline ) aka unar, have full support for RARv5, including encryption and multiple volumes.
So your comment is right, sumatrapdf's unarr or the unarchiver (comand line) should be the best code to use in p7zip.
Thanks
Last edit: Sérgio M. Basto 2017-02-04
But at least could be distributed on Linux distributions.
i_a also wrote "the sumatra people added solid archives support and filters" but sumatrapdf is a reader just for Windows.
I also like to have 7z complete free (libre)
but there is a lot of other things missing in that code, no split archive support is one, I really wouldn't hold my breath, maybe if the p7zip maintainer has the time to tweak his code, but the unrar license prohibits Igor for using his knowledge of rar in developing a LGPL implementation.
a late reply but it just occurred to me that you are using the reverse engineered code for arj from https://sourceforge.net/projects/arj/ Robert Jung never released any code for his arj archiver, so why not a reverse engineered code for rar?
last release is from 2005 (10 years ago) , http://www.arjsoftware.com/order.htm seems to me that is not free and libre software . So I prefer unarr approx .
Thanks.
UPDATE:
unar 1.10.1 including RARv5 support , RAR support includes
encryption and multiple volumes.
Last edit: Sérgio M. Basto 2017-03-27