The real answer: there is no library, and you cannot create it. You can use rarfile, or you can use 7zip unRAR (which is less free than 7zip but still free, like in beer), but both approaches require an external executable. The RAR license basically requires this, because while you can get the source code for unRAR, you canβt change it in any way, and turning it into a library will constitute an illegal modification.
In addition, solid RAR archives (the best compressed ones) cannot be accidentally accessed, so you need to parse everything anyway. WinRAR introduces a user interface that seems to avoid this, but in fact it just unpacks and repackages the archive in the background.
Nick bastin
source share