tested against libarchive trunk and replace deplicated functions