Use libarchive.