All formats

CBR libraries for Ruby

Ruby has no pure-Ruby RAR decoder. ffi-libarchive binds the C libarchive library through FFI and reads RAR4 and RAR5 (not password-protected), as well as ZIP, 7z and TAR, so one code path opens every comic archive. It needs the libarchive shared library installed.

For full RAR support (encrypted archives), the alternative is running RARLAB’s unrar command with Open3 and parsing unrar lb (bare file list) output. Convert to CBZ and use rubyzip to edit metadata.