Apparently there's already a library written in C that has similar functionality as The Unarchiver.
http://code.google.com/p/libarchive/
RAR support is still not implemented though.
http://code.google.com/p/libarchive/issues/detail?id=40
Would you mind if I ported the relevant RAR code from The Unarchiver for use in libarchive? If so, would you mind if I relicensed the ported code under BSD? libarchive is under BSD license.