oldrar

oldrar is a Rust reader and writer for RAR 1.3/1.4 archives from the DOS days. The goal is archivist-oriented compatibility with old archives that are not handled by many modern tools. It’s not a very good compressor, but it can make test data.

Support

Example

let bytes = std::fs::read("archive.rar")?;
let archive = oldrar::Archive::parse(&bytes)?;
let entries = archive.extract(None)?;
for entry in entries {
    println!("{}", String::from_utf8_lossy(&entry.name));
}
# Ok::<(), Box<dyn std::error::Error>>(())

CLI

The crate also builds an oldrar binary:

oldrar info archive.rar
oldrar test archive.rar
oldrar x archive.rar out-dir
oldrar a archive.rar file1.txt file2.txt

Useful options:

oldrar test --password password archive.rar
oldrar x --password password archive.rar out-dir
oldrar a --store archive.rar file.txt
oldrar a --solid archive.rar file1.txt file2.txt
oldrar a --comment "archive note" --file-comment "file note" archive.rar file.txt
oldrar a --store --volume-size 100000 split.rar file.bin