class Mixlib::Archive

def initialize(archive, empty: false)

def initialize(archive, empty: false)
  @empty = empty
  archive = File.expand_path(archive)
  begin
    # we prefer to use libarchive, which supports a great big pile o' stuff
    require "mixlib/archive/lib_archive"
    @archiver = Mixlib::Archive::LibArchive.new(archive)
  rescue LoadError
    # but if we can't use that, we'll fall back to ruby's native tar implementation
    @archiver = Mixlib::Archive::Tar.new(archive)
  end
end