All formats

RAR libraries for Ruby

For Ruby, ffi-libarchive is the practical choice. It’s an FFI binding to the C library libarchive, so it reads RAR4 and RAR5 with the same code that reads ZIP, 7z and TAR. It inherits libarchive’s limits for RAR: no encrypted archives, no solid RAR4 archives and no volumes. It needs the libarchive shared library installed on the system.

For encrypted or multi-volume RAR files, run the unrar or 7z command line tool from Ruby instead.